diff --git a/modules.conf b/modules.conf index 87d8b32c072ecf1b412eab9729c35edae66dee5d..3e343ae9cc518577faf065cec3df768b27c4ae25 100644 --- a/modules.conf +++ b/modules.conf @@ -171,6 +171,10 @@ LoadModule mod_vroot.c LoadModule mod_qos.c +# Attempt to generate a unique ID for every FTP session +# (http://www.proftpd.org/docs/contrib/mod_unique_id.html) +# LoadModule mod_unique_id.c +# # Provide a flexible way of specifying that certain configuration directives # only apply to certain sessions, based on credentials such as connection # class, user, or group membership diff --git a/proftpd-1.3.7a-Adjusting-unit-test-timeouts-for-netacl.patch b/proftpd-1.3.7a-Adjusting-unit-test-timeouts-for-netacl.patch deleted file mode 100644 index 288c2bc08dc12c378c25d5604662115e4542683b..0000000000000000000000000000000000000000 --- a/proftpd-1.3.7a-Adjusting-unit-test-timeouts-for-netacl.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 27d632208163a73a0501e595fcdef0302cb44d8c Mon Sep 17 00:00:00 2001 -From: eaglegai -Date: Tue, 1 Jun 2021 17:21:55 +0800 -Subject: [PATCH] proftpd 1.3.7a Adjusting unit test timeouts for netacl - ---- - tests/api/netacl.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/tests/api/netacl.c b/tests/api/netacl.c -index c4da486..86b628d 100644 ---- a/tests/api/netacl.c -+++ b/tests/api/netacl.c -@@ -894,6 +894,8 @@ Suite *tests_get_netacl_suite(void) { - tcase_add_test(testcase, netacl_match_test); - tcase_add_test(testcase, netacl_get_negated_test); - -+ tcase_set_timeout(testcase, 60); -+ - suite_add_tcase(suite, testcase); - return suite; - } --- -1.8.3.1 - diff --git a/proftpd-1.3.7a-fix-environment-sensitive-tests-failure.patch b/proftpd-1.3.7a-fix-environment-sensitive-tests-failure.patch deleted file mode 100644 index 0b05eb3c2e8d51aabd99a2cfe45e1a33c17a9293..0000000000000000000000000000000000000000 --- a/proftpd-1.3.7a-fix-environment-sensitive-tests-failure.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -ruNa proftpd-1.3.7a/tests/api/netacl.c proftpd-1.3.7a-fix/tests/api/netacl.c ---- proftpd-1.3.7a/tests/api/netacl.c 2020-07-22 01:25:51.000000000 +0800 -+++ proftpd-1.3.7a-fix/tests/api/netacl.c 2021-01-13 14:44:00.679322360 +0800 -@@ -773,8 +773,10 @@ - res = pr_netacl_match(acl, addr); - if (getenv("CI") == NULL && - getenv("TRAVIS") == NULL) { -- fail_unless(res == 1, "Failed to positively match ACL to addr: %s", -- strerror(errno)); -+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { -+ fail_unless(res == 1, "Failed to positively match ACL to addr: %s", -+ strerror(errno)); -+ } - } - - if (!have_localdomain) { -@@ -790,8 +790,10 @@ - res = pr_netacl_match(acl, addr); - if (getenv("CI") == NULL && - getenv("TRAVIS") == NULL) { -- fail_unless(res == -1, "Failed to negatively match ACL to addr: %s", -- strerror(errno)); -+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { -+ fail_unless(res == -1, "Failed to negatively match ACL to addr: %s", -+ strerror(errno)); -+ } - } - - acl_str = "!www.google.com"; -@@ -816,8 +816,10 @@ - res = pr_netacl_match(acl, addr); - if (getenv("CI") == NULL && - getenv("TRAVIS") == NULL) { -- fail_unless(res == 1, "Failed to positively match ACL to addr: %s", -- strerror(errno)); -+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { -+ fail_unless(res == 1, "Failed to positively match ACL to addr: %s", -+ strerror(errno)); -+ } - } - - if (!have_localdomain) { -@@ -833,8 +835,10 @@ - res = pr_netacl_match(acl, addr); - if (getenv("CI") == NULL && - getenv("TRAVIS") == NULL) { -- fail_unless(res == -1, "Failed to negatively match ACL to addr: %s", -- strerror(errno)); -+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { -+ fail_unless(res == -1, "Failed to negatively match ACL to addr: %s", -+ strerror(errno)); -+ } - } - - acl_str = "!www.g*g.com"; -diff -ruNa proftpd-1.3.7a/tests/api/netaddr.c proftpd-1.3.7a-fix/tests/api/netaddr.c ---- proftpd-1.3.7a/tests/api/netaddr.c 2021-01-13 14:30:47.467322360 +0800 -+++ proftpd-1.3.7a-fix/tests/api/netaddr.c 2021-01-13 14:42:45.851322360 +0800 -@@ -417,7 +417,9 @@ - if (getenv("CI") == NULL && - getenv("TRAVIS") == NULL) { - /* This test is sensitive the environment. */ -- fail_unless(res == TRUE, "Expected TRUE, got %d", res); -+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { -+ fail_unless(res == TRUE, "Expected TRUE, got %d", res); -+ } - } - - flags = PR_NETADDR_MATCH_IP; -@@ -879,9 +881,11 @@ - if (getenv("CI") == NULL && - getenv("TRAVIS") == NULL) { - /* This test is sensitive the environment. */ -- fail_unless(strcmp(res, "localhost") == 0 || -- strcmp(res, "localhost.localdomain") == 0, -- "Expected '%s', got '%s'", "localhost or localhost.localdomain", res); -+ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { -+ fail_unless(strcmp(res, "localhost") == 0 || -+ strcmp(res, "localhost.localdomain") == 0, -+ "Expected '%s', got '%s'", "localhost or localhost.localdomain", res); -+ } - } - } - END_TEST diff --git a/proftpd-1.3.8-fix-environment-sensitive-tests-failure.patch b/proftpd-1.3.8-fix-environment-sensitive-tests-failure.patch new file mode 100644 index 0000000000000000000000000000000000000000..5620f80e5f4fdc17794caa4edc8935b69c7de175 --- /dev/null +++ b/proftpd-1.3.8-fix-environment-sensitive-tests-failure.patch @@ -0,0 +1,105 @@ +From cb0e408e8b82fa8c198d9dd95e5818d8431e9fd5 Mon Sep 17 00:00:00 2001 +From: chen-jan +Date: Tue, 11 Apr 2023 16:55:34 +0800 +Subject: [PATCH] proftpd-1.3.8-fix-environment-sensitive-tests-failure + +--- + tests/api/netacl.c | 8 ++++++++ + tests/api/netaddr.c | 6 ++++++ + 2 files changed, 14 insertions(+) + +diff --git a/tests/api/netacl.c b/tests/api/netacl.c +index e4b0431..b91ecdb 100644 +--- a/tests/api/netacl.c ++++ b/tests/api/netacl.c +@@ -775,8 +775,10 @@ START_TEST (netacl_match_test) { + res = pr_netacl_match(acl, addr); + if (getenv("CI") == NULL && + getenv("TRAVIS") == NULL) { ++ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { + ck_assert_msg(res == 1, "Failed to positively match ACL to addr: %s", + strerror(errno)); ++ } + } + + if (!have_localdomain) { +@@ -793,8 +795,10 @@ START_TEST (netacl_match_test) { + res = pr_netacl_match(acl, addr); + if (getenv("CI") == NULL && + getenv("TRAVIS") == NULL) { ++ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { + ck_assert_msg(res == -1, "Failed to negatively match ACL to addr: %s", + strerror(errno)); ++ } + } + + acl_str = "!www.google.com"; +@@ -820,8 +824,10 @@ START_TEST (netacl_match_test) { + res = pr_netacl_match(acl, addr); + if (getenv("CI") == NULL && + getenv("TRAVIS") == NULL) { ++ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { + ck_assert_msg(res == 1, "Failed to positively match ACL to addr: %s", + strerror(errno)); ++ } + } + + if (!have_localdomain) { +@@ -838,8 +844,10 @@ START_TEST (netacl_match_test) { + res = pr_netacl_match(acl, addr); + if (getenv("CI") == NULL && + getenv("TRAVIS") == NULL) { ++ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { + ck_assert_msg(res == -1, "Failed to negatively match ACL to addr: %s", + strerror(errno)); ++ } + } + + acl_str = "!www.g*g.com"; +diff --git a/tests/api/netaddr.c b/tests/api/netaddr.c +index e79b06c..b7dbeaf 100644 +--- a/tests/api/netaddr.c ++++ b/tests/api/netaddr.c +@@ -424,8 +424,10 @@ START_TEST (netaddr_fnmatch_test) { + res = pr_netaddr_fnmatch(addr, "LOCAL*", flags); + if (getenv("CI") == NULL && + getenv("TRAVIS") == NULL) { ++ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { + /* This test is sensitive the environment. */ + ck_assert_msg(res == TRUE, "Expected TRUE, got %d", res); ++ } + } + + flags = PR_NETADDR_MATCH_IP; +@@ -887,10 +889,12 @@ START_TEST (netaddr_get_dnsstr_test) { + */ + if (getenv("CI") == NULL && + getenv("TRAVIS") == NULL) { ++ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { + /* This test is sensitive the environment. */ + ck_assert_msg(strcmp(res, "localhost") == 0 || + strcmp(res, "localhost.localdomain") == 0, + "Expected '%s', got '%s'", "localhost or localhost.localdomain", res); ++ } + } + } + END_TEST +@@ -1011,6 +1015,7 @@ START_TEST (netaddr_get_dnsstr_ipv6_test) { + */ + if (getenv("CI") == NULL && + getenv("TRAVIS") == NULL) { ++ if(strcmp(getenv("HOSTNAME"), "localhost") == 0 || strcmp(getenv("HOSTNAME"), "localhost.localdomain") == 0) { + ck_assert_msg(strcmp(res, "localhost") == 0 || + strcmp(res, "localhost.localdomain") == 0 || + strcmp(res, "localhost6") == 0 || +@@ -1019,6 +1024,7 @@ START_TEST (netaddr_get_dnsstr_ipv6_test) { + strcmp(res, "ip6-loopback") == 0 || + strcmp(res, ip) == 0, + "Expected '%s', got '%s'", "localhost, localhost.localdomain et al", res); ++ } + } + } + END_TEST +-- +2.39.1 + diff --git a/proftpd-1.3.7-shellbang.patch b/proftpd-1.3.8-shellbang.patch similarity index 95% rename from proftpd-1.3.7-shellbang.patch rename to proftpd-1.3.8-shellbang.patch index 53b32e13825c77c1729132f3a5b9bb841f3284d3..e0762822d7c20990ba4fa4a167fbd0e1b5afe808 100644 --- a/proftpd-1.3.7-shellbang.patch +++ b/proftpd-1.3.8-shellbang.patch @@ -4,7 +4,7 @@ -#!/usr/bin/env perl +#!/usr/bin/perl # --------------------------------------------------------------------------- - # Copyright (C) 2000-2020 TJ Saunders + # Copyright (C) 2000-2021 TJ Saunders # --- contrib/ftpmail +++ contrib/ftpmail diff --git a/proftpd-1.3.7c.tar.gz b/proftpd-1.3.8b.tar.gz similarity index 68% rename from proftpd-1.3.7c.tar.gz rename to proftpd-1.3.8b.tar.gz index c3e8c92983d16295baae6be439683d22cefc6b3d..f40ee8b92726e47a6ffe91d339ce46f0bda4cb4e 100644 Binary files a/proftpd-1.3.7c.tar.gz and b/proftpd-1.3.8b.tar.gz differ diff --git a/proftpd.spec b/proftpd.spec index 6aebc2dd29181c6bc4c773bd5a0b99ae83e06c56..d5a1fee44bdfc02e78af91c382ced22b01c2cb3f 100644 --- a/proftpd.spec +++ b/proftpd.spec @@ -16,13 +16,13 @@ # Dynamic modules contain references to symbols in main daemon, so we need to disable linker checks for undefined symbols %undefine _strict_symbol_defs_build -%global mod_vroot_version 0.9.9 +%global mod_vroot_version 0.9.11 %global vendor %{?_vendor:%{_vendor}}%{!?_vendor:openEuler} Name: proftpd -Version: 1.3.7c -Release: 4 +Version: 1.3.8b +Release: 1 Summary: Flexible, stable and highly-configurable FTP server License: GPLv2+ URL: http://www.proftpd.org/ @@ -38,14 +38,13 @@ Source8: proftpd-welcome.msg Source9: proftpd.sysconfig Source10: http://github.com/Castaglia/proftpd-mod_vroot/archive/v%{mod_vroot_version}.tar.gz -Patch1: proftpd-1.3.7-shellbang.patch +Patch1: proftpd-1.3.8-shellbang.patch Patch2: proftpd.conf-no-memcached.patch Patch3: proftpd-1.3.4rc1-mod_vroot-test.patch Patch4: proftpd-1.3.6-no-mod-wrap.patch Patch5: proftpd-1.3.6-no-mod-geoip.patch Patch6: proftpd-1.3.7rc3-logging-not-systemd.patch -Patch7: proftpd-1.3.7a-Adjusting-unit-test-timeouts-for-netacl.patch -Patch8: proftpd-1.3.7a-fix-environment-sensitive-tests-failure.patch +Patch8: proftpd-1.3.8-fix-environment-sensitive-tests-failure.patch BuildRequires: coreutils BuildRequires: gcc @@ -70,6 +69,10 @@ BuildRequires: sqlite-devel BuildRequires: tar BuildRequires: zlib-devel BuildRequires: chrpath +BuildRequires: libidn2-devel +BuildRequires: libmemcached-devel >= 0.41 +BuildRequires: pcre2-devel >= 10.30 +BuildRequires: tcp_wrappers-devel # Test suite requirements BuildRequires: check-devel @@ -143,6 +146,10 @@ Requires: postgresql-devel %endif Requires: sqlite-devel Requires: zlib-devel +Requires: libmemcached-devel >= 0.41 +Requires: pcre2-devel >= 10.30 +Requires: tcp_wrappers-devel + %description devel This package is required to build additional modules for ProFTPD. @@ -242,7 +249,6 @@ sed -i -e '/killall/s/test.*/systemctl reload proftpd.service/' \ %patch6 %endif -%patch7 -p1 %patch8 -p1 # Avoid docfile dependencies @@ -272,6 +278,8 @@ SMOD7=mod_unique_id --libexecdir="%{_libexecdir}/proftpd" \ --localstatedir="%{rundir}/proftpd" \ --disable-strip \ + --enable-memcache \ + --enable-pcre2 \ --enable-ctrls \ --enable-dso \ --enable-facl \ @@ -527,6 +535,12 @@ fi %{_mandir}/man1/ftpwho.1* %changelog +* Tue Dec 26 2023 wangkai <13474090681@163.com> - 1.3.8b-1 +- Update to 1.3.8b for fix CVE-2023-51713,CVE-2023-48795 + +* Tue Apr 11 2023 chenchen - 1.3.8-1 +- Update to 1.3.8 + * Fri Nov 18 2022 caodongxia - 1.3.7c-4 - Replace openEuler with vendor macro diff --git a/v0.9.11.tar.gz b/v0.9.11.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e811e1946fc7f738c3daa41594803db1e90cc2cb Binary files /dev/null and b/v0.9.11.tar.gz differ diff --git a/v0.9.9.tar.gz b/v0.9.9.tar.gz deleted file mode 100644 index 64915926fbf3f4050a0a7271807f2ecf6dbb0cb0..0000000000000000000000000000000000000000 Binary files a/v0.9.9.tar.gz and /dev/null differ