httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ken Parzygnat" <kp...@raleigh.ibm.com>
Subject [PATCH] Win32: User directive
Date Wed, 21 Oct 1998 15:18:39 GMT
PR 2303 states that the User directive
does not work on Win32.  This is true and
I do not believe Apache should change this
because it would minimally mean putting the 
password of the user id somewhere where Apache
could get it.

In order to get this function on NT, you 
should install the server as a service, and
set up the "Startup..." settings to have the
service start under a particular user account.

I'm proposing that we just put a NOTICE in
the error log stating that the User directive
has no affect on Win32.

What do you think?

--- http_core.c.orig	Mon Oct 05 20:35:39 1998
+++ http_core.c	Tue Oct 06 14:09:21 1998
@@ -1665,6 +1665,11 @@

 static const char *set_user(cmd_parms *cmd, void *dummy, char *arg)
 {
+#ifdef WIN32
+    ap_log_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, cmd->server,
+        "User directive has no affect on Win32.");
+    cmd->server->server_uid = ap_user_id = 1;
+#else
     const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
     if (err != NULL) {
         return err;
@@ -1700,6 +1705,7 @@
 	exit (1);
     }
 #endif
+#endif /* WIN32 */

     return NULL;
 }

- - - - - - - - - - - - - - - - - -
Ken Parzygnat
email: kparz@raleigh.ibm.com 










--------------------------------------------------------------------------------
Users of the Apache webserver are hereby granted a non-exclusive, irrevocable,
world-wide, royalty-free, non-transferable license to use, execute, prepare
derivative works of, and distribute (internally and externally, and including
derivative works) the code accompanying this license as part of, and
integrated into the Apache webserver.  This code is provided "AS IS" WITHOUT
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT.  THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF THE APACHE WEBSERVER.  The
owner of this code represents and warrants that it is legally entitled to
grant the above license.

Mime
View raw message