version 1.4.2.1, 2013/04/09 23:50:14
|
version 1.5.2.1, 2015/06/15 15:52:34
|
Line 26 Log(int lvl, const char *fmt, ...)
|
Line 26 Log(int lvl, const char *fmt, ...)
|
vfprintf(lf, fmt, lst); |
vfprintf(lf, fmt, lst); |
va_end(lst); |
va_end(lst); |
fprintf(lf, "\n"); |
fprintf(lf, "\n"); |
vsyslog(LOG_WARNING, fmt, cp); | vsyslog(LOG_INFO, fmt, cp); |
va_end(cp); |
va_end(cp); |
} |
} |
} |
} |
Line 48 Err(const char *fmt, ...)
|
Line 48 Err(const char *fmt, ...)
|
static inline void |
static inline void |
DumpProc(const char *txt) |
DumpProc(const char *txt) |
{ |
{ |
Log(0, "%s:: uid:gid=%d:%d UID:GID=%d:%d Prio=%d Class=%s Name=%s Dir=%s Cmd=%s " | Log(1, "%s:: uid:gid=%d:%d UID:GID=%d:%d Prio=%d Class=%s Name=%s Dir=%s Cmd=%s " |
"Script=%s From=%s:%s Get=%s", txt ? txt : __func__, |
"Script=%s From=%s:%s Get=%s", txt ? txt : __func__, |
geteuid(), getegid(), AIT_GET_I16(&proc.proc_uid), |
geteuid(), getegid(), AIT_GET_I16(&proc.proc_uid), |
AIT_GET_I16(&proc.proc_gid), AIT_GET_I32(&proc.proc_prio), |
AIT_GET_I16(&proc.proc_gid), AIT_GET_I32(&proc.proc_prio), |
Line 180 LoadCfgData(char flg)
|
Line 180 LoadCfgData(char flg)
|
Err("Error:: Unknown mode ..."); |
Err("Error:: Unknown mode ..."); |
return -1; |
return -1; |
} |
} |
if (!strcasecmp(str, "SCRIPT") && getenv("SUX_USER")) { | if (!strcasecmp(str, "SCRIPT")) { |
mode = 1; |
mode = 1; |
if (setUIDGID(flg, NULL) == -1) | if (setUIDGID(flg, (getenv("SUX_USER") ? NULL : getenv("PATH_TRANSLATED"))) == -1) |
return -1; |
return -1; |
} else if (!strcasecmp(str, "FILE")) { |
} else if (!strcasecmp(str, "FILE")) { |
mode = 2; |
mode = 2; |
Line 275 Run(char **argv, char flg)
|
Line 275 Run(char **argv, char flg)
|
goto err; |
goto err; |
} |
} |
|
|
DumpProc(__func__); |
|
|
|
EVERBS(3) { |
EVERBS(3) { |
char **el = args - 1; |
char **el = args - 1; |
while (*++el) |
while (*++el) |
Log(3, "args: %s", *el); |
Log(3, "args: %s", *el); |
} |
} |
|
|
|
DumpProc(__func__); |
|
|
fflush(lf); |
fflush(lf); |
|
|