version 1.3.2.3, 2013/04/09 08:56:57
|
version 1.3.2.4, 2013/04/09 12:55:51
|
Line 45 Err(const char *fmt, ...)
|
Line 45 Err(const char *fmt, ...)
|
va_end(cp); |
va_end(cp); |
} |
} |
|
|
|
static inline void |
|
DumpProc(const char *txt) |
|
{ |
|
Log(0, "%s:: UID:GID=%d:%d Prio=%d Class=%s Name=%s Dir=%s Cmd=%s Script=%s From=%s:%s%s", |
|
txt ? txt : __func__, AIT_GET_I16(&proc.proc_uid), |
|
AIT_GET_I16(&proc.proc_gid), AIT_GET_I32(&proc.proc_prio), |
|
AIT_GET_STR(&proc.proc_class), AIT_GET_STR(&proc.proc_name), |
|
AIT_GET_STR(&proc.proc_dir), AIT_GET_STR(&proc.proc_cmd), |
|
getenv("PATH_TRANSLATED"), getenv("REMOTE_ADDR"), |
|
getenv("REMOTE_PORT"), getenv("REQUEST_URI")); |
|
} |
|
|
static void |
static void |
initProg() |
initProg() |
{ |
{ |
Line 53 initProg()
|
Line 65 initProg()
|
AIT_SET_I16(&proc.proc_uid, getuid()); |
AIT_SET_I16(&proc.proc_uid, getuid()); |
AIT_SET_I16(&proc.proc_gid, getgid()); |
AIT_SET_I16(&proc.proc_gid, getgid()); |
AIT_SET_I32(&proc.proc_prio, getpriority(PRIO_PROCESS, 0)); |
AIT_SET_I32(&proc.proc_prio, getpriority(PRIO_PROCESS, 0)); |
|
AIT_INIT_VAL2(&proc.proc_class, string); |
getcwd(d, sizeof d); |
getcwd(d, sizeof d); |
AIT_SET_STR(&proc.proc_dir, d); |
AIT_SET_STR(&proc.proc_dir, d); |
|
AIT_INIT_VAL2(&proc.proc_name, string); |
|
AIT_INIT_VAL2(&proc.proc_cmd, string); |
|
|
#if 0 |
#if 0 |
lf = fopen(DEFAULT_LOG, "a"); |
lf = fopen(DEFAULT_LOG, "a"); |
Line 266 Run(char **argv, char flg)
|
Line 281 Run(char **argv, char flg)
|
} |
} |
} |
} |
|
|
Log(0, "UID:GID=%d:%d Prio=%d Class=%s Name=%s Dir=%s Cmd=%s Script=%s", | DumpProc(__func__); |
proc.proc_uid, proc.proc_gid, proc.proc_prio, AIT_GET_STR(&proc.proc_class), | |
AIT_GET_STR(&proc.proc_name), AIT_GET_STR(&proc.proc_dir), | |
AIT_GET_STR(&proc.proc_cmd), getenv("PATH_TRANSLATED")); | |
|
|
EVERBS(3) { |
EVERBS(3) { |
char **el = args - 1; |
char **el = args - 1; |