From owner-freebsd-ports@FreeBSD.ORG Fri Jul 18 07:26:38 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A9BB106566B; Fri, 18 Jul 2008 07:26:38 +0000 (UTC) (envelope-from udo.schweigert@siemens.com) Received: from thoth.sbs.de (thoth.sbs.de [192.35.17.2]) by mx1.freebsd.org (Postfix) with ESMTP id F38898FC12; Fri, 18 Jul 2008 07:26:37 +0000 (UTC) (envelope-from udo.schweigert@siemens.com) Received: from mail3.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.12.11.20060308/8.12.11) with ESMTP id m6I71Seb005185; Fri, 18 Jul 2008 09:01:28 +0200 Received: from mars.cert.siemens.com (mars.cert.siemens.com [139.25.19.9]) by mail3.siemens.de (8.12.11.20060308/8.12.11) with ESMTP id m6I71S3d018886; Fri, 18 Jul 2008 09:01:28 +0200 Received: from alaska.cert.siemens.com (alaska.cert.siemens.com [139.25.19.64]) by mars.cert.siemens.com (8.14.2/8.14.2/$SiemensCERT: mail/cert.mc.pre,v 1.68 2006/12/29 07:12:05 mailadm Exp $) with ESMTP id m6I71SXm057364; Fri, 18 Jul 2008 09:01:28 +0200 (CEST) Received: from alaska.cert.siemens.com (alaska.cert.siemens.com [139.25.19.64]) by alaska.cert.siemens.com (8.14.2/8.14.2/$Ust: hosts/alaska/mail/config.mc,v 1.20 2006/06/21 05:39:02 ust Exp $) with ESMTP id m6I71S34006998; Fri, 18 Jul 2008 09:01:28 +0200 (CEST) (envelope-from ust@alaska.cert.siemens.com) Received: (from ust@localhost) by alaska.cert.siemens.com (8.14.2/8.14.2/$Ust: hosts/alaska/mail/submit.mc,v 1.6 2004/08/29 16:18:57 ust Exp $) id m6I71SQ8084365; Fri, 18 Jul 2008 09:01:28 +0200 (CEST) (envelope-from ust) Date: Fri, 18 Jul 2008 09:01:28 +0200 From: "Schweigert, Udo CERT" To: "freebsd-ports@freebsd.org" , timur@freebsd.org, Johan@double-l.nl Message-ID: <20080718070128.GA96102@alaska.cert.siemens.com> References: <20080709105617.GB31955@ctipc01.mby.riverwillow.net.au> <20080718043840.GB61437@rwpc12.mby.riverwillow.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080718043840.GB61437@rwpc12.mby.riverwillow.net.au> X-Operating-System: FreeBSD 6.3-STABLE User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Subject: Re: HEADS UP - samba 3.0.30 winbindd broken X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jul 2008 07:26:38 -0000 On Fri, Jul 18, 2008 at 14:38:40 +1000, John Marshall wrote: > On Wed, 09 Jul 2008, 20:56 +1000, John Marshall wrote: > > HEADS UP if you are thinking of upgrading net/samba3 to 3.0.30 in an Active > > Directory environment. > > > > I have recently upgraded from 3.0.28a to 3.0.30 on a couple of FreeBSD 7.0 > > servers: one is a member server in a Windows 2000 Active Directory > > environment, and the other is a member server in a Windows 2003 Active > > Directory environment. Everything works for a while and then winbindd goes > > into sulking mode. Re-starting fixes everythng for a little while. > > As Johan implied, this specific problem was fixed in 3.0.31 which was > released by the Samba team last Friday. I've been keeping a close eye on the > net/samba3 port but no update yet, so... The other possible solution is to apply this patch (as files/patch-nsswitch_winbindd.c in the ports dir). It has been taken from the samba bug-tracking system and I have been running a patched samba for some days now without a problem (under 6.3-RELEASE and -STABLE). --- nsswitch/winbindd.c.orig 2008-05-28 14:41:11.000000000 +0200 +++ nsswitch/winbindd.c 2008-07-16 13:26:22.000000000 +0200 @@ -117,14 +117,21 @@ /* 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 @@ } /* 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 @@ /* Check signal handling things */ - winbind_check_sigterm(); + winbind_check_sigterm(true); winbind_check_sighup(); if (do_sigusr2) { --- nsswitch/winbindd_dual.c.orig 2008-05-28 14:41:11.000000000 +0200 +++ nsswitch/winbindd_dual.c 2008-07-16 13:25:53.000000000 +0200 @@ -1015,7 +1015,7 @@ 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); Best regards Udo Schweigert Siemens AG Corporate Technology Information & Communication Siemens CERT Otto-Hahn-Ring 6 81730 München, Germany Tel.: +49 89 636-42170 Fax: +49 89 636-41166 mailto:udo.schweigert@siemens.com Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Jim Reid-Anderson, Hermann Requardt, Siegfried Russwurm, Peter Y. Solmssen Registered offices: Berlin and Munich, Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684 WEEE-Reg.-No. DE 23691322