Hi everey one.
I've been hit by the fopen bug 21958 very badly so I decided to have a
look and came with this pch against 4.3.2RC4 safe_mode.c
Problem is no matter the permissions, you can't create a file with fopen
uner safe_mode on
My system is unixware 7.3.1 and php is an apache 1.3.27 module.
Can someone review this and tell me if it's ok. (it works for me)
*** main/safe_mode.c.orig lun mrs 17 14:50:23 2003
--- main/safe_mode.c mar mai 27 15:06:30 2003
*** 66,71 ****
--- 66,72 ----
mode = CHECKUID_DISALLOW_FILE_NOT_EXISTS;
} else {
mode = CHECKUID_CHECK_FILE_AND_DIR;
-
}flags=1; }
*** 81,86 ****
--- 82,88 ----
* If that fails, passthrough and check directory...
*/
if (mode != CHECKUID_ALLOW_ONLY_DIR) {
-
strcpy(path,filename); VCWD_REALPATH(filename, path); ret = VCWD_STAT(path, &sb); if (ret < 0) {
TIA
Olivier PRENANT Tel: +33-5-61-50-97-00 (Work)
Quartier d'Harraud Turrou +33-5-61-50-97-01 (Fax)
31190 AUTERIVE +33-6-07-63-80-64 (GSM)
FRANCE Email: ohp@pyrenet.fr
Make your life a dream, make your dream a reality. (St Exupery)