version 1.1.1.1.2.5, 2011/05/20 17:03:28
|
version 1.1.1.1.2.8, 2011/05/20 21:09:36
|
Line 53 initProg()
|
Line 53 initProg()
|
proc.proc_prio = getpriority(PRIO_PROCESS, 0); |
proc.proc_prio = getpriority(PRIO_PROCESS, 0); |
getcwd(proc.proc_dir, sizeof proc.proc_dir); |
getcwd(proc.proc_dir, sizeof proc.proc_dir); |
|
|
|
#if 0 |
lf = fopen(DEFAULT_LOG, "a"); |
lf = fopen(DEFAULT_LOG, "a"); |
if (!lf) |
if (!lf) |
|
#endif |
lf = stdout; |
lf = stdout; |
|
|
openlog(PACKAGE_NAME, LOG_CONS | LOG_PID | LOG_NDELAY | LOG_PERROR, LOG_USER); | openlog(PACKAGE_NAME, LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER); |
} |
} |
|
|
static void |
static void |
Line 226 Run(char **argv)
|
Line 228 Run(char **argv)
|
return -1; |
return -1; |
} |
} |
|
|
|
/* |
if (setgid(proc.proc_gid) == -1) { |
if (setgid(proc.proc_gid) == -1) { |
Err("Error:: setgid #%d - %s\n", errno, strerror(errno)); |
Err("Error:: setgid #%d - %s\n", errno, strerror(errno)); |
if (args) |
if (args) |
Line 244 Run(char **argv)
|
Line 247 Run(char **argv)
|
free(args); |
free(args); |
return -1; |
return -1; |
} |
} |
|
*/ |
|
|
Log(0, "UID:GID=%d:%d Prio=%d Class=%s Name=%s Dir=%s Cmd=%s", proc.proc_uid, proc.proc_gid, |
Log(0, "UID:GID=%d:%d Prio=%d Class=%s Name=%s Dir=%s Cmd=%s", proc.proc_uid, proc.proc_gid, |
proc.proc_prio, proc.proc_class, proc.proc_name, proc.proc_dir, proc.proc_cmd); |
proc.proc_prio, proc.proc_class, proc.proc_name, proc.proc_dir, proc.proc_cmd); |
Line 267 Run(char **argv)
|
Line 271 Run(char **argv)
|
int |
int |
main(int argc, char **argv) |
main(int argc, char **argv) |
{ |
{ |
char ch, *str, szCfg[MAXPATHLEN], flg = 0; | char ch, *str, szCfg[MAXPATHLEN], **pp, flg = 0; |
struct passwd *pass; |
struct passwd *pass; |
struct group *grp; |
struct group *grp; |
FILE *f; |
FILE *f; |
Line 330 main(int argc, char **argv)
|
Line 334 main(int argc, char **argv)
|
} |
} |
argc -= optind; |
argc -= optind; |
argv += optind; |
argv += optind; |
|
|
|
if (2 <= Verbose) { |
|
for (pp = argv; *pp; pp++) |
|
Log(2, "Args=%s\n", *pp); |
|
for (pp = environ; *pp; pp++) |
|
Log(2, "Envs=%s\n", *pp); |
|
} |
|
|
if (!argc) { |
if (!argc) { |
if (!(str = getenv("PATH_TRANSLATED"))) { |
if (!(str = getenv("PATH_TRANSLATED"))) { |
Usage(); |
Usage(); |