[vhffs-dev] [774] Add patches used by TuxFamily on third party softwares

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


Revision: 774
Author:   gradator
Date:     2007-08-27 11:53:58 +0000 (Mon, 27 Aug 2007)

Log Message:
-----------
Add patches used by TuxFamily on third party softwares

Added Paths:
-----------
    trunk/vhffs-packages/patches/
    trunk/vhffs-packages/patches/mysql-username-len.patch
    trunk/vhffs-packages/patches/pureftpd-customerproof-tf.patch
    trunk/vhffs-packages/patches/pureftpd-passivemodeandssl.patch


Added: trunk/vhffs-packages/patches/mysql-username-len.patch
===================================================================
--- trunk/vhffs-packages/patches/mysql-username-len.patch	                        (rev 0)
+++ trunk/vhffs-packages/patches/mysql-username-len.patch	2007-08-27 11:53:58 UTC (rev 774)
@@ -0,0 +1,14 @@
+diff -Nru a/include/mysql_com.h b/include/mysql_com.h
+--- a/include/mysql_com.h	2004-09-07 00:29:46.000000000 +0200
++++ b/include/mysql_com.h	2004-11-07 23:33:36.000000000 +0100
+@@ -22,8 +22,8 @@
+ #define _mysql_com_h
+ 
+ #define NAME_LEN	64		/* Field/table name length */
+-#define HOSTNAME_LENGTH 60
+-#define USERNAME_LENGTH 16
++#define HOSTNAME_LENGTH 64
++#define USERNAME_LENGTH 128
+ #define SERVER_VERSION_LENGTH 60
+ 
+ #define LOCAL_HOST	"localhost"

Added: trunk/vhffs-packages/patches/pureftpd-customerproof-tf.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd-customerproof-tf.patch	                        (rev 0)
+++ trunk/vhffs-packages/patches/pureftpd-customerproof-tf.patch	2007-08-27 11:53:58 UTC (rev 774)
@@ -0,0 +1,32 @@
+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 @@
+ # 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, and 0400 on files
++    else if (be_customer_proof != 0) {
++        mode |= (S_ISDIR(st2.st_mode) ? 02700 : 0400);
++    }
++// TF PATCH: end
++
+     if (fchmod(fd, mode) < 0 && chmod(name, mode) < 0) {
+         failure:
+         if (fd != -1) {
+@@ -3362,6 +3367,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);
+     }
+ #ifdef QUOTAS

Added: trunk/vhffs-packages/patches/pureftpd-passivemodeandssl.patch
===================================================================
--- trunk/vhffs-packages/patches/pureftpd-passivemodeandssl.patch	                        (rev 0)
+++ trunk/vhffs-packages/patches/pureftpd-passivemodeandssl.patch	2007-08-27 11:53:58 UTC (rev 774)
@@ -0,0 +1,20 @@
+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/