From andre.albsmeier@mchp.siemens.de  Sun Oct 11 22:26:12 1998
Received: from david.siemens.de (david.siemens.de [192.35.17.14])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA07081
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 11 Oct 1998 22:26:10 -0700 (PDT)
          (envelope-from andre.albsmeier@mchp.siemens.de)
Received: from mail.siemens.de (salomon.siemens.de [139.23.33.13])
	by david.siemens.de (8.9.1a/8.9.1) with ESMTP id HAA29180
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Oct 1998 07:25:42 +0200 (MET DST)
Received: from curry.mchp.siemens.de (daemon@[146.180.31.23])
	by mail.siemens.de (8.9.1a/8.9.1) with ESMTP id HAA08213
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Oct 1998 07:25:43 +0200 (MET DST)
Received: (from daemon@localhost)
	by curry.mchp.siemens.de (8.8.8/8.8.8) id HAA21349
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 12 Oct 1998 07:25:43 +0200 (CEST)
Message-Id: <199810120525.HAA02160@internal>
Date: Mon, 12 Oct 1998 07:25:40 +0200 (CEST)
From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: samba's WINS database gets removed during system startup
X-Send-Pr-Version: 3.2

>Number:         8276
>Category:       ports
>Synopsis:       samba's WINS database gets removed during system startup
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    hosokawa
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 11 22:30:01 PDT 1998
>Closed-Date:    Thu Jul 22 14:32:24 PDT 1999
>Last-Modified:  Thu Jul 22 14:33:48 PDT 1999
>Originator:     Andre Albsmeier
>Release:        FreeBSD 2.2.7-STABLE i386
>Organization:
>Environment:

FreeBSD-STABLE and samba port.

>Description:

Samba puts its WINS database into /var/spool/lock/wins.dat. This
is because in the Makefile LOCKDIR points to /var/spool/lock.
Unfortunately, /var/spool/lock gets cleaned up completely during
a system boot.

>How-To-Repeat:

Install samba with WINS support, wait until the database fills up,
reboot. ls -l /var/spool/lock/wins.dat.

>Fix:
	
Let LOCKDIR point somewhere else, e.g. /var/db

>Release-Note:
>Audit-Trail:

From: Narvi <narvi@haldjas.folklore.ee>
To: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ports/8276: samba's WINS database gets removed during system startup
Date: Mon, 12 Oct 1998 21:51:06 +0300 (EEST)

 On Mon, 12 Oct 1998, Andre Albsmeier wrote:
 
 > 
 > >Number:         8276
 > >Category:       ports
 > >Synopsis:       samba's WINS database gets removed during system startup
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    freebsd-ports
 > >State:          open
 > >Quarter:
 > >Keywords:
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Sun Oct 11 22:30:01 PDT 1998
 > >Last-Modified:
 > >Originator:     Andre Albsmeier
 > >Organization:
 > >Release:        FreeBSD 2.2.7-STABLE i386
 > >Environment:
 > 
 > FreeBSD-STABLE and samba port.
 > 
 > >Description:
 > 
 > Samba puts its WINS database into /var/spool/lock/wins.dat. This
 > is because in the Makefile LOCKDIR points to /var/spool/lock.
 > Unfortunately, /var/spool/lock gets cleaned up completely during
 > a system boot.
 > 
 > >How-To-Repeat:
 > 
 > Install samba with WINS support, wait until the database fills up,
 > reboot. ls -l /var/spool/lock/wins.dat.
 > 
 > >Fix:
 > 	
 > Let LOCKDIR point somewhere else, e.g. /var/db
 > 
 
 While the problem is there, the fix is probably wrong *if* samba actually
 uses the LOCKDIR for locks (we want to have locks cleaned off during
 reboot) - which it does on cursory examination.
 
 The right fix is to change samba to use a different directory for the .dat
 files only, leaving the LOCKS in /var/spool/lock
 
 > >Audit-Trail:
 > >Unformatted:
 
 	Sander
 
 	There is no love, no good, no happiness and no future -
 	all these are just illusions.
 
 
 

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: narvi@haldjas.folklore.ee (Narvi)
Cc: andre.albsmeier@mchp.siemens.de, FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: ports/8276: samba's WINS database gets removed during system startup
Date: Tue, 13 Oct 1998 07:39:27 +0200 (CEST)

 > > >How-To-Repeat:
 > > 
 > > Install samba with WINS support, wait until the database fills up,
 > > reboot. ls -l /var/spool/lock/wins.dat.
 > > 
 > > >Fix:
 > > 	
 > > Let LOCKDIR point somewhere else, e.g. /var/db
 > > 
 > 
 > While the problem is there, the fix is probably wrong *if* samba actually
 > uses the LOCKDIR for locks (we want to have locks cleaned off during
 > reboot) - which it does on cursory examination.
 > 
 > The right fix is to change samba to use a different directory for the .dat
 > files only, leaving the LOCKS in /var/spool/lock
 
 
 In this case you are right, of course. Let's see what we have got
 in /var/spool/lock:
 
 root@linkfix:/var/spool/lock>ll
 total 41
 -rw-r--r--  1 root  dialer  - 102400 Oct  9 09:58 SHARE_MEM_FILE
 -rw-r--r--  1 root  dialer  -      8 Oct  9 09:58 SHARE_MEM_FILE.processes
 -rw-r--r--  1 root  dialer  -    200 Oct  8 09:53 STATUS..LCK
 -rw-r--r--  1 root  dialer  -    286 Oct 13 07:32 browse.dat
 -rw-r--r--  1 root  dialer  -  13912 Oct 13 07:34 wins.dat
 
 I assume the two .dat files are the ones to go somewhere else, as you
 said. Do you think /var/db would be appropriate?
 
 	-Andre

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: freebsd-gnats-submit@freebsd.org
Cc:  Subject: Re: ports/8276: samba's WINS database gets removed during system startup
Date: Sun, 29 Nov 1998 12:12:09 +0100

 Here is a small patch which moves wins.dat and browse.dat to
 /var/db. It's running nice for about 6 weeks now.
 
 
 *** nmbd_winsserver.c.ORI	Tue Oct 13 07:46:23 1998
 --- nmbd_winsserver.c	Tue Oct 13 07:54:59 1998
 ***************
 *** 134,139 ****
 --- 134,140 ----
     pstrcpy(fname,lp_lockdir());
     trim_string(fname,NULL,"/");
     pstrcat(fname,"/");
 +   pstrcpy( fname, "/var/db/" );
     pstrcat(fname,WINS_LIST);
   
     if((fp = fopen(fname,"r")) == NULL)
 ***************
 *** 1542,1547 ****
 --- 1543,1549 ----
     fstrcpy(fname,lp_lockdir());
     trim_string(fname,NULL,"/");
     pstrcat(fname,"/");
 +   pstrcpy( fname, "/var/db/" );
     pstrcat(fname,WINS_LIST);
     pstrcpy(fnamenew,fname);
     pstrcat(fnamenew,".");
 --- ipc.c.ORI	Sun Nov 29 11:41:32 1998
 +++ ipc.c	Sun Nov 29 11:42:00 1998
 @@ -944,6 +944,7 @@
    pstrcpy(fname,lp_lockdir());
    trim_string(fname,NULL,"/");
    pstrcat(fname,"/");
 +  pstrcpy( fname, "/var/db/" );
    pstrcat(fname,SERVER_LIST);
  
    f = fopen(fname,"r");
 *** nmbd_serverlistdb.c.ORI	Sun Nov 29 11:39:44 1998
 --- nmbd_serverlistdb.c	Sun Nov 29 11:42:53 1998
 ***************
 *** 340,345 ****
 --- 340,346 ----
     pstrcpy(fname,lp_lockdir());
     trim_string(fname,NULL,"/");
     pstrcat(fname,"/");
 +   pstrcpy( fname, "/var/db/" );
     pstrcat(fname,SERVER_LIST);
     pstrcpy(fnamenew,fname);
     pstrcat(fnamenew,".");
Responsible-Changed-From-To: freebsd-ports->hosokawa 
Responsible-Changed-By: steve 
Responsible-Changed-When: Thu Dec 10 15:44:03 PST 1998 
Responsible-Changed-Why:  
Over to this port's maintainer. 

From: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/8276: samba's WINS database gets removed during system startup
Date: Mon, 12 Jul 1999 20:57:05 +0200

 Please close me, I am fixed :-)
 
 	-Andre
 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Thu Jul 22 14:32:24 PDT 1999 
State-Changed-Why:  

1.1 Mon Jul 12 8:38:14 1999 UTC by hosokawa  

PR that was never closed. 
this change wnet into ports/net/samba/patches/patch-ag 
>Unformatted:
