static void set_logfile(poptContext con, const char * arg)
{
- char *logfile = NULL;
+ char *lfile = NULL;
const char *pname;
/* Find out basename of current program */
else
pname++;
- if (asprintf(&logfile, "%s/log.%s", arg, pname) < 0) {
+ if (asprintf(&lfile, "%s/log.%s", arg, pname) < 0) {
return;
}
- lp_set_logfile(logfile);
- SAFE_FREE(logfile);
+ lp_set_logfile(lfile);
+ SAFE_FREE(lfile);
}
static bool PrintSambaVersionString;
sys_srandom(time(NULL) ^ sys_getpid());
if (!override_logfile) {
- char *logfile = NULL;
- if (asprintf(&logfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
+ char *lfile = NULL;
+ if (asprintf(&lfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
exit(1);
}
- lp_set_logfile(logfile);
- SAFE_FREE(logfile);
+ lp_set_logfile(lfile);
+ SAFE_FREE(lfile);
}
fault_setup((void (*)(void *))fault_continue );
/* Reload configuration */
-static bool reload_services_file(const char *logfile)
+static bool reload_services_file(const char *lfile)
{
bool ret;
/* if this is a child, restore the logfile to the special
name - <domain>, idmap, etc. */
- if (logfile && *logfile) {
- lp_set_logfile(logfile);
+ if (lfile && *lfile) {
+ lp_set_logfile(lfile);
}
reopen_logs();
}
/* check if HUP has been received and reload files */
-void winbind_check_sighup(const char *logfile)
+void winbind_check_sighup(const char *lfile)
{
if (do_sighup) {
DEBUG(3, ("got SIGHUP\n"));
flush_caches();
- reload_services_file(logfile);
+ reload_services_file(lfile);
do_sighup = False;
}
poptFreeContext(pc);
if (!override_logfile) {
- char *logfile = NULL;
- if (asprintf(&logfile,"%s/log.winbindd",
+ char *lfile = NULL;
+ if (asprintf(&lfile,"%s/log.winbindd",
get_dyn_LOGFILEBASE()) > 0) {
- lp_set_logfile(logfile);
- SAFE_FREE(logfile);
+ lp_set_logfile(lfile);
+ SAFE_FREE(lfile);
}
}
setup_logging("winbindd", log_stdout);
close_conns_after_fork();
if (!override_logfile) {
- char *logfile;
- if (asprintf(&logfile, "%s/log.winbindd-dc-connect", get_dyn_LOGFILEBASE()) > 0) {
- lp_set_logfile(logfile);
- SAFE_FREE(logfile);
+ char *lfile;
+ if (asprintf(&lfile, "%s/log.winbindd-dc-connect", get_dyn_LOGFILEBASE()) > 0) {
+ lp_set_logfile(lfile);
+ SAFE_FREE(lfile);
reopen_logs();
}
}
void *private_data);
void request_error(struct winbindd_cli_state *state);
void request_ok(struct winbindd_cli_state *state);
-void winbind_check_sighup(const char *logfile);
+void winbind_check_sighup(const char *lfile);
void winbind_check_sigterm(bool in_parent);
int main(int argc, char **argv, char **envp);