sas             Tue Jan 21 06:11:24 2003 EDT

  Modified files:              (Branch: PHP_4)
    /php4/main  SAPI.c SAPI.h 
    /php4/sapi/apache   mod_php4.c 
  Log:
  MFH
  
  
Index: php4/main/SAPI.c
diff -u php4/main/SAPI.c:1.155.2.4 php4/main/SAPI.c:1.155.2.4.2.1
--- php4/main/SAPI.c:1.155.2.4  Wed Jan 15 06:28:25 2003
+++ php4/main/SAPI.c    Tue Jan 21 06:11:22 2003
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: SAPI.c,v 1.155.2.4 2003/01/15 11:28:25 sas Exp $ */
+/* $Id: SAPI.c,v 1.155.2.4.2.1 2003/01/21 11:11:22 sas Exp $ */
 
 #include <ctype.h>
 #include <sys/stat.h>
@@ -868,6 +868,26 @@
                return -1;
        }
 }
+
+
+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:
Index: php4/main/SAPI.h
diff -u php4/main/SAPI.h:1.87.2.4 php4/main/SAPI.h:1.87.2.4.2.1
--- php4/main/SAPI.h:1.87.2.4   Wed Jan 15 16:20:05 2003
+++ php4/main/SAPI.h    Tue Jan 21 06:11:23 2003
@@ -190,6 +190,9 @@
 SAPI_API int sapi_get_fd(int *fd TSRMLS_DC);
 SAPI_API int sapi_force_http_10(TSRMLS_D);
 
+SAPI_API int sapi_get_target_uid(uid_t * TSRMLS_DC);
+SAPI_API int sapi_get_target_gid(gid_t * TSRMLS_DC);
+
 struct _sapi_module_struct {
        char *name;
        char *pretty_name;
@@ -227,10 +230,20 @@
        char *executable_location;
 
        int php_ini_ignore;
+<<<<<<< SAPI.h
+
+       int (*get_fd)(int *fd TSRMLS_DC);
+
+       int (*force_http_10)(TSRMLS_D);
+=======
 
        int (*get_fd)(int *fd TSRMLS_DC);
 
        int (*force_http_10)(TSRMLS_D);
+
+       int (*get_target_uid)(uid_t * TSRMLS_DC);
+       int (*get_target_gid)(gid_t * TSRMLS_DC);
+>>>>>>> 1.97
 };
 
 
Index: php4/sapi/apache/mod_php4.c
diff -u php4/sapi/apache/mod_php4.c:1.146.2.3 php4/sapi/apache/mod_php4.c:1.146.2.3.2.1
--- php4/sapi/apache/mod_php4.c:1.146.2.3       Wed Jan 15 06:29:05 2003
+++ php4/sapi/apache/mod_php4.c Tue Jan 21 06:11:23 2003
@@ -17,9 +17,10 @@
    | PHP 4.0 patches by Zeev Suraski <[EMAIL PROTECTED]>                      |
    +----------------------------------------------------------------------+
  */
-/* $Id: mod_php4.c,v 1.146.2.3 2003/01/15 11:29:05 sas Exp $ */
+/* $Id: mod_php4.c,v 1.146.2.3.2.1 2003/01/21 11:11:23 sas Exp $ */
 
 #include "php_apache_http.h"
+#include "http_conf_globals.h"
 
 #ifdef NETWARE
 #define SIGPIPE SIGINT
@@ -371,6 +372,22 @@
        return 0;
 }
 
+/* {{{ sapi_apache_get_target_uid
+ */
+static int sapi_apache_get_target_uid(uid_t *obj TSRMLS_DC)
+{
+       *obj = ap_user_id;
+       return 0;
+}
+
+/* {{{ sapi_apache_get_target_gid
+ */
+static int sapi_apache_get_target_gid(gid_t *obj TSRMLS_DC)
+{
+       *obj = ap_group_id;
+       return 0;
+}
+
 /* {{{ sapi_module_struct apache_sapi_module
  */
 static sapi_module_struct apache_sapi_module = {
@@ -415,7 +432,9 @@
        NULL,                                                   /* exe location */
        0,                                                              /* ini ignore 
*/
        sapi_apache_get_fd,
-       sapi_apache_force_http_10
+       sapi_apache_force_http_10,
+       sapi_apache_get_target_uid,
+       sapi_apache_get_target_gid
 };
 /* }}} */
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to