diff options
Diffstat (limited to 'dev-db/mysqlcc/files/mysqlcc-0.8.7-configperms.patch')
-rw-r--r-- | dev-db/mysqlcc/files/mysqlcc-0.8.7-configperms.patch | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/dev-db/mysqlcc/files/mysqlcc-0.8.7-configperms.patch b/dev-db/mysqlcc/files/mysqlcc-0.8.7-configperms.patch deleted file mode 100644 index c3f97aaa93b3..000000000000 --- a/dev-db/mysqlcc/files/mysqlcc-0.8.7-configperms.patch +++ /dev/null @@ -1,51 +0,0 @@ -# This is an attempt to backport the security fix for leaving config -# files and directories world-readable that was originally applied in -# 0.8.9. 0.8.7 seems to be the last version that will compile without -# MySQL 4. -# Robert Coie <rac@gentoo.org> 2003.03.09 - ---- src/CConfig.cpp.orig 2003-03-09 13:25:08.000000000 -0800 -+++ src/CConfig.cpp 2003-03-09 13:27:19.000000000 -0800 -@@ -20,6 +20,12 @@ - #include <qdir.h> - #include <qstringlist.h> - #include <qfile.h> -+ -+#ifndef WIN32 -+#include <sys/types.h> -+#include <sys/stat.h> -+#endif -+ - #include "globals.h" - #include "config.h" - -@@ -183,6 +189,14 @@ - for (QMap<QString, QString>::Iterator it = entries.begin(); it != entries.end(); ++it) - t_strm << it.key() << "\t=\t" << it.data() << "\r\n"; - f_strm.close(); -+#ifndef WIN32 -+ if (chmod(absoluteConfigFileName, S_IRUSR | S_IWUSR) != 0) -+ { -+#ifdef DEBUG -+ qDebug("CConfig::save() - Coudn't set mode 600 for" + absoluteConfigFileName); -+#endif -+ } -+#endif - return true; - } - else -@@ -312,6 +326,14 @@ - #ifdef DEBUG - qDebug("private static CConfig::createDirectory() - " + d + " was created successfully."); - #endif -+#ifndef WIN32 -+ if (chmod(d, S_IRUSR | S_IWUSR | S_IXUSR) != 0) -+ { -+#ifdef DEBUG -+ qDebug("private static CConfig::createDirectory() - Coudn't set mode 700 for" + d); -+#endif -+ } -+#endif - return true; - } - else |