Выложу тут
критика принимается :)
Только в ./apache_1.3.41: config.status
Только в ./apache_1.3.41: Makefile
Только в ./apache_1.3.41/src/ap: Makefile
Только в ./apache_1.3.41/src: apaci
Только в ./apache_1.3.41/src: Configuration.apaci
Только в ./apache_1.3.41/src/include: ap_config_auto.h
Только в ./apache_1.3.41/src/lib: Makefile
diff -ur ./oorig/src/main/http_log.c ./apache_1.3.41/src/main/http_log.c
--- ./oorig/src/main/http_log.c 2006-07-12 12:16:05.000000000 +0400
+++ ./apache_1.3.41/src/main/http_log.c 2008-05-06 15:42:51.000000000 +0400
@@ -30,6 +30,7 @@
#include "http_log.h"
#include "http_main.h"
+#include <pwd.h>
#include <stdarg.h>
typedef struct {
@@ -277,6 +278,9 @@
#endif
size_t len;
int save_errno = errno;
+ uid_t uidd = s->server_uid;
+ struct passwd *pwd;
+ pwd = getpwuid(uidd);
FILE *logf;
if (s == NULL) {
@@ -311,13 +315,15 @@
}
if (logf) {
- len = ap_snprintf(errstr, sizeof(errstr), "[%s] ", ap_get_time());
+ len = ap_snprintf(errstr, sizeof(errstr), "[%s] %s ", ap_get_time(), pwd->pw_name);
+ endpwent();
} else {
len = 0;
}
len += ap_snprintf(errstr + len, sizeof(errstr) - len,
- "[%s] ", priorities[level & APLOG_LEVELMASK].t_name);
+ "[%s] %s ", priorities[level & APLOG_LEVELMASK].t_name, pwd->pw_name);
+ endpwent();
#ifndef TPF41
if (file && (level & APLOG_LEVELMASK) == APLOG_DEBUG) {
Только в ./apache_1.3.41/src/main: http_log.c~
Только в ./apache_1.3.41/src/main: Makefile
Только в ./apache_1.3.41/src: Makefile
Только в ./apache_1.3.41/src: Makefile.config
Только в ./apache_1.3.41/src/modules: Makefile
Только в ./apache_1.3.41/src/modules/standard: Makefile
diff -ur ./oorig/src/modules/standard/mod_log_config.c ./apache_1.3.41/src/modules/standard/mod_log_config.c
--- ./oorig/src/modules/standard/mod_log_config.c 2006-07-12 12:16:05.000000000 +0400
+++ ./apache_1.3.41/src/modules/standard/mod_log_config.c 2008-05-06 15:49:16.000000000 +0400
@@ -416,6 +416,15 @@
return r->server->server_hostname;
}
+static const char *log_uid_vh(request_rec *r, char *a)
+{
+ uid_t uidd_mod = r->server->server_uid;
+ struct passwd *pwd;
+ pwd = getpwuid(uidd_mod);
+ return ap_psprintf( r->pool, "%s", pwd->pw_name);
+ endpwent();
+}
+
static const char *log_server_port(request_rec *r, char *a)
{
return ap_psprintf(r->pool, "%u",
@@ -528,6 +537,11 @@
{
'U', log_request_uri, 1
},
+
+ {
+ 'g', log_uid_vh, 0
+ },
+
{
'v', log_virtual_host, 0
},
Только в ./apache_1.3.41/src/modules/standard: mod_log_config.c~
Только в ./apache_1.3.41/src: modules.c
Только в ./apache_1.3.41/src/os/unix: Makefile
Только в ./apache_1.3.41/src/regex: Makefile
Только в ./apache_1.3.41/src/support: Makefile