summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-11-07 01:06:38 +0000
committerTim Potter <tpot@samba.org>2002-11-07 01:06:38 +0000
commit8a6d37752182e0de7fd04b2c31f90e145dde783b (patch)
tree523beec64cdf3bd733332e43605d4298ce5e8762 /source/nsswitch/winbindd.c
parent28871bb6969ca70aabcc622410dd1fc5addcceca (diff)
downloadsamba-8a6d37752182e0de7fd04b2c31f90e145dde783b.tar.gz
samba-8a6d37752182e0de7fd04b2c31f90e145dde783b.tar.xz
samba-8a6d37752182e0de7fd04b2c31f90e145dde783b.zip
Call winbindd_param_init() earlier on in the piece so we don't get stuck in
the holding pattern when started up when security = user or security = ads. Clean up return value of winbindd_common_init() - what a mess!
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r--source/nsswitch/winbindd.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 7dbdca97eee..059d2f40d3e 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -3,7 +3,7 @@
Winbind daemon for ntdom nss module
- Copyright (C) by Tim Potter 2000, 2001
+ Copyright (C) by Tim Potter 2000-2002
Copyright (C) Andrew Tridgell 2002
This program is free software; you can redistribute it and/or modify
@@ -670,19 +670,23 @@ static void process_loop(void)
/*
these are split out from the main winbindd for use by the background daemon
*/
-int winbind_setup_common(void)
+BOOL winbind_setup_common(void)
{
- load_interfaces();
+ load_interfaces();
if (!secrets_init()) {
DEBUG(0,("Could not initialize domain trust account secrets. Giving up\n"));
- return 1;
-
+ return False;
}
namecache_enable(); /* Enable netbios namecache */
+ /* Check winbindd parameters are valid */
+
+ if (!winbindd_param_init())
+ return False;
+
/* Get list of domains we look up requests for. This includes the
domain which we are a member of as well as any trusted
domains. */
@@ -693,11 +697,8 @@ int winbind_setup_common(void)
/* Winbind daemon initialisation */
- if (!winbindd_param_init())
- return 1;
-
if (!winbindd_idmap_init())
- return 1;
+ return False;
/* Unblock all signals we are interested in as they may have been
blocked by the parent process. */
@@ -720,7 +721,7 @@ int winbind_setup_common(void)
CatchSignal(SIGUSR2, sigusr2_handler); /* Debugging sigs */
CatchSignal(SIGHUP, sighup_handler);
- return 0;
+ return True;
}
@@ -857,12 +858,12 @@ static void usage(void)
setpgid( (pid_t)0, (pid_t)0);
#endif
- if (opt_dual_daemon) {
- do_dual_daemon();
+ if (!winbind_setup_common()) {
+ return 1;
}
- if (winbind_setup_common() != 0) {
- return 1;
+ if (opt_dual_daemon) {
+ do_dual_daemon();
}
/* Initialise messaging system */