diff options
| author | Zeev Suraski <zeev@php.net> | 2000-02-10 17:26:57 +0000 |
|---|---|---|
| committer | Zeev Suraski <zeev@php.net> | 2000-02-10 17:26:57 +0000 |
| commit | 7d926a0e0c0862b4469200b5ebb7cc85c263b2dc (patch) | |
| tree | 01b0f0522ad4a4e3b2929e03b9985b3bfa57fc76 /main/safe_mode.c | |
| parent | ec0e2d7312ba5e55bb4ffb2f35b72e19a48ee89a (diff) | |
| download | php-git-7d926a0e0c0862b4469200b5ebb7cc85c263b2dc.tar.gz | |
More cleanup...
Diffstat (limited to 'main/safe_mode.c')
| -rw-r--r-- | main/safe_mode.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/main/safe_mode.c b/main/safe_mode.c index 9704d856f9..fea75ed5c8 100644 --- a/main/safe_mode.c +++ b/main/safe_mode.c @@ -110,9 +110,6 @@ PHPAPI int php_checkuid(const char *fn, int mode) { PHPAPI char *php_get_current_user() { -#if CGI_BINARY || USE_SAPI || FHTTPD - struct stat statbuf; -#endif struct passwd *pwd; int uid; SLS_FETCH(); @@ -124,15 +121,12 @@ PHPAPI char *php_get_current_user() /* FIXME: I need to have this somehow handled if USE_SAPI is defined, because cgi will also be interfaced in USE_SAPI */ -#if CGI_BINARY || USE_SAPI || FHTTPD - if (!SG(request_info).path_translated || (stat(SG(request_info).path_translated,&statbuf)==-1)) { + + uid = sapi_get_uid(); + + if (uid==-1) { return empty_string; } - uid = statbuf.st_uid; -#endif -#if APACHE - uid = ((request_rec *) SG(server_context))->finfo.st_uid; -#endif if ((pwd=getpwuid(uid))==NULL) { return empty_string; |
