summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-27 02:26:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:48 -0500
commit6a492e712243fe2bf58d5d5f493630ae937d85df (patch)
treeb4cb1b5405a5af39b9b55f1ad6eac43a7bb4d064
parentefffbc90362aa9d09f4c3f2e17f040ad81f7988d (diff)
downloadsamba-6a492e712243fe2bf58d5d5f493630ae937d85df.tar.gz
samba-6a492e712243fe2bf58d5d5f493630ae937d85df.tar.bz2
samba-6a492e712243fe2bf58d5d5f493630ae937d85df.zip
r18937: Protect against segc in the idmap winbindd child process
(the domain is NULL here) (This used to be commit a36de910d289363a5374fe063099311712d4e57a)
-rw-r--r--source3/nsswitch/winbindd_dual.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 1a3de3f1e5..317a103f33 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -766,7 +766,9 @@ static BOOL fork_domain_child(struct winbindd_child *child)
message_register(MSG_WINBIND_ONLINE,child_msg_online);
message_register(MSG_WINBIND_ONLINESTATUS,child_msg_onlinestatus);
- child->domain->startup = True;
+ if ( child->domain ) {
+ child->domain->startup = True;
+ }
startup_time = time(NULL);
while (1) {
@@ -785,7 +787,7 @@ static BOOL fork_domain_child(struct winbindd_child *child)
GetTimeOfDay(&now);
- if (child->domain->startup && (now.tv_sec > startup_time + 30)) {
+ if (child->domain && child->domain->startup && (now.tv_sec > startup_time + 30)) {
/* No longer in "startup" mode. */
DEBUG(10,("fork_domain_child: domain %s no longer in 'startup' mode.\n",
child->domain->name ));