On Sun, Jun 01, 2008 at 12:52:32PM +1000, Robert Mattson wrote:
> All,
> 
> After upgrading to samba 3.0.30 on gentoo amd64 because of my recent
> best friend CVE-2008-1105
> 
>  
> 
> My winbind daemon is 'hanging up', and refusing to respond to pings
> after a few minutes of activity.
> 
> Wbinfo -u, getent passwd all work successfully, then after a bit wbinfo
> -p just tells me winbind dies.

I'm pretty sure you're running into a bug I just fixed in
the 3.0.x source tree. Patch is attached. We'll be doing a
bugfix release this coming week because of this.

Jeremy.
diff --git a/source/nsswitch/winbindd.c b/source/nsswitch/winbindd.c
index 636d635..c79bb46 100644
--- a/source/nsswitch/winbindd.c
+++ b/source/nsswitch/winbindd.c
@@ -117,14 +117,21 @@ static void flush_caches(void)
 
 /* Handle the signal by unlinking socket and exiting */
 
-static void terminate(void)
+static void terminate(bool in_parent)
 {
-       pstring path;
-
-       /* Remove socket file */
-       pstr_sprintf(path, "%s/%s", 
-                WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
-       unlink(path);
+       if (in_parent) {
+               /* When parent goes away we should
+                * remove the socket file. Not so
+                * when children terminate.
+                */ 
+
+               pstring path;
+
+               /* Remove socket file */
+               pstr_sprintf(path, "%s/%s", 
+                       WINBINDD_SOCKET_DIR, WINBINDD_SOCKET_NAME);
+               unlink(path);
+       }
 
        idmap_close();
        
@@ -731,10 +738,10 @@ void winbind_check_sighup(void)
 }
 
 /* check if TERM has been received */
-void winbind_check_sigterm(void)
+void winbind_check_sigterm(bool in_parent)
 {
        if (do_sigterm)
-               terminate();
+               terminate(in_parent);
 }
 
 /* Process incoming clients on listen_sock.  We use a tricky non-blocking,
@@ -901,7 +908,7 @@ static void process_loop(void)
 
        /* Check signal handling things */
 
-       winbind_check_sigterm();
+       winbind_check_sigterm(true);
        winbind_check_sighup();
 
        if (do_sigusr2) {
diff --git a/source/nsswitch/winbindd_dual.c b/source/nsswitch/winbindd_dual.c
index 7176a25..7b79734 100644
--- a/source/nsswitch/winbindd_dual.c
+++ b/source/nsswitch/winbindd_dual.c
@@ -1005,7 +1005,7 @@ static BOOL fork_domain_child(struct winbindd_child 
*child)
                main_loop_TALLOC_FREE();
 
                /* check for signals */
-               winbind_check_sigterm();
+               winbind_check_sigterm(false);
                winbind_check_sighup();
 
                run_events(winbind_event_context(), 0, NULL, NULL);
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba

Reply via email to