ben 96/03/15 03:28:27
Modified: src Configuration.tmpl conf.h http_main.c
Log:
If Apache is run from a startup script on a SCO box in high security (C2) mode,
then it must jump through some hoops to allow it to do setuid et al. This fix
is for SCO 5 only, but may well work on SCO 3.
Revision Changes Path
1.3 +1 -1 apache/src/Configuration.tmpl
Index: Configuration.tmpl
===================================================================
RCS file: /export/home/cvs/apache/src/Configuration.tmpl,v
retrieving revision 1.2
retrieving revision 1.3
diff -C3 -r1.2 -r1.3
*** Configuration.tmpl 1996/03/01 03:16:21 1.2
--- Configuration.tmpl 1996/03/15 11:28:24 1.3
***************
*** 96,102 ****
#AUX_LIBS= -lPW -lsocket -lmalloc -lcrypt_i
# For SCO OpenServer Release 5
#AUX_CFLAGS= -DSCO5
! #AUX_LIBS=-lsocket -lmalloc
# For SVR4
#AUX_CFLAGS= -DSVR4
#AUX_LIBS= -lsocket -lnsl -lc
--- 96,102 ----
#AUX_LIBS= -lPW -lsocket -lmalloc -lcrypt_i
# For SCO OpenServer Release 5
#AUX_CFLAGS= -DSCO5
! #AUX_LIBS=-lsocket -lmalloc -lprot
# For SVR4
#AUX_CFLAGS= -DSVR4
#AUX_LIBS= -lsocket -lnsl -lc
1.8 +1 -0 apache/src/conf.h
Index: conf.h
===================================================================
RCS file: /export/home/cvs/apache/src/conf.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C3 -r1.7 -r1.8
*** conf.h 1996/03/11 09:14:42 1.7
--- conf.h 1996/03/15 11:28:24 1.8
***************
*** 206,211 ****
--- 206,212 ----
#define NEED_SELECT_H
#define FCNTL_SERIALIZED_ACCEPT
#define HAVE_MMAP
+ #define SecureWare
/* Although SCO 5 defines these in <strings.h> (note the "s") they don't have
consts. Sigh. */
1.8 +15 -0 apache/src/http_main.c
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C3 -r1.7 -r1.8
*** http_main.c 1996/03/01 02:46:45 1.7
--- http_main.c 1996/03/15 11:28:25 1.8
***************
*** 93,98 ****
--- 93,103 ----
#include <sys/ipc.h>
#include <sys/shm.h>
#endif
+ #ifdef SecureWare
+ #include <sys/security.h>
+ #include <sys/audit.h>
+ #include <prot.h>
+ #endif
/*
* Actual definitions of config globals... here because this is
***************
*** 1223,1228 ****
--- 1228,1243 ----
main(int argc, char *argv[])
{
int c;
+
+ #ifdef SecureWare
+ if(set_auth_parameters(argc,argv) < 0)
+ perror("set_auth_parameters");
+ if(getluid() < 0)
+ if(setluid(getuid()) < 0)
+ perror("setluid");
+ if(setreuid(0, 0) < 0)
+ perror("setreuid");
+ #endif
init_alloc();
pconf = permanent_pool;
|