X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=server.c;h=e10c1e0343c77f1462bb7117b38486f39161411f;hp=8f0500965ca1461dbe4d661ff4086ed95793cad9;hb=c73c5df5f53e464a57852399771707cc923a497a;hpb=e57d2b9211bb734b71838142a7936fe6dfdc449c diff --git a/server.c b/server.c index 8f050096..e10c1e03 100644 --- a/server.c +++ b/server.c @@ -135,15 +135,7 @@ void para_log(int ll, const char* fmt,...) if (ll < conf.loglevel_arg) return; - if (!logfile) { - if (ll < WARNING) - outfd = stdout; - else - outfd = stderr; - } else - outfd = logfile; - if (conf.daemon_given && !logfile) - return; + outfd = logfile? logfile : stderr; time(&t1); tm = localtime(&t1); strftime(str, MAXLINE, "%b %d %H:%M:%S", tm); @@ -348,7 +340,7 @@ static unsigned do_inits(int argc, char **argv) init_random_seed(); /* parse command line options */ cmdline_parser(argc, argv, &conf); - para_drop_privileges(conf.user_arg); + para_drop_privileges(conf.user_arg, conf.group_arg); /* parse config file, open log and set defaults */ parse_config(0); log_welcome("para_server", conf.loglevel_arg); @@ -450,7 +442,7 @@ repeat: FD_SET(sockfd, &rfds); max_fileno = sockfd; FD_SET(signal_pipe, &rfds); - max_fileno = MAX(max_fileno, signal_pipe); + max_fileno = PARA_MAX(max_fileno, signal_pipe); timeout = afs_preselect(); status_refresh(); @@ -466,7 +458,7 @@ repeat: } if (selectors[mmd->selector_num].pre_select) { ret = selectors[mmd->selector_num].pre_select(&rfds, &wfds); - max_fileno = MAX(max_fileno, ret); + max_fileno = PARA_MAX(max_fileno, ret); } mmd_unlock(); ret = para_select(max_fileno + 1, &rfds, &wfds, timeout);