winbind: Remove the "winbindd_children" global
authorVolker Lendecke <vl@samba.org>
Mon, 26 Feb 2018 12:48:24 +0000 (13:48 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 1 Mar 2018 08:53:46 +0000 (09:53 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13309

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/winbindd/winbindd.h
source3/winbindd/winbindd_dual.c
source3/winbindd/winbindd_ndr.c

index 081722f6a901bb9317f6a837af2b55e7ce710096..6aa57f2e7045a64b3ff575ace5d4cc5de3768eb3 100644 (file)
@@ -115,8 +115,6 @@ struct winbindd_child_dispatch_table {
 };
 
 struct winbindd_child {
-       struct winbindd_child *next, *prev;
-
        pid_t pid;
        struct winbindd_domain *domain;
        char *logfilename;
index 2b02fdfd7fe06782aac7dced38f309581285bd92..30d3604bc94c14f56ca189ef48f2b0b6e6f5230c 100644 (file)
@@ -46,8 +46,6 @@
 
 extern bool override_logfile;
 
-static struct winbindd_child *winbindd_children = NULL;
-
 static void forall_domain_children(bool (*fn)(struct winbindd_child *c,
                                              void *private_data),
                                   void *private_data)
@@ -363,7 +361,6 @@ static void wb_child_request_cleanup(struct tevent_req *req,
         */
        close(state->child->sock);
        state->child->sock = -1;
-       DLIST_REMOVE(winbindd_children, state->child);
 }
 
 static struct winbindd_child *choose_domain_child(struct winbindd_domain *domain)
@@ -800,9 +797,6 @@ void winbind_child_died(pid_t pid)
                return;
        }
 
-       /* This will be re-added in fork_domain_child() */
-
-       DLIST_REMOVE(winbindd_children, state.child);
        state.child->pid = 0;
 
        if (state.child->sock != -1) {
@@ -1636,8 +1630,6 @@ static bool fork_domain_child(struct winbindd_child *child)
                        return false;
                }
 
-               child->next = child->prev = NULL;
-               DLIST_ADD(winbindd_children, child);
                child->sock = fdpair[1];
                return True;
        }
index 383de4e811679ab88ff33923f52f174774d7a258..74a03d0bc336678e17cafd454f81f57052ca7c9f 100644 (file)
@@ -36,8 +36,6 @@ void ndr_print_winbindd_child(struct ndr_print *ndr,
 {
        ndr_print_struct(ndr, name, "winbindd_child");
        ndr->depth++;
-       ndr_print_ptr(ndr, "next", r->next);
-       ndr_print_ptr(ndr, "prev", r->prev);
        ndr_print_uint32(ndr, "pid", (uint32_t)r->pid);
 #if 0
        ndr_print_winbindd_domain(ndr, "domain", r->domain);