summaryrefslogtreecommitdiff
path: root/main/safe_mode.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/safe_mode.c')
-rw-r--r--main/safe_mode.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/main/safe_mode.c b/main/safe_mode.c
index c4992893a9..7cf1d2214d 100644
--- a/main/safe_mode.c
+++ b/main/safe_mode.c
@@ -125,30 +125,29 @@ PHPAPI char *_php3_get_current_user()
#endif
struct passwd *pwd;
int uid;
- TLS_VARS;
- if (GLOBAL(request_info).current_user) {
- return GLOBAL(request_info).current_user;
+ if (request_info.current_user) {
+ return request_info.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 (!GLOBAL(request_info).filename || (stat(GLOBAL(request_info).filename,&statbuf)==-1)) {
+ if (!request_info.filename || (stat(request_info.filename,&statbuf)==-1)) {
return empty_string;
}
uid = statbuf.st_uid;
#endif
#if APACHE
- uid = GLOBAL(php3_rqst)->finfo.st_uid;
+ uid = php3_rqst->finfo.st_uid;
#endif
if ((pwd=getpwuid(uid))==NULL) {
return empty_string;
}
- GLOBAL(request_info).current_user_length = strlen(pwd->pw_name);
- GLOBAL(request_info).current_user = estrndup(pwd->pw_name,GLOBAL(request_info).current_user_length);
+ request_info.current_user_length = strlen(pwd->pw_name);
+ request_info.current_user = estrndup(pwd->pw_name,request_info.current_user_length);
- return GLOBAL(request_info).current_user;
+ return request_info.current_user;
}