diff options
author | Andi Gutmans <andi@php.net> | 2000-11-02 23:08:07 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-11-02 23:08:07 +0000 |
commit | d0ec3df2884f58b7d7defb2e6a43e6b060789805 (patch) | |
tree | 73593b33fce95e5c7bc734b7f29e6df82477dd72 /ext/standard/filestat.c | |
parent | e17df3a7bcfb6d408ae5db4ceff4b77c4efb9fe4 (diff) | |
download | php-git-d0ec3df2884f58b7d7defb2e6a43e6b060789805.tar.gz |
- Use CHECKUID_* #define's instead of cryptic numbers in php_checkuid()
- I did not test for validity of the actual php_checkuid() calls and there
- might be mistakes in the previous code.
Diffstat (limited to 'ext/standard/filestat.c')
-rw-r--r-- | ext/standard/filestat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index fa70990154..e845f4872e 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -252,7 +252,7 @@ PHP_FUNCTION(chgrp) gid = (*group)->value.lval; } - if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, 1))) { + if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, CHECKUID_ALLOW_FILE_NOT_EXISTS))) { RETURN_FALSE; } @@ -300,7 +300,7 @@ PHP_FUNCTION(chown) uid = (*user)->value.lval; } - if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, 1))) { + if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, CHECKUID_ALLOW_FILE_NOT_EXISTS))) { RETURN_FALSE; } @@ -334,7 +334,7 @@ PHP_FUNCTION(chmod) convert_to_string_ex(filename); convert_to_long_ex(mode); - if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, 1))) { + if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, CHECKUID_ALLOW_FILE_NOT_EXISTS))) { RETURN_FALSE; } @@ -397,7 +397,7 @@ PHP_FUNCTION(touch) } convert_to_string_ex(filename); - if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, 2))) { + if (PG(safe_mode) &&(!php_checkuid((*filename)->value.str.val, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { if (newtime) efree(newtime); RETURN_FALSE; } |