File: 142-CVE-2008-5624.patch

package info (click to toggle)
php5 5.2.0%2Bdfsg-8%2Betch16
  • links: PTS
  • area: main
  • in suites: etch
  • size: 58,940 kB
  • ctags: 45,388
  • sloc: ansic: 533,605; sh: 17,835; php: 11,336; cpp: 4,289; xml: 3,809; yacc: 2,446; lex: 2,174; makefile: 1,150; tcl: 1,128; awk: 693; perl: 71; sql: 22; pascal: 15
file content (44 lines) | stat: -rw-r--r-- 1,193 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
proper initialization for uid/gid in apache sapis.
downloaded from
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.78&r2=1.725.2.31.2.79&view=patch
http://cvs.php.net/viewvc.cgi/php-src/sapi/apache/mod_php5.c?r1=1.19.2.7.2.15&r2=1.19.2.7.2.16&view=patch
--- old/ext/standard/basic_functions.c
+++ new/ext/standard/basic_functions.c
@@ -3919,6 +3919,8 @@ static void basic_globals_ctor(php_basic
 	memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
 #endif
 	BG(incomplete_class) = incomplete_class_entry;
+	BG(page_uid) = -1;
+	BG(page_gid) = -1;
 }
 
 
@@ -4221,6 +4223,8 @@ PHP_RSHUTDOWN_FUNCTION(basic)
 
 	PHP_RSHUTDOWN(user_filters)(SHUTDOWN_FUNC_ARGS_PASSTHRU);
 	
+	BG(page_uid) = -1;
+	BG(page_gid) = -1;
 	return SUCCESS;
 }
 
--- old/sapi/apache/mod_php5.c	2008/11/24 22:18:25	1.19.2.7.2.15
+++ new/sapi/apache/mod_php5.c	2008/11/28 23:22:39	1.19.2.7.2.16
@@ -597,6 +597,8 @@
 		return OK;
 	}
 
+	SG(server_context) = r;
+
 	zend_first_try {
 
 		/* Make sure file exists */
@@ -654,8 +656,6 @@
 		/* Init timeout */
 		hard_timeout("send", r);
 
-		SG(server_context) = r;
-		
 		php_save_umask();
 		add_common_vars(r);
 		add_cgi_vars(r);