[vhffs-dev] [1901] ported pure-ftpd patches to pure-ftpd 1.0.32 |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 1901
Author: gradator
Date: 2011-07-31 00:28:55 +0200 (Sun, 31 Jul 2011)
Log Message:
-----------
ported pure-ftpd patches to pure-ftpd 1.0.32
Added Paths:
-----------
trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-customerproof-tf.patch
trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-estpandpassive.patch
Removed Paths:
-------------
trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-customerproof-tf.patch
trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-estpandpassive.patch
Deleted: trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-customerproof-tf.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-customerproof-tf.patch 2011-07-28 21:39:03 UTC (rev 1900)
+++ trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-customerproof-tf.patch 2011-07-30 22:28:55 UTC (rev 1901)
@@ -1,38 +0,0 @@
-diff -Nru pure-ftpd-1.0.30.a/src/ftpd.c pure-ftpd-1.0.30.b/src/ftpd.c
---- pure-ftpd-1.0.30.a/src/ftpd.c 2011-04-16 15:30:20.000000000 +0200
-+++ pure-ftpd-1.0.30.b/src/ftpd.c 2011-04-16 15:32:21.000000000 +0200
-@@ -2661,9 +2661,20 @@
- # endif
- if (st2.st_ino == root_st_ino && st2.st_dev == root_st_dev) {
- mode |= 0700;
-- } else if (be_customer_proof != 0) {
-- mode |= (S_ISDIR(st2.st_mode) ? 0700 : 0600);
- }
-+
-+// TF PATCH: forces 02700 on dir, 00400 on files, remove 05002 on dir, remove 07002 on files
-+ else if (be_customer_proof != 0) {
-+ if( S_ISDIR(st2.st_mode) ) {
-+ mode &= 02775;
-+ mode |= 02700;
-+ } else {
-+ mode &= 00775;
-+ mode |= 00400;
-+ }
-+ }
-+// TF PATCH: end
-+
- if (fchmod(fd, mode) < 0 && chmod(name, mode) < 0) {
- failure:
- if (fd != -1) {
-@@ -3570,6 +3581,11 @@
- #endif
- error(550, MSG_MKD_FAILURE);
- } else {
-+
-+ // TF PATCH: force SGID upon creation of directories
-+ chmod(name, (mode_t) (02777 & ~u_mask_d) );
-+ // TF PATCH: end
-+
- addreply(257, "\"%s\" : " MSG_MKD_SUCCESS, name);
- #ifndef MINIMAL
- cwd_failures = 0UL;
Deleted: trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-estpandpassive.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-estpandpassive.patch 2011-07-28 21:39:03 UTC (rev 1900)
+++ trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.30-estpandpassive.patch 2011-07-30 22:28:55 UTC (rev 1901)
@@ -1,21 +0,0 @@
-diff -Nru pure-ftpd-1.0.30.a/src/ftpd.c pure-ftpd-1.0.30.b/src/ftpd.c
---- pure-ftpd-1.0.30.a/src/ftpd.c 2011-04-16 16:42:57.000000000 +0100
-+++ pure-ftpd-1.0.30.b/src/ftpd.c 2011-04-16 00:03:15.000000000 +0200
-@@ -3654,11 +3654,12 @@
- if (disallow_passive != 0) {
- feat[sizeof FEAT FEAT_DEBUG FEAT_TLS FEAT_UTF8 FEAT_TVFS FEAT_ESTA] = 0;
- }
--# ifndef MINIMAL
-- else if (STORAGE_FAMILY(force_passive_ip) != 0) {
-- feat[sizeof FEAT FEAT_DEBUG FEAT_TLS FEAT_UTF8 FEAT_TVFS FEAT_ESTA FEAT_PASV] = 0;
-- }
--# endif
-+// TF PATCH: disable the disabling of ESTP when a passive ip is forced (ok, I don't know any FTP client that use ESTP, I won't ever test if it works)
-+//# ifndef MINIMAL
-+// else if (STORAGE_FAMILY(force_passive_ip) != 0) {
-+// feat[sizeof FEAT FEAT_DEBUG FEAT_TLS FEAT_UTF8 FEAT_TVFS FEAT_ESTA FEAT_PASV] = 0;
-+// }
-+//# endif
- addreply_noformat(0, feat);
- addreply_noformat(211, "End.");
- }
Added: trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-customerproof-tf.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-customerproof-tf.patch (rev 0)
+++ trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-customerproof-tf.patch 2011-07-30 22:28:55 UTC (rev 1901)
@@ -0,0 +1,38 @@
+diff -Nru a//src/ftpd.c pure-ftpd-1.0.32//src/ftpd.c
+--- a//src/ftpd.c 2011-04-17 15:17:39.000000000 +0000
++++ pure-ftpd-1.0.32//src/ftpd.c 2011-07-30 22:25:05.372865348 +0000
+@@ -2663,9 +2663,20 @@
+ # endif
+ if (st2.st_ino == root_st_ino && st2.st_dev == root_st_dev) {
+ mode |= 0700;
+- } else if (be_customer_proof != 0) {
+- mode |= (S_ISDIR(st2.st_mode) ? 0700 : 0600);
+ }
++
++// TF PATCH: forces 02700 on dir, 00400 on files, remove 05002 on dir, remove 07002 on files
++ else if (be_customer_proof != 0) {
++ if( S_ISDIR(st2.st_mode) ) {
++ mode &= 02775;
++ mode |= 02700;
++ } else {
++ mode &= 00775;
++ mode |= 00400;
++ }
++ }
++// TF PATCH: end
++
+ if (fchmod(fd, mode) < 0 && chmod(name, mode) < 0) {
+ failure:
+ if (fd != -1) {
+@@ -3572,6 +3583,11 @@
+ #endif
+ error(550, MSG_MKD_FAILURE);
+ } else {
++
++ // TF PATCH: force SGID upon creation of directories
++ chmod(name, (mode_t) (02777 & ~u_mask_d) );
++ // TF PATCH: end
++
+ addreply(257, "\"%s\" : " MSG_MKD_SUCCESS, name);
+ #ifndef MINIMAL
+ cwd_failures = 0UL;
Added: trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-estpandpassive.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-estpandpassive.patch (rev 0)
+++ trunk/vhffs-packages/patches/pureftpd/pure-ftpd-1.0.32-estpandpassive.patch 2011-07-30 22:28:55 UTC (rev 1901)
@@ -0,0 +1,21 @@
+diff -Nru a//src/ftpd.c pure-ftpd-1.0.32//src/ftpd.c
+--- a//src/ftpd.c 2011-07-30 22:25:05.372865348 +0000
++++ pure-ftpd-1.0.32//src/ftpd.c 2011-07-30 22:26:02.992078586 +0000
+@@ -3672,11 +3672,12 @@
+ if (disallow_passive != 0) {
+ feat[sizeof FEAT FEAT_DEBUG FEAT_TLS FEAT_UTF8 FEAT_TVFS FEAT_ESTA] = 0;
+ }
+-# ifndef MINIMAL
+- else if (STORAGE_FAMILY(force_passive_ip) != 0) {
+- feat[sizeof FEAT FEAT_DEBUG FEAT_TLS FEAT_UTF8 FEAT_TVFS FEAT_ESTA FEAT_PASV] = 0;
+- }
+-# endif
++// TF PATCH: disable the disabling of ESTP when a passive ip is forced (ok, I don't know any FTP client that use ESTP, I won't ever test if it works)
++//# ifndef MINIMAL
++// else if (STORAGE_FAMILY(force_passive_ip) != 0) {
++// feat[sizeof FEAT FEAT_DEBUG FEAT_TLS FEAT_UTF8 FEAT_TVFS FEAT_ESTA FEAT_PASV] = 0;
++// }
++//# endif
+ addreply_noformat(0, feat);
+ addreply_noformat(211, "End.");
+ }