SOURCES: php-ini-search-path.patch (NEW) - leave searching for ini...

glen glen at pld-linux.org
Tue Jan 17 16:05:45 CET 2006


Author: glen                         Date: Tue Jan 17 15:05:45 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- leave searching for ini file from insecure and unexpected locations to WINDOWS OS

---- Files affected:
SOURCES:
   php-ini-search-path.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/php-ini-search-path.patch
diff -u /dev/null SOURCES/php-ini-search-path.patch:1.1
--- /dev/null	Tue Jan 17 16:05:45 2006
+++ SOURCES/php-ini-search-path.patch	Tue Jan 17 16:05:40 2006
@@ -0,0 +1,36 @@
+see also http://bugs.php.net/bug.php?id=34793
+--- php-5.1.2/main/php_ini.c~	2006-01-12 23:46:12.000000000 +0200
++++ php-5.1.2/main/php_ini.c	2006-01-17 17:01:16.000000000 +0200
+@@ -330,6 +330,7 @@
+ 			strcat(php_ini_search_path, env_location);
+ 		}
+ 
++#ifdef PHP_WIN32
+ 		/* Add cwd (only with CLI) */
+ 		if (strcmp(sapi_module.name, "cli") == 0) {
+ 			if (*php_ini_search_path) {
+@@ -339,7 +340,6 @@
+ 		}
+ 
+ 		/* Add binary directory */
+-#ifdef PHP_WIN32
+ 		binary_location = (char *) emalloc(MAXPATHLEN);
+ 		if (GetModuleFileName(0, binary_location, MAXPATHLEN) == 0) {
+ 			efree(binary_location);
+@@ -356,6 +356,8 @@
+ 			binary_location = NULL;
+ 		}
+ #endif
++
++#ifdef PHP_WIN32
+ 		if (binary_location) {
+ 			char *separator_location = strrchr(binary_location, DEFAULT_SLASH);
+ 			
+@@ -370,7 +372,6 @@
+ 		}
+ 
+ 		/* Add default location */
+-#ifdef PHP_WIN32
+ 		default_location = (char *) emalloc(MAXPATHLEN + 1);
+ 	
+ 		if (0 < GetWindowsDirectory(default_location, MAXPATHLEN)) {
================================================================


More information about the pld-cvs-commit mailing list