summaryrefslogtreecommitdiff
path: root/main/safe_mode.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-04-24 00:12:00 +0000
committerZeev Suraski <zeev@php.net>1999-04-24 00:12:00 +0000
commit0818d96c97ceec4dbb8251c5220a2fdcdf39f355 (patch)
treec56f529e445e4bee928e7c28e0ccbb7f67572f16 /main/safe_mode.c
parent05d24c60223439b94d4100538331fb6749022ca3 (diff)
downloadphp-git-0818d96c97ceec4dbb8251c5220a2fdcdf39f355.tar.gz
A lot of cleanups... Removed old thread-safe code and other redundant code and files
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;
}