r18937: Protect against segc in the idmap winbindd child process
authorGerald Carter <jerry@samba.org>
Wed, 27 Sep 2006 02:26:03 +0000 (02:26 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:14:48 +0000 (12:14 -0500)
(the domain is NULL here)

source/nsswitch/winbindd_dual.c

index 1a3de3f1e5892dc225dc133f5d11cac21b391729..317a103f33294be789267fba4e1aa890e4431cdd 100644 (file)
@@ -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 ));