coar 98/06/20 04:07:39
Modified: src/support Makefile.tmpl suexec.c
Log:
Let's not be unnecessarily cryptic in our logs; it interferes with
debugging problems and doesn't really protect anything.
Revision Changes Path
1.23 +1 -1 apache-1.3/src/support/Makefile.tmpl
Index: Makefile.tmpl
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/support/Makefile.tmpl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Makefile.tmpl 1998/05/29 18:21:15 1.22
+++ Makefile.tmpl 1998/06/20 11:07:38 1.23
@@ -68,4 +68,4 @@
htpasswd.o: htpasswd.c $(INCDIR)/conf.h $(OSDIR)/os.h
logresolve.o: logresolve.c $(INCDIR)/conf.h $(OSDIR)/os.h
rotatelogs.o: rotatelogs.c $(INCDIR)/conf.h $(OSDIR)/os.h
-suexec.o: suexec.c $(INCDIR)/conf.h $(OSDIR)/os.h suexec.h
+suexec.o: suexec.c $(INCDIR)/conf.h $(INCDIR)/ap.h $(OSDIR)/os.h suexec.h
1.40 +13 -5 apache-1.3/src/support/suexec.c
Index: suexec.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/support/suexec.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- suexec.c 1998/06/18 19:06:56 1.39
+++ suexec.c 1998/06/20 11:07:38 1.40
@@ -72,6 +72,7 @@
*/
#include "conf.h"
+#include "ap.h"
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -205,7 +206,7 @@
if ((cleanenv = (char **) calloc(AP_ENVBUF, sizeof(char *))) == NULL) {
- log_err("failed to malloc env mem\n");
+ log_err("failed to malloc memory for environment\n");
exit(120);
}
@@ -258,7 +259,14 @@
*/
prog = argv[0];
if (argc < 4) {
- log_err("too few arguments\n");
+ char msgbuf[2048];
+ int i;
+
+ ap_snprintf(msgbuf, sizeof(msgbuf), "too few (%d) arguments:", argc);
+ for (i = 0; i < argc; i++) {
+ ap_snprintf(msgbuf, sizeof(msgbuf), "%s [%s]", msgbuf, argv[i]);
+ }
+ log_err("%s\n", msgbuf);
exit(101);
}
target_uname = argv[1];
@@ -283,12 +291,12 @@
#ifdef _OSD_POSIX
/* User name comparisons are case insensitive on BS2000/OSD */
if (strcasecmp(HTTPD_USER, pw->pw_name)) {
- log_err("user mismatch (%s)\n", pw->pw_name);
+ log_err("user mismatch (%s instead of %s)\n", pw->pw_name, HTTPD_USER);
exit(103);
}
#else /*_OSD_POSIX*/
if (strcmp(HTTPD_USER, pw->pw_name)) {
- log_err("user mismatch (%s)\n", pw->pw_name);
+ log_err("user mismatch (%s instead of %s)\n", pw->pw_name, HTTPD_USER);
exit(103);
}
#endif /*_OSD_POSIX*/
@@ -350,7 +358,7 @@
* Log the transaction here to be sure we have an open log
* before we setuid().
*/
- log_err("uid: (%s/%s) gid: (%s/%s) %s\n",
+ log_err("uid: (%s/%s) gid: (%s/%s) cmd: %s\n",
target_uname, actual_uname,
target_gname, actual_gname,
cmd);