The only writer to this variable left with
c377845d27d4dcd7. The
closest match for override_logfile is is_default_dyn_LOGFILEBASE()
with the opposite logic.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Sep 18 00:53:28 UTC 2021 on sn-devel-184
-/* -------------------------------------------------------------------------- **
- * External variables.
- */
-
-/*
- used to check if the user specified a
- logfile on the command line
-*/
-bool override_logfile;
-
int debuglevel_get_class(size_t idx)
{
return dbgc_config[idx].loglevel;
int debuglevel_get_class(size_t idx)
{
return dbgc_config[idx].loglevel;
extern bool rescan_listen_set;
extern bool global_in_nmbd;
extern bool rescan_listen_set;
extern bool global_in_nmbd;
-extern bool override_logfile;
-
/* have we found LanMan clients yet? */
bool found_lm_clients = False;
/* have we found LanMan clients yet? */
bool found_lm_clients = False;
sys_srandom(time(NULL) ^ getpid());
sys_srandom(time(NULL) ^ getpid());
- if (!override_logfile) {
+ if (is_default_dyn_LOGFILEBASE()) {
char *lfile = NULL;
if (asprintf(&lfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
exit(1);
char *lfile = NULL;
if (asprintf(&lfile, "%s/log.nmbd", get_dyn_LOGFILEBASE()) < 0) {
exit(1);
static bool opt_nocache = False;
static bool interactive = False;
static bool opt_nocache = False;
static bool interactive = False;
-extern bool override_logfile;
-
struct imessaging_context *winbind_imessaging_context(void)
{
static struct imessaging_context *msg = NULL;
struct imessaging_context *winbind_imessaging_context(void)
{
static struct imessaging_context *msg = NULL;
- if (!override_logfile) {
+ if (is_default_dyn_LOGFILEBASE()) {
char *lfile = NULL;
if (asprintf(&lfile,"%s/log.winbindd",
get_dyn_LOGFILEBASE()) > 0) {
char *lfile = NULL;
if (asprintf(&lfile,"%s/log.winbindd",
get_dyn_LOGFILEBASE()) > 0) {
};
extern struct winbindd_methods reconnect_methods;
};
extern struct winbindd_methods reconnect_methods;
-extern bool override_logfile;
static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain, bool need_rw_dc);
static void set_dc_type_and_flags( struct winbindd_domain *domain );
static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain, bool need_rw_dc);
static void set_dc_type_and_flags( struct winbindd_domain *domain );
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_WINBIND
-extern bool override_logfile;
-
static void forall_domain_children(bool (*fn)(struct winbindd_child *c,
void *private_data),
void *private_data)
static void forall_domain_children(bool (*fn)(struct winbindd_child *c,
void *private_data),
void *private_data)
close_conns_after_fork();
close_conns_after_fork();
- if (!override_logfile && logfilename) {
+ if (is_default_dyn_LOGFILEBASE() && logfilename) {
lp_set_logfile(logfilename);
reopen_logs();
}
if (!winbindd_setup_sig_term_handler(false))
return NT_STATUS_NO_MEMORY;
lp_set_logfile(logfilename);
reopen_logs();
}
if (!winbindd_setup_sig_term_handler(false))
return NT_STATUS_NO_MEMORY;
- if (!winbindd_setup_sig_hup_handler(override_logfile ? NULL :
- logfilename))
+ if (!winbindd_setup_sig_hup_handler(
+ !is_default_dyn_LOGFILEBASE() ? NULL : logfilename)) {
return NT_STATUS_NO_MEMORY;
return NT_STATUS_NO_MEMORY;
/* Stop zombies in children */
CatchChild();
/* Stop zombies in children */
CatchChild();
messaging_register(global_messaging_context(), NULL,
MSG_WINBIND_DISCONNECT_DC,
winbind_msg_disconnect_dc);
messaging_register(global_messaging_context(), NULL,
MSG_WINBIND_DISCONNECT_DC,
winbind_msg_disconnect_dc);
- messaging_register(global_messaging_context(),
- override_logfile ? NULL : child->logfilename,
- MSG_SMB_CONF_UPDATED,
- winbindd_msg_reload_services_child);
+ messaging_register(
+ global_messaging_context(),
+ !is_default_dyn_LOGFILEBASE() ? NULL : child->logfilename,
+ MSG_SMB_CONF_UPDATED,
+ winbindd_msg_reload_services_child);
primary_domain = find_our_domain();
primary_domain = find_our_domain();