From f4df1ea622df869a0b6b16b2f23444c5cb7e5ccd Mon Sep 17 00:00:00 2001 From: anolis-bot Date: Wed, 12 Jan 2022 23:21:23 +0800 Subject: [PATCH] import vsftpd-3.0.3-34.el8.src.rpm --- ...-provided-script-to-locate-libraries.patch | 0 0001-Fix-timestamp-handling-in-MDTM.patch | 0 ...ve-closing-standard-FDs-after-listen.patch | 0 ...out-the-ftp_home_dir-SELinux-boolean.patch | 0 ...rted-only-after-record-insertion-rem.patch | 0 0002-Enable-build-with-SSL.patch | 0 0002-Prevent-recursion-in-bug.patch | 0 ...at-pututxline-if-it-fails-with-EINTR.patch | 0 0003-Enable-build-with-TCP-Wrapper.patch | 0 ...e-until-it-succeeds-if-it-fails-with.patch | 0 ...-dir-for-config-files-instead-of-etc.patch | 0 ...en-calling-PAM-authentication-module.patch | 0 ...err-before-listening-for-incoming-co.patch | 0 0007-Make-filename-filters-smarter.patch | 0 0008-Write-denied-logins-into-the-log.patch | 0 ...itespaces-when-reading-configuration.patch | 0 0010-Improve-daemonizing.patch | 0 ...-Fix-listing-with-more-than-one-star.patch | 0 ...lace-syscall-__NR_clone-.-with-clone.patch | 0 0013-Extend-man-pages-with-systemd-info.patch | 0 ...dd-support-for-square-brackets-in-ls.patch | 0 0015-Listen-on-IPv6-by-default.patch | 0 ...e-VSFTP_AS_LIMIT-from-200UL-to-400UL.patch | 0 ...-an-issue-with-timestamps-during-DST.patch | 0 ...he-default-log-file-in-configuration.patch | 0 ...troduce-reverse_lookup_enable-option.patch | 0 ...d-int-for-uid-and-gid-representation.patch | 0 ...-support-for-DHE-based-cipher-suites.patch | 0 ...upport-for-EDDHE-based-cipher-suites.patch | 0 ...n-for-isolate_-options.-Correct-defa.patch | 0 0024-Introduce-new-return-value-450.patch | 0 0025-Improve-local_max_rate-option.patch | 0 0026-Prevent-hanging-in-SIGCHLD-handler.patch | 0 0027-Delete-files-when-upload-fails.patch | 0 0028-Fix-man-page-rendering.patch | 0 0029-Fix-segfault-in-config-file-parser.patch | 0 ...g-into-syslog-when-enabled-in-config.patch | 0 ...on-mark-wildcard-withing-a-file-name.patch | 0 ...errors-from-nfs-with-quota-to-client.patch | 0 ...ntroduce-TLSv1.1-and-TLSv1.2-options.patch | 0 ...omp-sandbox-because-it-is-too-strict.patch | 0 ...ment-patch-to-build-with-OpenSSL-1.1.patch | 0 0036-Redefine-VSFTP_COMMAND_FD-to-1.patch | 0 ...ationship-of-text_userdb_names-and-c.patch | 0 ...low_writeable_chroot-in-the-man-page.patch | 0 ...tation-of-ASCII-mode-in-the-man-page.patch | 0 0040-Use-system-wide-crypto-policy.patch | 0 ...-default-for-ssl_ciphers-in-the-man-.patch | 0 ...AT-command-check-ssl_tlsv1_1-and-ssl.patch | 0 0043-Enable-only-TLSv1.2-by-default.patch | 0 ...nymous_enable-in-default-config-file.patch | 0 ...on-of-ascii_-options-behaviour-in-ma.patch | 0 ...r-to-the-man-page-regarding-the-asci.patch | 0 0047-Disable-tcp_wrappers-support.patch | 0 ...e-of-strict_ssl_read_eof-in-man-page.patch | 0 ...-generation-algorithm-for-STOU-comma.patch | 0 0050-Don-t-link-with-libnsl.patch | 0 ...ation-of-better_stou-in-the-man-page.patch | 0 0052-Fix-rDNS-with-IPv6.patch | 0 0053-Always-do-chdir-after-chroot.patch | 0 ...imeo-Check-return-value-of-setsockop.patch | 0 ...tz-Check-the-return-value-of-syscall.patch | 0 0056-Log-die-calls-to-syslog.patch | 0 ...ssage-when-max-number-of-bind-attemp.patch | 0 ...e-max-number-of-bind-retries-tunable.patch | 0 ...when-running-in-a-container-as-PID-1.patch | 0 ...wc_logs-replace_unprintable_with_hex.patch | 215 ++++++++++++++++++ vsftpd-3.0.3.tar.gz | Bin vsftpd.ftpusers | 0 vsftpd.pam | 0 vsftpd.service | 0 vsftpd.spec | 8 +- vsftpd.target | 0 vsftpd.user_list | 0 vsftpd.xinetd | 0 vsftpd@.service | 0 76 files changed, 222 insertions(+), 1 deletion(-) mode change 100644 => 100755 0001-Don-t-use-the-provided-script-to-locate-libraries.patch mode change 100644 => 100755 0001-Fix-timestamp-handling-in-MDTM.patch mode change 100644 => 100755 0001-Move-closing-standard-FDs-after-listen.patch mode change 100644 => 100755 0001-Remove-a-hint-about-the-ftp_home_dir-SELinux-boolean.patch mode change 100644 => 100755 0001-Set-s_uwtmp_inserted-only-after-record-insertion-rem.patch mode change 100644 => 100755 0002-Enable-build-with-SSL.patch mode change 100644 => 100755 0002-Prevent-recursion-in-bug.patch mode change 100644 => 100755 0002-Repeat-pututxline-if-it-fails-with-EINTR.patch mode change 100644 => 100755 0003-Enable-build-with-TCP-Wrapper.patch mode change 100644 => 100755 0003-Repeat-pututxline-until-it-succeeds-if-it-fails-with.patch mode change 100644 => 100755 0004-Use-etc-vsftpd-dir-for-config-files-instead-of-etc.patch mode change 100644 => 100755 0005-Use-hostname-when-calling-PAM-authentication-module.patch mode change 100644 => 100755 0006-Close-stdin-out-err-before-listening-for-incoming-co.patch mode change 100644 => 100755 0007-Make-filename-filters-smarter.patch mode change 100644 => 100755 0008-Write-denied-logins-into-the-log.patch mode change 100644 => 100755 0009-Trim-whitespaces-when-reading-configuration.patch mode change 100644 => 100755 0010-Improve-daemonizing.patch mode change 100644 => 100755 0011-Fix-listing-with-more-than-one-star.patch mode change 100644 => 100755 0012-Replace-syscall-__NR_clone-.-with-clone.patch mode change 100644 => 100755 0013-Extend-man-pages-with-systemd-info.patch mode change 100644 => 100755 0014-Add-support-for-square-brackets-in-ls.patch mode change 100644 => 100755 0015-Listen-on-IPv6-by-default.patch mode change 100644 => 100755 0016-Increase-VSFTP_AS_LIMIT-from-200UL-to-400UL.patch mode change 100644 => 100755 0017-Fix-an-issue-with-timestamps-during-DST.patch mode change 100644 => 100755 0018-Change-the-default-log-file-in-configuration.patch mode change 100644 => 100755 0019-Introduce-reverse_lookup_enable-option.patch mode change 100644 => 100755 0020-Use-unsigned-int-for-uid-and-gid-representation.patch mode change 100644 => 100755 0021-Introduce-support-for-DHE-based-cipher-suites.patch mode change 100644 => 100755 0022-Introduce-support-for-EDDHE-based-cipher-suites.patch mode change 100644 => 100755 0023-Add-documentation-for-isolate_-options.-Correct-defa.patch mode change 100644 => 100755 0024-Introduce-new-return-value-450.patch mode change 100644 => 100755 0025-Improve-local_max_rate-option.patch mode change 100644 => 100755 0026-Prevent-hanging-in-SIGCHLD-handler.patch mode change 100644 => 100755 0027-Delete-files-when-upload-fails.patch mode change 100644 => 100755 0028-Fix-man-page-rendering.patch mode change 100644 => 100755 0029-Fix-segfault-in-config-file-parser.patch mode change 100644 => 100755 0030-Fix-logging-into-syslog-when-enabled-in-config.patch mode change 100644 => 100755 0031-Fix-question-mark-wildcard-withing-a-file-name.patch mode change 100644 => 100755 0032-Propagate-errors-from-nfs-with-quota-to-client.patch mode change 100644 => 100755 0033-Introduce-TLSv1.1-and-TLSv1.2-options.patch mode change 100644 => 100755 0034-Turn-off-seccomp-sandbox-because-it-is-too-strict.patch mode change 100644 => 100755 0035-Modify-DH-enablement-patch-to-build-with-OpenSSL-1.1.patch mode change 100644 => 100755 0036-Redefine-VSFTP_COMMAND_FD-to-1.patch mode change 100644 => 100755 0037-Document-the-relationship-of-text_userdb_names-and-c.patch mode change 100644 => 100755 0038-Document-allow_writeable_chroot-in-the-man-page.patch mode change 100644 => 100755 0039-Improve-documentation-of-ASCII-mode-in-the-man-page.patch mode change 100644 => 100755 0040-Use-system-wide-crypto-policy.patch mode change 100644 => 100755 0041-Document-the-new-default-for-ssl_ciphers-in-the-man-.patch mode change 100644 => 100755 0042-When-handling-FEAT-command-check-ssl_tlsv1_1-and-ssl.patch mode change 100644 => 100755 0043-Enable-only-TLSv1.2-by-default.patch mode change 100644 => 100755 0044-Disable-anonymous_enable-in-default-config-file.patch mode change 100644 => 100755 0045-Expand-explanation-of-ascii_-options-behaviour-in-ma.patch mode change 100644 => 100755 0046-vsftpd.conf-Refer-to-the-man-page-regarding-the-asci.patch mode change 100644 => 100755 0047-Disable-tcp_wrappers-support.patch mode change 100644 => 100755 0048-Fix-default-value-of-strict_ssl_read_eof-in-man-page.patch mode change 100644 => 100755 0049-Add-new-filename-generation-algorithm-for-STOU-comma.patch mode change 100644 => 100755 0050-Don-t-link-with-libnsl.patch mode change 100644 => 100755 0051-Improve-documentation-of-better_stou-in-the-man-page.patch mode change 100644 => 100755 0052-Fix-rDNS-with-IPv6.patch mode change 100644 => 100755 0053-Always-do-chdir-after-chroot.patch mode change 100644 => 100755 0054-vsf_sysutil_rcvtimeo-Check-return-value-of-setsockop.patch mode change 100644 => 100755 0055-vsf_sysutil_get_tz-Check-the-return-value-of-syscall.patch mode change 100644 => 100755 0056-Log-die-calls-to-syslog.patch mode change 100644 => 100755 0057-Improve-error-message-when-max-number-of-bind-attemp.patch mode change 100644 => 100755 0058-Make-the-max-number-of-bind-retries-tunable.patch mode change 100644 => 100755 0059-Fix-SEGFAULT-when-running-in-a-container-as-PID-1.patch create mode 100755 vsftpd-3.0.3-enable_wc_logs-replace_unprintable_with_hex.patch mode change 100644 => 100755 vsftpd-3.0.3.tar.gz mode change 100644 => 100755 vsftpd.ftpusers mode change 100644 => 100755 vsftpd.pam mode change 100644 => 100755 vsftpd.service mode change 100644 => 100755 vsftpd.spec mode change 100644 => 100755 vsftpd.target mode change 100644 => 100755 vsftpd.user_list mode change 100644 => 100755 vsftpd.xinetd mode change 100644 => 100755 vsftpd@.service diff --git a/0001-Don-t-use-the-provided-script-to-locate-libraries.patch b/0001-Don-t-use-the-provided-script-to-locate-libraries.patch old mode 100644 new mode 100755 diff --git a/0001-Fix-timestamp-handling-in-MDTM.patch b/0001-Fix-timestamp-handling-in-MDTM.patch old mode 100644 new mode 100755 diff --git a/0001-Move-closing-standard-FDs-after-listen.patch b/0001-Move-closing-standard-FDs-after-listen.patch old mode 100644 new mode 100755 diff --git a/0001-Remove-a-hint-about-the-ftp_home_dir-SELinux-boolean.patch b/0001-Remove-a-hint-about-the-ftp_home_dir-SELinux-boolean.patch old mode 100644 new mode 100755 diff --git a/0001-Set-s_uwtmp_inserted-only-after-record-insertion-rem.patch b/0001-Set-s_uwtmp_inserted-only-after-record-insertion-rem.patch old mode 100644 new mode 100755 diff --git a/0002-Enable-build-with-SSL.patch b/0002-Enable-build-with-SSL.patch old mode 100644 new mode 100755 diff --git a/0002-Prevent-recursion-in-bug.patch b/0002-Prevent-recursion-in-bug.patch old mode 100644 new mode 100755 diff --git a/0002-Repeat-pututxline-if-it-fails-with-EINTR.patch b/0002-Repeat-pututxline-if-it-fails-with-EINTR.patch old mode 100644 new mode 100755 diff --git a/0003-Enable-build-with-TCP-Wrapper.patch b/0003-Enable-build-with-TCP-Wrapper.patch old mode 100644 new mode 100755 diff --git a/0003-Repeat-pututxline-until-it-succeeds-if-it-fails-with.patch b/0003-Repeat-pututxline-until-it-succeeds-if-it-fails-with.patch old mode 100644 new mode 100755 diff --git a/0004-Use-etc-vsftpd-dir-for-config-files-instead-of-etc.patch b/0004-Use-etc-vsftpd-dir-for-config-files-instead-of-etc.patch old mode 100644 new mode 100755 diff --git a/0005-Use-hostname-when-calling-PAM-authentication-module.patch b/0005-Use-hostname-when-calling-PAM-authentication-module.patch old mode 100644 new mode 100755 diff --git a/0006-Close-stdin-out-err-before-listening-for-incoming-co.patch b/0006-Close-stdin-out-err-before-listening-for-incoming-co.patch old mode 100644 new mode 100755 diff --git a/0007-Make-filename-filters-smarter.patch b/0007-Make-filename-filters-smarter.patch old mode 100644 new mode 100755 diff --git a/0008-Write-denied-logins-into-the-log.patch b/0008-Write-denied-logins-into-the-log.patch old mode 100644 new mode 100755 diff --git a/0009-Trim-whitespaces-when-reading-configuration.patch b/0009-Trim-whitespaces-when-reading-configuration.patch old mode 100644 new mode 100755 diff --git a/0010-Improve-daemonizing.patch b/0010-Improve-daemonizing.patch old mode 100644 new mode 100755 diff --git a/0011-Fix-listing-with-more-than-one-star.patch b/0011-Fix-listing-with-more-than-one-star.patch old mode 100644 new mode 100755 diff --git a/0012-Replace-syscall-__NR_clone-.-with-clone.patch b/0012-Replace-syscall-__NR_clone-.-with-clone.patch old mode 100644 new mode 100755 diff --git a/0013-Extend-man-pages-with-systemd-info.patch b/0013-Extend-man-pages-with-systemd-info.patch old mode 100644 new mode 100755 diff --git a/0014-Add-support-for-square-brackets-in-ls.patch b/0014-Add-support-for-square-brackets-in-ls.patch old mode 100644 new mode 100755 diff --git a/0015-Listen-on-IPv6-by-default.patch b/0015-Listen-on-IPv6-by-default.patch old mode 100644 new mode 100755 diff --git a/0016-Increase-VSFTP_AS_LIMIT-from-200UL-to-400UL.patch b/0016-Increase-VSFTP_AS_LIMIT-from-200UL-to-400UL.patch old mode 100644 new mode 100755 diff --git a/0017-Fix-an-issue-with-timestamps-during-DST.patch b/0017-Fix-an-issue-with-timestamps-during-DST.patch old mode 100644 new mode 100755 diff --git a/0018-Change-the-default-log-file-in-configuration.patch b/0018-Change-the-default-log-file-in-configuration.patch old mode 100644 new mode 100755 diff --git a/0019-Introduce-reverse_lookup_enable-option.patch b/0019-Introduce-reverse_lookup_enable-option.patch old mode 100644 new mode 100755 diff --git a/0020-Use-unsigned-int-for-uid-and-gid-representation.patch b/0020-Use-unsigned-int-for-uid-and-gid-representation.patch old mode 100644 new mode 100755 diff --git a/0021-Introduce-support-for-DHE-based-cipher-suites.patch b/0021-Introduce-support-for-DHE-based-cipher-suites.patch old mode 100644 new mode 100755 diff --git a/0022-Introduce-support-for-EDDHE-based-cipher-suites.patch b/0022-Introduce-support-for-EDDHE-based-cipher-suites.patch old mode 100644 new mode 100755 diff --git a/0023-Add-documentation-for-isolate_-options.-Correct-defa.patch b/0023-Add-documentation-for-isolate_-options.-Correct-defa.patch old mode 100644 new mode 100755 diff --git a/0024-Introduce-new-return-value-450.patch b/0024-Introduce-new-return-value-450.patch old mode 100644 new mode 100755 diff --git a/0025-Improve-local_max_rate-option.patch b/0025-Improve-local_max_rate-option.patch old mode 100644 new mode 100755 diff --git a/0026-Prevent-hanging-in-SIGCHLD-handler.patch b/0026-Prevent-hanging-in-SIGCHLD-handler.patch old mode 100644 new mode 100755 diff --git a/0027-Delete-files-when-upload-fails.patch b/0027-Delete-files-when-upload-fails.patch old mode 100644 new mode 100755 diff --git a/0028-Fix-man-page-rendering.patch b/0028-Fix-man-page-rendering.patch old mode 100644 new mode 100755 diff --git a/0029-Fix-segfault-in-config-file-parser.patch b/0029-Fix-segfault-in-config-file-parser.patch old mode 100644 new mode 100755 diff --git a/0030-Fix-logging-into-syslog-when-enabled-in-config.patch b/0030-Fix-logging-into-syslog-when-enabled-in-config.patch old mode 100644 new mode 100755 diff --git a/0031-Fix-question-mark-wildcard-withing-a-file-name.patch b/0031-Fix-question-mark-wildcard-withing-a-file-name.patch old mode 100644 new mode 100755 diff --git a/0032-Propagate-errors-from-nfs-with-quota-to-client.patch b/0032-Propagate-errors-from-nfs-with-quota-to-client.patch old mode 100644 new mode 100755 diff --git a/0033-Introduce-TLSv1.1-and-TLSv1.2-options.patch b/0033-Introduce-TLSv1.1-and-TLSv1.2-options.patch old mode 100644 new mode 100755 diff --git a/0034-Turn-off-seccomp-sandbox-because-it-is-too-strict.patch b/0034-Turn-off-seccomp-sandbox-because-it-is-too-strict.patch old mode 100644 new mode 100755 diff --git a/0035-Modify-DH-enablement-patch-to-build-with-OpenSSL-1.1.patch b/0035-Modify-DH-enablement-patch-to-build-with-OpenSSL-1.1.patch old mode 100644 new mode 100755 diff --git a/0036-Redefine-VSFTP_COMMAND_FD-to-1.patch b/0036-Redefine-VSFTP_COMMAND_FD-to-1.patch old mode 100644 new mode 100755 diff --git a/0037-Document-the-relationship-of-text_userdb_names-and-c.patch b/0037-Document-the-relationship-of-text_userdb_names-and-c.patch old mode 100644 new mode 100755 diff --git a/0038-Document-allow_writeable_chroot-in-the-man-page.patch b/0038-Document-allow_writeable_chroot-in-the-man-page.patch old mode 100644 new mode 100755 diff --git a/0039-Improve-documentation-of-ASCII-mode-in-the-man-page.patch b/0039-Improve-documentation-of-ASCII-mode-in-the-man-page.patch old mode 100644 new mode 100755 diff --git a/0040-Use-system-wide-crypto-policy.patch b/0040-Use-system-wide-crypto-policy.patch old mode 100644 new mode 100755 diff --git a/0041-Document-the-new-default-for-ssl_ciphers-in-the-man-.patch b/0041-Document-the-new-default-for-ssl_ciphers-in-the-man-.patch old mode 100644 new mode 100755 diff --git a/0042-When-handling-FEAT-command-check-ssl_tlsv1_1-and-ssl.patch b/0042-When-handling-FEAT-command-check-ssl_tlsv1_1-and-ssl.patch old mode 100644 new mode 100755 diff --git a/0043-Enable-only-TLSv1.2-by-default.patch b/0043-Enable-only-TLSv1.2-by-default.patch old mode 100644 new mode 100755 diff --git a/0044-Disable-anonymous_enable-in-default-config-file.patch b/0044-Disable-anonymous_enable-in-default-config-file.patch old mode 100644 new mode 100755 diff --git a/0045-Expand-explanation-of-ascii_-options-behaviour-in-ma.patch b/0045-Expand-explanation-of-ascii_-options-behaviour-in-ma.patch old mode 100644 new mode 100755 diff --git a/0046-vsftpd.conf-Refer-to-the-man-page-regarding-the-asci.patch b/0046-vsftpd.conf-Refer-to-the-man-page-regarding-the-asci.patch old mode 100644 new mode 100755 diff --git a/0047-Disable-tcp_wrappers-support.patch b/0047-Disable-tcp_wrappers-support.patch old mode 100644 new mode 100755 diff --git a/0048-Fix-default-value-of-strict_ssl_read_eof-in-man-page.patch b/0048-Fix-default-value-of-strict_ssl_read_eof-in-man-page.patch old mode 100644 new mode 100755 diff --git a/0049-Add-new-filename-generation-algorithm-for-STOU-comma.patch b/0049-Add-new-filename-generation-algorithm-for-STOU-comma.patch old mode 100644 new mode 100755 diff --git a/0050-Don-t-link-with-libnsl.patch b/0050-Don-t-link-with-libnsl.patch old mode 100644 new mode 100755 diff --git a/0051-Improve-documentation-of-better_stou-in-the-man-page.patch b/0051-Improve-documentation-of-better_stou-in-the-man-page.patch old mode 100644 new mode 100755 diff --git a/0052-Fix-rDNS-with-IPv6.patch b/0052-Fix-rDNS-with-IPv6.patch old mode 100644 new mode 100755 diff --git a/0053-Always-do-chdir-after-chroot.patch b/0053-Always-do-chdir-after-chroot.patch old mode 100644 new mode 100755 diff --git a/0054-vsf_sysutil_rcvtimeo-Check-return-value-of-setsockop.patch b/0054-vsf_sysutil_rcvtimeo-Check-return-value-of-setsockop.patch old mode 100644 new mode 100755 diff --git a/0055-vsf_sysutil_get_tz-Check-the-return-value-of-syscall.patch b/0055-vsf_sysutil_get_tz-Check-the-return-value-of-syscall.patch old mode 100644 new mode 100755 diff --git a/0056-Log-die-calls-to-syslog.patch b/0056-Log-die-calls-to-syslog.patch old mode 100644 new mode 100755 diff --git a/0057-Improve-error-message-when-max-number-of-bind-attemp.patch b/0057-Improve-error-message-when-max-number-of-bind-attemp.patch old mode 100644 new mode 100755 diff --git a/0058-Make-the-max-number-of-bind-retries-tunable.patch b/0058-Make-the-max-number-of-bind-retries-tunable.patch old mode 100644 new mode 100755 diff --git a/0059-Fix-SEGFAULT-when-running-in-a-container-as-PID-1.patch b/0059-Fix-SEGFAULT-when-running-in-a-container-as-PID-1.patch old mode 100644 new mode 100755 diff --git a/vsftpd-3.0.3-enable_wc_logs-replace_unprintable_with_hex.patch b/vsftpd-3.0.3-enable_wc_logs-replace_unprintable_with_hex.patch new file mode 100755 index 0000000..914aebd --- /dev/null +++ b/vsftpd-3.0.3-enable_wc_logs-replace_unprintable_with_hex.patch @@ -0,0 +1,215 @@ +diff --git a/logging.c b/logging.c +index 9e86808..613ff4b 100644 +--- a/logging.c ++++ b/logging.c +@@ -171,7 +171,14 @@ vsf_log_do_log_to_file(int fd, struct mystr* p_str) + return; + } + } +- str_replace_unprintable(p_str, '?'); ++ if (tunable_wc_logs_enable) ++ { ++ str_replace_unprintable_with_hex_wc(p_str); ++ } ++ else ++ { ++ str_replace_unprintable_with_hex(p_str); ++ } + str_append_char(p_str, '\n'); + /* Ignore write failure; maybe the disk filled etc. */ + (void) str_write_loop(p_str, fd); +diff --git a/parseconf.c b/parseconf.c +index 3cfe7da..3729818 100644 +--- a/parseconf.c ++++ b/parseconf.c +@@ -113,6 +113,7 @@ parseconf_bool_array[] = + { "allow_writeable_chroot", &tunable_allow_writeable_chroot }, + { "better_stou", &tunable_better_stou }, + { "log_die", &tunable_log_die }, ++ { "wc_logs_enable", &tunable_wc_logs_enable }, + { 0, 0 } + }; + +diff --git a/str.c b/str.c +index 82b8ae4..c03e7d8 100644 +--- a/str.c ++++ b/str.c +@@ -20,6 +20,11 @@ + #include "utility.h" + #include "sysutil.h" + ++#include ++#include ++#include ++#include ++ + /* File local functions */ + static void str_split_text_common(struct mystr* p_src, struct mystr* p_rhs, + const char* p_text, int is_reverse); +@@ -723,6 +728,102 @@ str_replace_unprintable(struct mystr* p_str, char new_char) + } + } + ++void ++str_replace_unprintable_with_hex(struct mystr* p_str) ++{ ++ unsigned int ups_size = sizeof(unsigned int) * (p_str->len); ++ if (ups_size < p_str->len) ++ { ++ str_replace_unprintable(p_str, '?'); ++ str_append_text(p_str, ": BUG: string is too long"); ++ bug(p_str->p_buf); ++ } ++ unsigned int* ups = vsf_sysutil_malloc(ups_size); ++ unsigned int up_count = 0; ++ for (unsigned int i=0; i < p_str->len; i++) ++ { ++ if (!vsf_sysutil_isprint(p_str->p_buf[i])) ++ { ++ ups[up_count++] = i; ++ } ++ } ++ str_replace_positions_with_hex(p_str, ups, up_count); ++ vsf_sysutil_free(ups); ++} ++ ++void str_replace_unprintable_with_hex_wc(struct mystr* p_str) ++{ ++ unsigned int ups_size = sizeof(unsigned int) * (p_str->len); ++ if (ups_size < p_str->len) ++ { ++ str_replace_unprintable(p_str, '?'); ++ str_append_text(p_str, ": BUG: string is too long"); ++ bug(p_str->p_buf); ++ } ++ unsigned int* ups = vsf_sysutil_malloc(ups_size); ++ unsigned int up_count = 0; ++ ++ size_t current = 0; ++ wchar_t pwc; ++ mbstate_t ps; ++ memset(&ps, 0, sizeof(ps)); ++ ssize_t len = 0; ++ while ((len = mbrtowc(&pwc, p_str->p_buf, p_str->len - current, &ps)) > 0) ++ { ++ if (!iswprint(pwc)) ++ { ++ for (int i = 0; i < len; i++) ++ { ++ ups[up_count++] = current++; ++ } ++ } ++ else ++ { ++ current += len; ++ } ++ } ++ if (len < 0) ++ { ++ while (current < p_str->len) ++ { ++ ups[up_count++] = current++; ++ } ++ } ++ str_replace_positions_with_hex(p_str, ups, up_count); ++ vsf_sysutil_free(ups); ++} ++ ++void ++str_replace_positions_with_hex(struct mystr* p_str, const unsigned int* poss, const unsigned int pos_count) ++{ ++ if (pos_count == 0) ++ return; ++ ++ struct mystr tmp_str = INIT_MYSTR; ++ str_reserve(&tmp_str, p_str->len + 3 * pos_count); ++ unsigned int current = 0; ++ ++ for (unsigned int i=0; i < pos_count; i++) ++ { ++ unsigned int pos = poss[i]; ++ ++ if (current < pos) ++ private_str_append_memchunk(&tmp_str, p_str->p_buf + current, pos - current); ++ ++ char hex_buf[5]; ++ memset(hex_buf, 0, sizeof(hex_buf)); ++ sprintf(hex_buf, "\\x%02X", (unsigned char) p_str->p_buf[pos]); ++ str_append_text(&tmp_str, hex_buf); ++ current = pos + 1; ++ } ++ ++ if (current < p_str->len) ++ private_str_append_memchunk(&tmp_str, p_str->p_buf + current, p_str->len - current); ++ ++ str_copy(p_str, &tmp_str); ++ str_free(&tmp_str); ++} ++ + void + str_basename (struct mystr* d_str, const struct mystr* path) + { +diff --git a/str.h b/str.h +index 44270da..95a83b5 100644 +--- a/str.h ++++ b/str.h +@@ -98,6 +98,10 @@ int str_contains_space(const struct mystr* p_str); + int str_all_space(const struct mystr* p_str); + int str_contains_unprintable(const struct mystr* p_str); + void str_replace_unprintable(struct mystr* p_str, char new_char); ++void str_replace_unprintable_with_hex(struct mystr* p_str); ++void str_replace_unprintable_with_hex_wc(struct mystr* p_str); ++void str_replace_positions_with_hex(struct mystr* p_str, const unsigned int* poss, ++ const unsigned int pos_count); + int str_atoi(const struct mystr* p_str); + filesize_t str_a_to_filesize_t(const struct mystr* p_str); + unsigned int str_octal_to_uint(const struct mystr* p_str); +diff --git a/tunables.c b/tunables.c +index a7ce9c8..c96c1ac 100644 +--- a/tunables.c ++++ b/tunables.c +@@ -94,6 +94,7 @@ int tunable_seccomp_sandbox; + int tunable_allow_writeable_chroot; + int tunable_better_stou; + int tunable_log_die; ++int tunable_wc_logs_enable; + + unsigned int tunable_accept_timeout; + unsigned int tunable_connect_timeout; +@@ -244,6 +245,7 @@ tunables_load_defaults() + tunable_allow_writeable_chroot = 0; + tunable_better_stou = 0; + tunable_log_die = 0; ++ tunable_wc_logs_enable = 0; + + tunable_accept_timeout = 60; + tunable_connect_timeout = 60; +diff --git a/tunables.h b/tunables.h +index 029d645..8d50150 100644 +--- a/tunables.h ++++ b/tunables.h +@@ -98,6 +98,7 @@ extern int tunable_better_stou; /* Use better file name generation + */ + extern int tunable_log_die; /* Log calls to die(), die2() + * and bug() */ ++extern int tunable_wc_logs_enable; /* Allow non ASCII characters in logs */ + + /* Integer/numeric defines */ + extern unsigned int tunable_accept_timeout; +diff --git a/vsftpd.conf.5 b/vsftpd.conf.5 +index ce3fba3..815773f 100644 +--- a/vsftpd.conf.5 ++++ b/vsftpd.conf.5 +@@ -735,6 +735,12 @@ If enabled, use CLONE_NEWPID and CLONE_NEWIPC to isolate processes to their + ipc and pid namespaces. So separated processes can not interact with each other. + + Default: YES ++.TP ++.B wc_logs_enable ++If enabled, logs will be treated as wide-character strings and not just ++ASCII strings when filtering out non-printable characters. ++ ++Default: NO + + .SH NUMERIC OPTIONS + Below is a list of numeric options. A numeric option must be set to a non diff --git a/vsftpd-3.0.3.tar.gz b/vsftpd-3.0.3.tar.gz old mode 100644 new mode 100755 diff --git a/vsftpd.ftpusers b/vsftpd.ftpusers old mode 100644 new mode 100755 diff --git a/vsftpd.pam b/vsftpd.pam old mode 100644 new mode 100755 diff --git a/vsftpd.service b/vsftpd.service old mode 100644 new mode 100755 diff --git a/vsftpd.spec b/vsftpd.spec old mode 100644 new mode 100755 index 6277288..a235e73 --- a/vsftpd.spec +++ b/vsftpd.spec @@ -2,7 +2,7 @@ Name: vsftpd Version: 3.0.3 -Release: 33%{?dist} +Release: 34%{?dist} Summary: Very Secure Ftp Daemon Group: System Environment/Daemons @@ -95,6 +95,7 @@ Patch63: 0002-Repeat-pututxline-if-it-fails-with-EINTR.patch Patch64: 0003-Repeat-pututxline-until-it-succeeds-if-it-fails-with.patch Patch65: 0001-Fix-timestamp-handling-in-MDTM.patch Patch66: 0001-Remove-a-hint-about-the-ftp_home_dir-SELinux-boolean.patch +Patch67: vsftpd-3.0.3-enable_wc_logs-replace_unprintable_with_hex.patch %description vsftpd is a Very Secure FTP daemon. It was written completely from @@ -163,6 +164,11 @@ mkdir -p $RPM_BUILD_ROOT/%{_var}/ftp/pub %{_var}/ftp %changelog +* Mon Apr 12 2021 Artem Egorenkov - 3.0.3-33 +- Enable support for wide-character strings in logs +- Replace unprintables with HEX code, not question marks +- Resolves: rhbz#1947900 + * Mon Nov 02 2020 Artem Egorenkov - 3.0.3-33 - Unit files fixed "After=network-online.target" - Resolves: rhbz#1893636 diff --git a/vsftpd.target b/vsftpd.target old mode 100644 new mode 100755 diff --git a/vsftpd.user_list b/vsftpd.user_list old mode 100644 new mode 100755 diff --git a/vsftpd.xinetd b/vsftpd.xinetd old mode 100644 new mode 100755 diff --git a/vsftpd@.service b/vsftpd@.service old mode 100644 new mode 100755 -- Gitee