summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-01-21 11:03:58 +0000
committerSascha Schumann <sas@php.net>2003-01-21 11:03:58 +0000
commit294e776d950f7393faad5a96988c5122edf23e66 (patch)
tree491aeb9c2026d989229e120736dd499a74ff04aa /main/SAPI.c
parent961c9856ef2871325d5eb06760acb454e1b39c9e (diff)
downloadphp-git-294e776d950f7393faad5a96988c5122edf23e66.tar.gz
add sapi_get_target_uid/_gid for obtaining information about the
non-privileged user the web server is running as. this is useful for creating shared memory segments which need to be accessed by the child processes/threads.
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index a11f98c953..d23ec9a4ef 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -869,6 +869,26 @@ SAPI_API int sapi_force_http_10(TSRMLS_D)
}
}
+
+SAPI_API int sapi_get_target_uid(uid_t *obj TSRMLS_DC)
+{
+ if (sapi_module.get_target_uid) {
+ return sapi_module.get_target_uid(obj TSRMLS_CC);
+ } else {
+ return -1;
+ }
+}
+
+SAPI_API int sapi_get_target_gid(gid_t *obj TSRMLS_DC)
+{
+ if (sapi_module.get_target_gid) {
+ return sapi_module.get_target_gid(obj TSRMLS_CC);
+ } else {
+ return -1;
+ }
+}
+
+
/*
* Local variables:
* tab-width: 4