Revert "HACK: winbind only one connection to our domain"
authorStefan Metzmacher <metze@samba.org>
Tue, 27 Apr 2010 14:13:57 +0000 (16:13 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 29 Apr 2010 13:53:16 +0000 (15:53 +0200)
This reverts commit 1a3035c8aac8689c7886a1eec261c85ab480044a.

source3/winbindd/winbindd.c
source3/winbindd/winbindd.h
source3/winbindd/winbindd_cm.c
source3/winbindd/winbindd_dual.c

index b177bede8de097ede11ef588d1ae8c96fec08236..4d00269970ece66ab6fb854914a4fb8e7e485515 100644 (file)
@@ -1012,8 +1012,6 @@ bool winbindd_use_cache(void)
        return !opt_nocache;
 }
 
-bool wb_is_parent = true;
-
 /* Main function */
 
 int main(int argc, char **argv, char **envp)
@@ -1210,8 +1208,6 @@ int main(int argc, char **argv, char **envp)
                exit(1);
        }
 
-       wb_is_parent = true;
-
        /* Setup signal handlers */
 
        if (!winbindd_setup_sig_term_handler(true))
index f13067df4ad49e939fce7e72c30060189d1caacc..f1815ac870bb71ec07c1b77fe3b4933ff32d55b7 100644 (file)
@@ -385,6 +385,4 @@ struct WINBINDD_CCACHE_ENTRY {
 #define WINBINDD_PAM_AUTH_KRB5_RENEW_TIME 2592000 /* one month */
 #define DOM_SEQUENCE_NONE ((uint32)-1)
 
-extern bool wb_is_parent;
-
 #endif /* _WINBINDD_H */
index e1cc3705782137a56b1cbb15f9562d009810ec00..54abce301274e459ca5ea35b7585f0046bd9733b 100644 (file)
@@ -180,10 +180,6 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain)
        pid_t parent_pid = sys_getpid();
        char *lfile = NULL;
 
-if (wb_is_parent) {
-DEBUG(0,("fork_child_dc_connect called in the parent\n"));
-smb_panic(__location__);
-}
        if (domain->dc_probe_pid != (pid_t)-1) {
                /*
                 * We might already have a DC probe
@@ -1669,10 +1665,6 @@ static NTSTATUS init_dc_connection_network(struct winbindd_domain *domain)
 
 NTSTATUS init_dc_connection(struct winbindd_domain *domain)
 {
-if (wb_is_parent) {
-DEBUG(0,("init_dc_connection called in the parent\n"));
-smb_panic(__location__);
-}
        if (domain->internal) {
                return NT_STATUS_CANT_ACCESS_DOMAIN_INFO;
        }
@@ -1695,9 +1687,6 @@ static NTSTATUS init_dc_connection_rpc(struct winbindd_domain *domain)
        }
 
        if (!domain->internal && domain->conn.cli == NULL) {
-               DEBUG(0,("METZE: domain[%s] without inbound trust\n",
-                       domain->name));
-               smb_panic(__location__);
                /* happens for trusted domains without inbound trust */
                return NT_STATUS_TRUSTED_DOMAIN_FAILURE;
        }
index 4de94f4a55e7b6952c7c41c51fb2c7fe6911bbdf..4f314cf59f59ab5dd86a1c3cd06922d51f717765 100644 (file)
@@ -1106,8 +1106,6 @@ bool winbindd_reinit_after_fork(const char *logfilename)
        struct winbindd_domain *domain;
        struct winbindd_child *cl;
 
-       wb_is_parent = false;
-
        if (!NT_STATUS_IS_OK(reinit_after_fork(winbind_messaging_context(),
                                               winbind_event_context(),
                                               true))) {
@@ -1215,12 +1213,6 @@ static bool fork_domain_child(struct winbindd_child *child)
        struct winbindd_response response;
        struct winbindd_domain *primary_domain = NULL;
 
-if (!wb_is_parent) {
-       DEBUG(0,("try to fork a domain[%s] child from a child[%d] parent[%d]\n",
-               child->domain?child->domain->name:"no_domain", sys_getpid(), getppid()));
-       smb_panic(__location__);
-}
-
        if (child->domain) {
                DEBUG(10, ("fork_domain_child called for domain '%s'\n",
                           child->domain->name));
@@ -1293,12 +1285,12 @@ if (!wb_is_parent) {
                 * in start-up mode */
                if (!(child->domain->internal)) {
                        set_domain_online_request(child->domain);
-/*                     if (!(child->domain->primary)) {
+                       if (!(child->domain->primary)) {
                                primary_domain->startup = True;
                                primary_domain->startup_time = time(NULL);
                                set_domain_online_request(primary_domain);
                        }
-*/             }
+               }
        }
 
        /*
@@ -1324,7 +1316,7 @@ if (!wb_is_parent) {
                         * set_dc_type_and_flags_trustinfo()
                         * for details.
                         */
-                       //set_domain_online_request(primary_domain);
+                       set_domain_online_request(primary_domain);
                }
 
                child->lockout_policy_event = event_add_timed(