dgaudet 97/12/26 10:16:19
Modified: . STATUS
src CHANGES
src/main http_main.c
Log:
Move the gid twiddling into the child so that the parent creates files with
the group that its invoked as.
Submitted by: Gregory A Lundberg <[EMAIL PROTECTED]>
Reviewed by: Dean Gaudet, Martin Kraemer, Jim Jagielski
Revision Changes Path
1.30 +1 -4 apachen/STATUS
Index: STATUS
===================================================================
RCS file: /export/home/cvs/apachen/STATUS,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- STATUS 1997/12/26 16:54:15 1.29
+++ STATUS 1997/12/26 18:16:14 1.30
@@ -53,6 +53,7 @@
* Dean's [PATCH] more useful warning message for fcntl() lock failure
* Dean's [PATCH] ap_snprintf should be more sane (fwd)
* Jim's/Ken's move of main/util_snprintf.c to ap/ap_snprintf.c
+ * [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
Available:
@@ -67,10 +68,6 @@
* Ken's [PATCH] for PR#1195 (" in realm names)
<[EMAIL PROTECTED]>
Status: Ken +1, Dean +1, Jim +1
-
- * Dean's [PATCH] Re: [BUGFIXES] Wrong GID for PID file and UMASK for logs
- <[EMAIL PROTECTED]>
- Status: Dean +1, Martin +1, Jim +1
* Dean's [PATCH] fix Rasmus' chunking error
<[EMAIL PROTECTED]>
1.543 +4 -0 apachen/src/CHANGES
Index: CHANGES
===================================================================
RCS file: /export/home/cvs/apachen/src/CHANGES,v
retrieving revision 1.542
retrieving revision 1.543
diff -u -r1.542 -r1.543
--- CHANGES 1997/12/26 15:52:35 1.542
+++ CHANGES 1997/12/26 18:16:15 1.543
@@ -1,5 +1,9 @@
Changes with Apache 1.3b4
+ *) Move the gid switching code into the child so that log files
+ and pid files are opened with the root gid.
+ [Gregory A Lundberg <[EMAIL PROTECTED]>]
+
*) WIN32: Check for binaries by looking for the executable header
instead of counting control characters.
[Jim Patterson <[EMAIL PROTECTED]>] PR#1340
1.260 +3 -8 apachen/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apachen/src/main/http_main.c,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -r1.259 -r1.260
--- http_main.c 1997/12/23 20:33:42 1.259
+++ http_main.c 1997/12/26 18:16:17 1.260
@@ -2227,12 +2227,7 @@
#endif /* ndef WIN32 or __EMX__ */
}
-/* Reset group privileges, after rereading the config files
- * (our uid may have changed, and if so, we want the new perms).
- *
- * Don't reset the uid yet --- we do that only in the child process,
- * so as not to lose any root privs. But we can set the group stuff
- * now, once, as opposed to once per each new child.
+/* Set group privileges.
*
* Note that we use the username as set in the config files, rather than
* the lookup of to uid --- the same uid may have multiple passwd entries,
@@ -2776,6 +2771,7 @@
reopen_scoreboard(pchild);
SAFE_ACCEPT(accept_mutex_child_init(pchild));
+ set_group_privs();
#ifdef MPE
/* Only try to switch if we're running as MANAGER.SYS */
if (geteuid() == 1 && user_id > 1) {
@@ -3309,8 +3305,8 @@
server_conf = read_config(pconf, ptrans, server_confname);
setup_listeners(pconf);
open_logs(server_conf, pconf);
+ log_pid(pconf, pid_fname);
init_modules(pconf, server_conf);
- set_group_privs();
SAFE_ACCEPT(accept_mutex_init(pconf));
if (!is_graceful) {
reinit_scoreboard(pconf);
@@ -3323,7 +3319,6 @@
#endif
set_signals();
- log_pid(pconf, pid_fname);
if (daemons_max_free < daemons_min_free + 1) /* Don't thrash... */
daemons_max_free = daemons_min_free + 1;