Re: php

From: Date: Tue, 27 May 2003 13:26:24 +0000
Subject: Re: php
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-2036@lists.php.net to get a copy of this message
--On Tuesday, May 27, 2003 15:15:13 +0200 ohp@pyrenet.fr wrote:
Hi Larrry, After many many tests, I came with this php patch that works for me. I'm not subscribed to php-developpers (cause I can't find it and they dont really respond to bugtrack)\ It's now php-internals.
Could you please Have a look at it and submit it to them? I corrected 2 things: First is the flags=1 with allow a non-existent file if fopen mode <> '*' because it might be the case (you want to create it) thee the stry(path,filename) is because in case of error (file doesn't exist) path is not touched if it's the first run, you end up with a NULL path with in turns yields to other problems in the function. Here'the (small ) patch *** 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) { --
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)
-- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: ler@lerctr.org US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

« previous php.internals (#2036) next »