cvs: php4(PHP_4_3) /main safe_mode.c

From: Date: Thu, 09 Jan 2003 22:34:27 +0000
Subject: cvs: php4(PHP_4_3) /main safe_mode.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-17773@lists.php.net to get a copy of this message
iliaa Thu Jan 9 17:34:27 2003 EDT Modified files: (Branch: PHP_4_3) /php4/main safe_mode.c Log: MFH Index: php4/main/safe_mode.c diff -u php4/main/safe_mode.c:1.51.2.2 php4/main/safe_mode.c:1.51.2.3 --- php4/main/safe_mode.c:1.51.2.2 Thu Jan 9 17:29:02 2003 +++ php4/main/safe_mode.c Thu Jan 9 17:34:27 2003 @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: safe_mode.c,v 1.51.2.2 2003/01/09 22:29:02 pollita Exp $ */ +/* $Id: safe_mode.c,v 1.51.2.3 2003/01/09 22:34:27 iliaa Exp $ */ #include "php.h" @@ -85,12 +85,12 @@ ret = VCWD_STAT(path, &sb); if (ret < 0) { if (mode == CHECKUID_DISALLOW_FILE_NOT_EXISTS) { - if (flags & CHECKUID_NO_ERRORS == 0) { + if ((flags & CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to access %s", filename); } return 0; } else if (mode == CHECKUID_ALLOW_FILE_NOT_EXISTS) { - if (flags & CHECKUID_NO_ERRORS == 0) { + if ((flags & CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to access %s", filename); } return 1; @@ -133,7 +133,7 @@ /* check directory */ ret = VCWD_STAT(path, &sb); if (ret < 0) { - if (flags & CHECKUID_NO_ERRORS == 0) { + if ((flags & CHECKUID_NO_ERRORS) == 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to access %s", filename); } return 0; @@ -169,7 +169,7 @@ filename = path; } - if (flags & CHECKUID_NO_ERRORS == 0) { + if ((flags & CHECKUID_NO_ERRORS) == 0) { if (PG(safe_mode_gid)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "SAFE MODE Restriction in effect. The script whose uid/gid is %ld/%ld is not allowed to access %s owned by uid/gid %ld/%ld", php_getuid(), php_getgid(), filename, uid, gid); } else {

« previous php.cvs (#17773) next »