summaryrefslogtreecommitdiffstats
path: root/source/nsswitch/winbindd.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-09-17 20:53:21 +0000
committerJeremy Allison <jra@samba.org>2002-09-17 20:53:21 +0000
commitf8a0e6ad8b25d405ff2bcb492974d2f0bef81036 (patch)
tree28d7478b4d4707685c44e87e238fe14bf02fa807 /source/nsswitch/winbindd.c
parentffb7632d05191342ecfc5f78fbfd7beacfe257ad (diff)
downloadsamba-f8a0e6ad8b25d405ff2bcb492974d2f0bef81036.tar.gz
samba-f8a0e6ad8b25d405ff2bcb492974d2f0bef81036.tar.xz
samba-f8a0e6ad8b25d405ff2bcb492974d2f0bef81036.zip
Reverted my earlier change. It was incorrect. We must be protected by
pidfile before doing secrets_init(). Jeremy.
Diffstat (limited to 'source/nsswitch/winbindd.c')
-rw-r--r--source/nsswitch/winbindd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index a937f06639e..bb4a1b78ec5 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -853,8 +853,11 @@ static void usage(void)
fstrcpy(global_myworkgroup, lp_workgroup());
- if (!interactive)
+ if (!interactive) {
become_daemon();
+ pidfile_create("winbindd");
+ }
+
#if HAVE_SETPGID
/*
@@ -889,10 +892,6 @@ static void usage(void)
return 1;
}
- /* Only create the pidfile when we're ready to receive requests. */
- if (!interactive)
- pidfile_create("winbindd");
-
/* Loop waiting for requests */
process_loop(accept_sock);