summaryrefslogtreecommitdiff
path: root/main/safe_mode.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>2000-02-10 18:19:04 +0000
committerZeev Suraski <zeev@php.net>2000-02-10 18:19:04 +0000
commit41f6bca92fc480df09ba0cc748342a03cbf539b3 (patch)
tree967e075451e94acbc73ad154a052ae410370b832 /main/safe_mode.c
parentaa50e6368a2d8f86b01e1eb930d4f7b39648358b (diff)
downloadphp-git-41f6bca92fc480df09ba0cc748342a03cbf539b3.tar.gz
More cleanup!
Diffstat (limited to 'main/safe_mode.c')
-rw-r--r--main/safe_mode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/safe_mode.c b/main/safe_mode.c
index fea75ed5c8..f274d23da8 100644
--- a/main/safe_mode.c
+++ b/main/safe_mode.c
@@ -111,7 +111,7 @@ PHPAPI int php_checkuid(const char *fn, int mode) {
PHPAPI char *php_get_current_user()
{
struct passwd *pwd;
- int uid;
+ struct stat *pstat;
SLS_FETCH();
if (request_info.current_user) {
@@ -122,13 +122,13 @@ PHPAPI char *php_get_current_user()
USE_SAPI is defined, because cgi will also be
interfaced in USE_SAPI */
- uid = sapi_get_uid();
+ pstat = sapi_get_stat();
- if (uid==-1) {
+ if (!pstat) {
return empty_string;
}
- if ((pwd=getpwuid(uid))==NULL) {
+ if ((pwd=getpwuid(pstat->st_uid))==NULL) {
return empty_string;
}
request_info.current_user_length = strlen(pwd->pw_name);