[vhffs-dev] [1595] ported patchs to pureftpd 1.0.29, improved customer proof patch ( clear specials modes on files, only allow and force sgid for directories, clear o+w on files and directories), removed patch to allow ssl when a passive IP is forced ( not necessary anymore), added a patch to allow ESTP when a passive IP is forced (ok, I don' t know any FTP client that use ESTP yet, I won't ever test if it works)

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1595
Author:   gradator
Date:     2010-04-12 19:21:30 +0200 (Mon, 12 Apr 2010)
Log Message:
-----------
ported patchs to pureftpd 1.0.29, improved customer proof patch (clear specials modes on files, only allow and force sgid for directories, clear o+w on files and directories), removed patch to allow ssl when a passive IP is forced (not necessary anymore), added a patch to allow ESTP when a passive IP is forced (ok, I don't know any FTP client that use ESTP yet, I won't ever test if it works)

Modified Paths:
--------------
    trunk/vhffs-packages/patches/pureftpd/customerproof-tf.patch

Added Paths:
-----------
    trunk/vhffs-packages/patches/pureftpd/estpandpassive.patch

Removed Paths:
-------------
    trunk/vhffs-packages/patches/pureftpd/passivemodeandssl.patch

Modified: trunk/vhffs-packages/patches/pureftpd/customerproof-tf.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd/customerproof-tf.patch	2010-04-10 01:18:58 UTC (rev 1594)
+++ trunk/vhffs-packages/patches/pureftpd/customerproof-tf.patch	2010-04-12 17:21:30 UTC (rev 1595)
@@ -1,7 +1,7 @@
-diff -Nru a/src/ftpd.c b/src/ftpd.c
---- a/src/ftpd.c	2006-09-30 18:40:57.000000000 +0200
-+++ b/src/ftpd.c	2006-09-30 18:40:45.000000000 +0200
-@@ -2499,9 +2499,14 @@
+diff -Nru pure-ftpd-1.0.29.a/src/ftpd.c pure-ftpd-1.0.29.b/src/ftpd.c
+--- pure-ftpd-1.0.29.a/src/ftpd.c	2010-04-12 15:30:20.000000000 +0200
++++ pure-ftpd-1.0.29.b/src/ftpd.c	2010-04-12 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;
@@ -9,16 +9,22 @@
 -        mode |= (S_ISDIR(st2.st_mode) ? 0700 : 0600);
      }
 +
-+// TF PATCH: forces 02700 on dir, and 0400 on files
++// TF PATCH: forces 02700 on dir, 00400 on files, remove 05002 on dir, remove 07002 on files
 +    else if (be_customer_proof != 0) {
-+        mode |= (S_ISDIR(st2.st_mode) ? 02700 : 0400);
++	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) {
-@@ -3362,6 +3367,11 @@
+@@ -3570,6 +3581,11 @@
  #endif
          error(550, MSG_MKD_FAILURE);
      } else {
@@ -28,5 +34,5 @@
 +	// TF PATCH: end
 +
          addreply(257, "\"%s\" : " MSG_MKD_SUCCESS, name);
-     }
- #ifdef QUOTAS
+ #ifndef MINIMAL
+         cwd_failures = 0UL;

Added: trunk/vhffs-packages/patches/pureftpd/estpandpassive.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd/estpandpassive.patch	                        (rev 0)
+++ trunk/vhffs-packages/patches/pureftpd/estpandpassive.patch	2010-04-12 17:21:30 UTC (rev 1595)
@@ -0,0 +1,21 @@
+diff -Nru pure-ftpd-1.0.29.a/src/ftpd.c pure-ftpd-1.0.29.b/src/ftpd.c
+--- pure-ftpd-1.0.29.a/src/ftpd.c	2010-03-15 16:42:57.000000000 +0100
++++ pure-ftpd-1.0.29.b/src/ftpd.c	2010-04-12 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.");
+ }

Deleted: trunk/vhffs-packages/patches/pureftpd/passivemodeandssl.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd/passivemodeandssl.patch	2010-04-10 01:18:58 UTC (rev 1594)
+++ trunk/vhffs-packages/patches/pureftpd/passivemodeandssl.patch	2010-04-12 17:21:30 UTC (rev 1595)
@@ -1,20 +0,0 @@
-diff -Nru a/src/ftpd.c b/src/ftpd.c
---- a/src/ftpd.c	2007-06-02 01:37:14.000000000 +0000
-+++ b/src/ftpd.c	2007-06-02 01:49:57.000000000 +0000
-@@ -3443,11 +3443,11 @@
-     if (disallow_passive != 0) {
-         feat[sizeof FEAT FEAT_DEBUG FEAT_TVFS FEAT_ESTP] = 0;
-     }
--#ifndef MINIMAL
--    else if (STORAGE_FAMILY(force_passive_ip) != 0) {
--        feat[sizeof FEAT FEAT_DEBUG FEAT_TVFS FEAT_ESTP FEAT_PASV] = 0;
--    }
--#endif
-+// TF PATCH: disable the disabling of ssl when a passive ip is forced (a pool of forwarded ports makes passive mode working again)
-+//    else if (STORAGE_FAMILY(force_passive_ip) != 0) {
-+//        feat[sizeof FEAT FEAT_DEBUG FEAT_TVFS FEAT_ESTP FEAT_PASV] = 0;
-+//    }
-+// TF PATCH: end
-     addreply_noformat(0, feat);
-     addreply_noformat(211, "End.");
- }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/