summaryrefslogtreecommitdiff
path: root/main/safe_mode.c
diff options
context:
space:
mode:
authorZeev Suraski <zeev@php.net>1999-04-26 17:26:37 +0000
committerZeev Suraski <zeev@php.net>1999-04-26 17:26:37 +0000
commit3cd0af11eea32f802228004af8fe424c62c8fbfb (patch)
tree1d273a469ad6e9e2c7e97449fa12665e46156dbf /main/safe_mode.c
parent0f195a79cd25447d03eb2ad9451829b36dcaa49b (diff)
downloadphp-git-3cd0af11eea32f802228004af8fe424c62c8fbfb.tar.gz
* Get the Apache module to compile again
* Get rid of php3_rqst, use SG(server_context) instead (there's still Apache-specific code, but it nuked a global)
Diffstat (limited to 'main/safe_mode.c')
-rw-r--r--main/safe_mode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main/safe_mode.c b/main/safe_mode.c
index 7cf1d2214d..422f8ba72f 100644
--- a/main/safe_mode.c
+++ b/main/safe_mode.c
@@ -39,6 +39,7 @@
#include <sys/stat.h>
#include "ext/standard/pageinfo.h"
#include "safe_mode.h"
+#include "SAPI.h"
/*
* _php3_checkuid
@@ -125,6 +126,7 @@ PHPAPI char *_php3_get_current_user()
#endif
struct passwd *pwd;
int uid;
+ SLS_FETCH();
if (request_info.current_user) {
return request_info.current_user;
@@ -140,7 +142,7 @@ PHPAPI char *_php3_get_current_user()
uid = statbuf.st_uid;
#endif
#if APACHE
- uid = php3_rqst->finfo.st_uid;
+ uid = ((request_rec *) SG(server_context))->finfo.st_uid;
#endif
if ((pwd=getpwuid(uid))==NULL) {