[Pkg-samba-maint] r1882 - in branches/samba/upstream: . docs/htmldocs/manpages docs/manpages examples/LDAP source source/groupdb source/include source/intl source/lib source/libgpo source/libsmb source/nmbd source/nsswitch source/pam_smbpass source/param source/passdb source/printing source/registry source/rpc_server source/script source/smbd source/utils

bubulle at alioth.debian.org bubulle at alioth.debian.org
Thu May 22 09:48:30 UTC 2008


Author: bubulle
Date: 2008-05-22 09:48:21 +0000 (Thu, 22 May 2008)
New Revision: 1882

Removed:
   branches/samba/upstream/.#WHATSNEW.txt
   branches/samba/upstream/.pc/
   branches/samba/upstream/source/autom4te.cache/
Modified:
   branches/samba/upstream/docs/htmldocs/manpages/smb.conf.5.html
   branches/samba/upstream/docs/manpages/lmhosts.5
   branches/samba/upstream/docs/manpages/net.8
   branches/samba/upstream/docs/manpages/nmbd.8
   branches/samba/upstream/docs/manpages/ntlm_auth.1
   branches/samba/upstream/docs/manpages/smb.conf.5
   branches/samba/upstream/docs/manpages/smbd.8
   branches/samba/upstream/docs/manpages/swat.8
   branches/samba/upstream/docs/manpages/tdbbackup.8
   branches/samba/upstream/docs/manpages/winbindd.8
   branches/samba/upstream/examples/LDAP/README
   branches/samba/upstream/source/Makefile.in
   branches/samba/upstream/source/VERSION
   branches/samba/upstream/source/configure
   branches/samba/upstream/source/configure.in
   branches/samba/upstream/source/dynconfig.c
   branches/samba/upstream/source/groupdb/mapping_tdb.c
   branches/samba/upstream/source/include/config.h.in
   branches/samba/upstream/source/include/dynconfig.h
   branches/samba/upstream/source/include/local.h
   branches/samba/upstream/source/intl/lang_tdb.c
   branches/samba/upstream/source/lib/account_pol.c
   branches/samba/upstream/source/lib/sharesec.c
   branches/samba/upstream/source/lib/util.c
   branches/samba/upstream/source/lib/util_unistr.c
   branches/samba/upstream/source/libgpo/gpo_fetch.c
   branches/samba/upstream/source/libsmb/samlogon_cache.c
   branches/samba/upstream/source/nmbd/nmbd_serverlistdb.c
   branches/samba/upstream/source/nmbd/nmbd_winsserver.c
   branches/samba/upstream/source/nsswitch/idmap_cache.c
   branches/samba/upstream/source/nsswitch/idmap_tdb.c
   branches/samba/upstream/source/nsswitch/winbindd_cache.c
   branches/samba/upstream/source/pam_smbpass/README
   branches/samba/upstream/source/pam_smbpass/pam_smb_acct.c
   branches/samba/upstream/source/pam_smbpass/pam_smb_auth.c
   branches/samba/upstream/source/pam_smbpass/pam_smb_passwd.c
   branches/samba/upstream/source/pam_smbpass/support.c
   branches/samba/upstream/source/pam_smbpass/support.h
   branches/samba/upstream/source/param/loadparm.c
   branches/samba/upstream/source/passdb/login_cache.c
   branches/samba/upstream/source/passdb/pdb_tdb.c
   branches/samba/upstream/source/passdb/secrets.c
   branches/samba/upstream/source/printing/nt_printing.c
   branches/samba/upstream/source/printing/printing.c
   branches/samba/upstream/source/printing/printing_db.c
   branches/samba/upstream/source/registry/reg_db.c
   branches/samba/upstream/source/registry/reg_perfcount.c
   branches/samba/upstream/source/rpc_server/srv_eventlog_lib.c
   branches/samba/upstream/source/script/installswat.sh
   branches/samba/upstream/source/smbd/lanman.c
   branches/samba/upstream/source/utils/smbcontrol.c
   branches/samba/upstream/source/utils/status.c
Log:
Load samba-3.0.29 into branches/samba/upstream.

Deleted: branches/samba/upstream/.#WHATSNEW.txt
===================================================================
--- branches/samba/upstream/.#WHATSNEW.txt	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/.#WHATSNEW.txt	2008-05-22 09:48:21 UTC (rev 1882)
@@ -1 +0,0 @@
-link bubulle at mykerinos.kheops.frmug.org.5538
\ No newline at end of file

Modified: branches/samba/upstream/docs/htmldocs/manpages/smb.conf.5.html
===================================================================
--- branches/samba/upstream/docs/htmldocs/manpages/smb.conf.5.html	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/htmldocs/manpages/smb.conf.5.html	2008-05-22 09:48:21 UTC (rev 1882)
@@ -164,8 +164,8 @@
 	their own share definitions has been added. This capability is called <span class="emphasis"><em>usershares</em></span> and
 	is controlled by a set of parameters in the [global] section of the smb.conf.
 	The relevant parameters are :
-	</p><div class="variablelist"><dl><dt><span class="term">usershare allow guests</span></dt><dd><p>Controls if usershares can permit guest access.</p></dd><dt><span class="term">usershare max shares</span></dt><dd><p>Maximum number of user defined shares allowed.</p></dd><dt><span class="term">usershare owner only</span></dt><dd><p>If set only directories owned by the sharing user can be shared.</p></dd><dt><span class="term">usershare path</span></dt><dd><p>Points to the directory containing the user-defined share definitions.
-		The filesystem permissions on this directory control who can create user-defined shares.</p></dd><dt><span class="term">usershare prefix allow list</span></dt><dd><p>Comma-separated list of absolute pathnames restricting what directories
+	</p><div class="variablelist"><dl><dt><span class="term">usershare allow guests</span></dt><dd><p>Controls if usershares can permit guest access.</p></dd><dt><span class="term">usershare max shares</span></dt><dd><p>Maximum number of user defined shares allowed.</p></dd><dt><span class="term">usershare owner only</span></dt><dd><p>If set only directories owned by the sharing user can be shared.</p></dd><dt><span class="term">usershare path</span></dt><dd><p>Points to the directory containing the user defined share definitions.
+		The filesystem permissions on this directory control who can create user defined shares.</p></dd><dt><span class="term">usershare prefix allow list</span></dt><dd><p>Comma-separated list of absolute pathnames restricting what directories
 		can be shared. Only directories below the pathnames in this list are permitted.</p></dd><dt><span class="term">usershare prefix deny list</span></dt><dd><p>Comma-separated list of absolute pathnames restricting what directories
 		can be shared. Directories below the pathnames in this list are prohibited.</p></dd><dt><span class="term">usershare template share</span></dt><dd><p>Names a pre-existing share used as a template for creating new usershares.
 		All other share parameters not specified in the user defined share definition
@@ -871,7 +871,7 @@
     without Windows 95/98 servers are advised to disable
     this option.  </p><p>Disabling this option will also disable the <code class="literal">client plaintext auth</code> option</p><p>Likewise, if the <code class="literal">client ntlmv2
     auth</code> parameter is enabled, then only NTLMv2 logins will be
-    attempted.</p><p>Default: <span class="emphasis"><em><em class="parameter"><code>client lanman auth</code></em> = <code class="literal">no</code>
+    attempted.</p><p>Default: <span class="emphasis"><em><em class="parameter"><code>client lanman auth</code></em> = <code class="literal">yes</code>
 </em></span>
 </p></dd></dl></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id328533"></a>
 
@@ -892,7 +892,7 @@
 
 client plaintext auth (G)
 </h3></div></div></div><a class="indexterm" name="id328614"></a><a name="CLIENTPLAINTEXTAUTH"></a><div class="variablelist"><dl><dt></dt><dd><p>Specifies whether a client should send a plaintext 
-		password if the server does not support encrypted passwords.</p><p>Default: <span class="emphasis"><em><em class="parameter"><code>client plaintext auth</code></em> = <code class="literal">no</code>
+		password if the server does not support encrypted passwords.</p><p>Default: <span class="emphasis"><em><em class="parameter"><code>client plaintext auth</code></em> = <code class="literal">yes</code>
 </em></span>
 </p></dd></dl></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id328651"></a>
 
@@ -2404,7 +2404,7 @@
     auth</code> to disable this for Samba's clients (such as smbclient)</p><p>If this option, and <code class="literal">ntlm
     auth</code> are both disabled, then only NTLMv2 logins will be
     permited.  Not all clients support NTLMv2, and most will require
-    special configuration to use it.</p><p>Default: <span class="emphasis"><em><em class="parameter"><code>lanman auth</code></em> = <code class="literal">no</code>
+    special configuration to use it.</p><p>Default: <span class="emphasis"><em><em class="parameter"><code>lanman auth</code></em> = <code class="literal">yes</code>
 </em></span>
 </p></dd></dl></div></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="id335983"></a>
 

Modified: branches/samba/upstream/docs/manpages/lmhosts.5
===================================================================
--- branches/samba/upstream/docs/manpages/lmhosts.5	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/lmhosts.5	2008-05-22 09:48:21 UTC (rev 1882)
@@ -83,8 +83,10 @@
 file\.
 .SH "FILES"
 .PP
-lmhosts is loaded from the configuration directory. This is
-\fI/etc/samba\fR.
+lmhosts is loaded from the configuration directory\. This is usually
+\fI/etc/samba\fR
+or
+\fI/usr/local/samba/lib\fR\.
 .SH "VERSION"
 .PP
 This man page is correct for version 3\.0 of the Samba suite\.

Modified: branches/samba/upstream/docs/manpages/net.8
===================================================================
--- branches/samba/upstream/docs/manpages/net.8	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/net.8	2008-05-22 09:48:21 UTC (rev 1882)
@@ -662,7 +662,7 @@
 .PP
 Starting with version 3\.0\.23, a Samba server now supports the ability for non\-root users to add user defined shares to be exported using the "net usershare" commands\.
 .PP
-Members of the UNIX group "sambashare" can create user defined shares on demand using the commands below.
+To set this up, first set up your smb\.conf by adding to the [global] section: usershare path = /usr/local/samba/lib/usershares Next create the directory /usr/local/samba/lib/usershares, change the owner to root and set the group owner to the UNIX group who should have the ability to create usershares, for example a group called "serverops"\. Set the permissions on /usr/local/samba/lib/usershares to 01770\. (Owner and group all access, no access for others, plus the sticky bit, which means that a file in that directory can be renamed or deleted only by the owner of the file)\. Finally, tell smbd how many usershares you will allow by adding to the [global] section of smb\.conf a line such as : usershare max shares = 100\. To allow 100 usershare definitions\. Now, members of the UNIX group "serverops" can create user defined shares on demand using the commands below\.
 .PP
 The usershare commands are:
 .IP "" 4

Modified: branches/samba/upstream/docs/manpages/nmbd.8
===================================================================
--- branches/samba/upstream/docs/manpages/nmbd.8	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/nmbd.8	2008-05-22 09:48:21 UTC (rev 1882)
@@ -107,9 +107,11 @@
 to answer any name queries\. Adding a line to this file affects name NetBIOS resolution from this host
 \fIONLY\fR\.
 .sp
-The default path to this file is
-\fI/etc/samba/lmhosts\fR.
-See the
+The default path to this file is compiled into Samba as part of the build process\. Common defaults are
+\fI/usr/local/samba/lib/lmhosts\fR,
+\fI/usr/samba/lib/lmhosts\fR
+or
+\fI/etc/samba/lmhosts\fR\. See the
 \fBlmhosts\fR(5)
 man page for details on the contents of this file\.
 .RE
@@ -177,11 +179,14 @@
 inetd, this file must contain a mapping of service name (e\.g\., netbios\-ssn) to service port (e\.g\., 139) and protocol type (e\.g\., tcp)\.
 .RE
 .PP
-\fI/etc/samba/smb\.conf\fR
+\fI/usr/local/samba/lib/smb\.conf\fR
 .RS 4
 This is the default location of the
 \fBsmb.conf\fR(5)
-server configuration file.
+server configuration file\. Other common places that systems install this file are
+\fI/usr/samba/lib/smb\.conf\fR
+and
+\fI/etc/samba/smb\.conf\fR\.
 .sp
 When run as a WINS server (see the
 \fIwins support\fR
@@ -225,8 +230,10 @@
 will accept SIGHUP, which will cause it to dump out its namelists into the file
 \fInamelist\.debug \fR
 in the
-\fI/var/run/samba\fR
-directory. This will also cause
+\fI/usr/local/samba/var/locks\fR
+directory (or the
+\fIvar/locks\fR
+directory configured under wherever Samba was configured to install itself)\. This will also cause
 nmbd
 to dump out its server database in the
 \fIlog\.nmb\fR

Modified: branches/samba/upstream/docs/manpages/ntlm_auth.1
===================================================================
--- branches/samba/upstream/docs/manpages/ntlm_auth.1	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/ntlm_auth.1	2008-05-22 09:48:21 UTC (rev 1882)
@@ -35,7 +35,7 @@
 Some of these commands also require access to the directory
 \fIwinbindd_privileged\fR
 in
-\fI/var/run/samba\fR. This should be done either by running this command as root or providing group access to the
+\fI$LOCKDIR\fR\. This should be done either by running this command as root or providing group access to the
 \fIwinbindd_privileged\fR
 directory\. For security reasons, this directory should not be world\-accessable\.
 .SH "OPTIONS"
@@ -61,7 +61,7 @@
 Requires access to the directory
 \fIwinbindd_privileged\fR
 in
-\fI/var/run/samba\fR. The protocol used is described here:
+\fI$LOCKDIR\fR\. The protocol used is described here:
 http://devel\.squid\-cache\.org/ntlm/squid_helper_protocol\.html\. This protocol has been extended to allow the NTLMSSP Negotiate packet to be included as an argument to the
 YR
 command\. (Thus avoiding loss of information in the protocol exchange)\.
@@ -84,7 +84,7 @@
 Requires access to the directory
 \fIwinbindd_privileged\fR
 in
-\fI/var/run/samba\fR.
+\fI$LOCKDIR\fR\.
 .RE
 .PP
 gss\-spnego\-client

Modified: branches/samba/upstream/docs/manpages/smb.conf.5
===================================================================
--- branches/samba/upstream/docs/manpages/smb.conf.5	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/smb.conf.5	2008-05-22 09:48:21 UTC (rev 1882)
@@ -287,8 +287,32 @@
 Names a pre\-existing share used as a template for creating new usershares\. All other share parameters not specified in the user defined share definition are copied from this named share\.
 .RE
 .PP
-Members of the \fBsambashare\fR group can manipulate the user defined shares using the following commands:
+To allow members of the UNIX group
+foo
+to create user defined shares, create the directory to contain the share definitions as follows:
 .PP
+Become root:
+.sp
+.RS 4
+.nf
+mkdir /usr/local/samba/lib/usershares
+chgrp foo /usr/local/samba/lib/usershares
+chmod 1770 /usr/local/samba/lib/usershares
+.fi
+.RE
+.PP
+Then add the parameters
+.sp
+.RS 4
+.nf
+	\fIusershare path = /usr/local/samba/lib/usershares\fR
+	\fIusershare max shares = 10\fR # (or the desired number of shares)
+.fi
+.RE
+.sp
+to the global section of your
+\fIsmb\.conf\fR\. Members of the group foo may then manipulate the user defined shares using the following commands\.
+.PP
 net usershare add sharename path [comment] [acl] [guest_ok=[y|n]]
 .RS 4
 To create or modify (overwrite) a user defined share\.
@@ -669,8 +693,8 @@
 Default:
 \fI\fIadd machine script\fR\fR\fI = \fR\fI\fR\fI \fR
 .sp
-Example for Debian:
-\fB\fIadd machine script\fR = /usr/sbin/adduser -n -g machines -c Machine -d /var/lib/samba -s /bin/false %u \fR
+Example:
+\fI\fIadd machine script\fR\fR\fI = \fR\fI/usr/sbin/adduser \-n \-g machines \-c Machine \-d /var/lib/nobody \-s /bin/false %u\fR\fI \fR
 .RE
 
 add port command (G)
@@ -1491,7 +1515,7 @@
 parameter is enabled, then only NTLMv2 logins will be attempted\.
 .sp
 Default:
-\fI\fIclient lanman auth\fR\fR\fI = \fR\fIno\fR\fI \fR
+\fI\fIclient lanman auth\fR\fR\fI = \fR\fIyes\fR\fI \fR
 .RE
 
 client ntlmv2 auth (G)
@@ -1524,7 +1548,7 @@
 Specifies whether a client should send a plaintext password if the server does not support encrypted passwords\.
 .sp
 Default:
-\fI\fIclient plaintext auth\fR\fR\fI = \fR\fIno\fR\fI \fR
+\fI\fIclient plaintext auth\fR\fR\fI = \fR\fIyes\fR\fI \fR
 .RE
 
 client schannel (G)
@@ -3624,7 +3648,7 @@
 are both disabled, then only NTLMv2 logins will be permited\. Not all clients support NTLMv2, and most will require special configuration to use it\.
 .sp
 Default:
-\fI\fIlanman auth\fR\fR\fI = \fR\fIno\fR\fI \fR
+\fI\fIlanman auth\fR\fR\fI = \fR\fIyes\fR\fI \fR
 .RE
 
 large readwrite (G)
@@ -8479,23 +8503,23 @@
 .RS 4
 This parameter specifies the absolute path of the directory on the filesystem used to store the user defined share definition files\. This directory must be owned by root, and have no access for other, and be writable only by the group owner\. In addition the "sticky" bit must also be set, restricting rename and delete to owners of a file (in the same way the /tmp directory is usually configured)\. Members of the group owner of this directory are the users allowed to create usershares\. If this parameter is undefined then no user defined shares are allowed\.
 .sp
-For example, on Debian the default usershare directory of /var/lib/samba/usershares is set up as follows.
+For example, a valid usershare directory might be /usr/local/samba/lib/usershares, set up as follows\.
 .sp
 
 .sp
 .RS 4
 .nf
-	ls \-ld /var/lib/samba/usershares/
-	drwxrwx\-\-T  2 root sambashare 4096 2006\-05\-05 12:27 /var/lib/samba/usershares/
+	ls \-ld /usr/local/samba/lib/usershares/
+	drwxrwx\-\-T  2 root power_users 4096 2006\-05\-05 12:27 /usr/local/samba/lib/usershares/
 	
 .fi
 .RE
 .sp
 .sp
-In this case, only members of the group "sambashare" can create user defined shares.
+In this case, only members of the group "power_users" can create user defined shares\.
 .sp
 Default:
-\fB\fIusershare path\fR = /var/lib/samba/usershares \fR
+\fI\fIusershare path\fR\fR\fI = \fR\fINULL\fR\fI \fR
 .RE
 
 usershare prefix allow list (G)

Modified: branches/samba/upstream/docs/manpages/smbd.8
===================================================================
--- branches/samba/upstream/docs/manpages/smbd.8	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/smbd.8	2008-05-22 09:48:21 UTC (rev 1882)
@@ -161,11 +161,14 @@
 inetd, this file must contain a mapping of service name (e\.g\., netbios\-ssn) to service port (e\.g\., 139) and protocol type (e\.g\., tcp)\.
 .RE
 .PP
-\fI/etc/samba/smb\.conf\fR
+\fI/usr/local/samba/lib/smb\.conf\fR
 .RS 4
 This is the default location of the
 \fBsmb.conf\fR(5)
-server configuration file.
+server configuration file\. Other common places that systems install this file are
+\fI/usr/samba/lib/smb\.conf\fR
+and
+\fI/etc/samba/smb\.conf\fR\.
 .sp
 This file describes all the services the server is to make available to clients\. See
 \fBsmb.conf\fR(5)

Modified: branches/samba/upstream/docs/manpages/swat.8
===================================================================
--- branches/samba/upstream/docs/manpages/swat.8	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/swat.8	2008-05-22 09:48:21 UTC (rev 1882)
@@ -103,6 +103,85 @@
 .RS 4
 Print a summary of command line options\.
 .RE
+.SH "INSTALLATION"
+.PP
+Swat is included as binary package with most distributions\. The package manager in this case takes care of the installation and configuration\. This section is only for those who have compiled swat from scratch\.
+.PP
+After you compile SWAT you need to run
+make install
+to install the
+swat
+binary and the various help files and images\. A default install would put these in:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+/usr/local/samba/sbin/swat
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+/usr/local/samba/swat/images/*
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+/usr/local/samba/swat/help/*
+.sp
+.RE
+.SS "Inetd Installation"
+.PP
+You need to edit your
+\fI/etc/inetd\.conf \fR
+and
+\fI/etc/services\fR
+to enable SWAT to be launched via
+inetd\.
+.PP
+In
+\fI/etc/services\fR
+you need to add a line like this:
+.PP
+swat 901/tcp
+.PP
+Note for NIS/YP and LDAP users \- you may need to rebuild the NIS service maps rather than alter your local
+\fI /etc/services\fR
+file\.
+.PP
+the choice of port number isn\'t really important except that it should be less than 1024 and not currently used (using a number above 1024 presents an obscure security hole depending on the implementation details of your
+inetd
+daemon)\.
+.PP
+In
+\fI/etc/inetd\.conf\fR
+you should add a line like this:
+.PP
+swat stream tcp nowait\.400 root /usr/local/samba/sbin/swat swat
+.PP
+Once you have edited
+\fI/etc/services\fR
+and
+\fI/etc/inetd\.conf\fR
+you need to send a HUP signal to inetd\. To do this use
+kill \-1 PID
+where PID is the process ID of the inetd daemon\.
 .SH "LAUNCHING"
 .PP
 To launch SWAT just run your favorite web browser and point it at "http://localhost:901/"\.
@@ -120,11 +199,14 @@
 This file must contain a mapping of service name (e\.g\., swat) to service port (e\.g\., 901) and protocol type (e\.g\., tcp)\.
 .RE
 .PP
-\fI/etc/samba/smb\.conf\fR
+\fI/usr/local/samba/lib/smb\.conf\fR
 .RS 4
 This is the default location of the
 \fBsmb.conf\fR(5)
-server configuration file that swat edits. This file describes all the services the server is to make available to clients.
+server configuration file that swat edits\. Other common places that systems install this file are
+\fI /usr/samba/lib/smb\.conf\fR
+and
+\fI/etc/smb\.conf \fR\. This file describes all the services the server is to make available to clients\.
 .RE
 .SH "WARNINGS"
 .PP

Modified: branches/samba/upstream/docs/manpages/tdbbackup.8
===================================================================
--- branches/samba/upstream/docs/manpages/tdbbackup.8	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/tdbbackup.8	2008-05-22 09:48:21 UTC (rev 1882)
@@ -69,7 +69,7 @@
 .\}
 
 secrets\.tdb
-\- in the /var/lib/samba directory.
+\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\.
 .RE
 .sp
 .RS 4
@@ -82,7 +82,7 @@
 .\}
 
 passdb\.tdb
-\- in the /var/lib/samba directory.
+\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\.
 .RE
 .sp
 .RS 4
@@ -95,7 +95,7 @@
 .\}
 
 *\.tdb
-located in the /var/lib/samba and /var/run/samba directories.
+located in the /usr/local/samba/var directory or on some systems in the /var/cache or /var/lib/samba directories\.
 .SH "VERSION"
 .PP
 This man page is correct for version 3\.0 of the Samba suite\.

Modified: branches/samba/upstream/docs/manpages/winbindd.8
===================================================================
--- branches/samba/upstream/docs/manpages/winbindd.8	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/docs/manpages/winbindd.8	2008-05-22 09:48:21 UTC (rev 1882)
@@ -518,16 +518,16 @@
 file are owned by root\.
 .RE
 .PP
-/var/run/samba/winbindd_privileged/pipe
+$LOCKDIR/winbindd_privileged/pipe
 .RS 4
 The UNIX pipe over which \'privileged\' clients communicate with the
 winbindd
 program\. For security reasons, access to some winbindd functions \- like those needed by the
 ntlm_auth
-utility - is restricted. By default, only users in the 'root' group will get this access, however the administrator may change the group permissions on /var/run/samba/winbindd_privileged to allow programs like 'squid' to use ntlm_auth. Note that the winbind client will only attempt to connect to the winbindd daemon if both the
-\fI/var/run/samba/winbindd_privileged\fR
+utility \- is restricted\. By default, only users in the \'root\' group will get this access, however the administrator may change the group permissions on $LOCKDIR/winbindd_privileged to allow programs like \'squid\' to use ntlm_auth\. Note that the winbind client will only attempt to connect to the winbindd daemon if both the
+\fI$LOCKDIR/winbindd_privileged\fR
 directory and
-\fI/var/run/samba/winbindd_privileged/pipe\fR
+\fI$LOCKDIR/winbindd_privileged/pipe\fR
 file are owned by root\.
 .RE
 .PP
@@ -536,12 +536,15 @@
 Implementation of name service switch library\.
 .RE
 .PP
-/var/run/samba/winbindd_idmap\.tdb
+$LOCKDIR/winbindd_idmap\.tdb
 .RS 4
-Storage for the Windows NT rid to UNIX user/group id mapping.
+Storage for the Windows NT rid to UNIX user/group id mapping\. The lock directory is specified when Samba is initially compiled using the
+\fI\-\-with\-lockdir\fR
+option\. This directory is by default
+\fI/usr/local/samba/var/locks \fR\.
 .RE
 .PP
-/var/run/samba/winbindd_cache\.tdb
+$LOCKDIR/winbindd_cache\.tdb
 .RS 4
 Storage for cached user and group information\.
 .RE

Modified: branches/samba/upstream/examples/LDAP/README
===================================================================
--- branches/samba/upstream/examples/LDAP/README	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/examples/LDAP/README	2008-05-22 09:48:21 UTC (rev 1882)
@@ -59,9 +59,6 @@
 The smbldap-tools package can be downloaded individually from 
 http://samba.idealx.org/dist/
 
-On Debian systems, the smbldap-tools exists as a separate package
-and is not included in LDAP examples.
-
 !==
 !== end of README
 !==

Modified: branches/samba/upstream/source/Makefile.in
===================================================================
--- branches/samba/upstream/source/Makefile.in	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/Makefile.in	2008-05-22 09:48:21 UTC (rev 1882)
@@ -106,13 +106,6 @@
 # the directory where lock files go
 LOCKDIR = @lockdir@
 
-# FHS directories; equal to LOCKDIR if not using --with-fhs
-CACHEDIR = @cachedir@
-STATEDIR = @statedir@
-
-# Where to look for (and install) codepage databases.
-CODEPAGEDIR = @codepagedir@
-
 # the directory where pid files go
 PIDDIR = @piddir@
 
@@ -146,7 +139,7 @@
 PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\"  -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
 PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
 	      -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
-PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\" -DCACHEDIR=\"$(CACHEDIR)\" -DSTATEDIR=\"$(STATEDIR)\"
+PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
 PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
 
 # Note that all executable programs now provide for an optional executable suffix.
@@ -1161,7 +1154,7 @@
 
 bin/libsmbclient. at SHLIBEXT@: proto_exists $(LIBSMBCLIENT_OBJ)
 	@echo Linking libsmbclient shared library $@
-	@$(SHLD) $(LDSHFLAGS) -Wl,-z,defs -o $@ $(LIBSMBCLIENT_OBJ) $(LIBS) \
+	@$(SHLD) $(LDSHFLAGS) -o $@ $(LIBSMBCLIENT_OBJ) $(LIBS) \
 		$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \
 		@SONAMEFLAG@`basename $@`.$(LIBSMBCLIENT_MAJOR)
 
@@ -1620,10 +1613,10 @@
 	@$(SHELL) $(srcdir)/script/installscripts.sh $(INSTALLPERMS) $(DESTDIR)$(BINDIR) $(SCRIPTS)
 
 installdat: installdirs
-	@$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
+	@$(SHELL) $(srcdir)/script/installdat.sh $(DESTDIR) $(LIBDIR) $(srcdir)
 
 installmsg: installdirs
-	@$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(CODEPAGEDIR) $(srcdir)
+	@$(SHELL) $(srcdir)/script/installmsg.sh $(DESTDIR) $(LIBDIR) $(srcdir)
 
 installswat: installdirs installmsg
 	@$(SHELL) $(srcdir)/script/installswat.sh $(DESTDIR) $(SWATDIR) $(srcdir)

Modified: branches/samba/upstream/source/VERSION
===================================================================
--- branches/samba/upstream/source/VERSION	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/VERSION	2008-05-22 09:48:21 UTC (rev 1882)
@@ -95,5 +95,5 @@
 # e.g. SAMBA_VERSION_VENDOR_SUFFIX=vendor_version()    #
 #  ->  "CVS 3.0.0rc2-VendorVersion"                    #
 ########################################################
-SAMBA_VERSION_VENDOR_SUFFIX="Debian"
+SAMBA_VERSION_VENDOR_SUFFIX=
 SAMBA_VERSION_VENDOR_PATCH=

Modified: branches/samba/upstream/source/configure
===================================================================
--- branches/samba/upstream/source/configure	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/configure	2008-05-22 09:48:21 UTC (rev 1882)
@@ -671,9 +671,6 @@
 logfilebase
 privatedir
 swatdir
-codepagedir
-statedir
-cachedir
 rootsbindir
 pammodulesdir
 SAMBA_CPPFLAGS
@@ -2154,7 +2151,7 @@
 if test "${with_fhs+set}" = set; then
   withval=$with_fhs;  case "$withval" in
   yes)
-    lockdir="\${VARDIR}/run/samba"
+    lockdir="\${VARDIR}/lib/samba"
     piddir="\${VARDIR}/run"
     mandir="\${prefix}/share/man"
     logfilebase="\${VARDIR}/log/samba"
@@ -2162,14 +2159,6 @@
     libdir="\${prefix}/lib/samba"
     configdir="\${sysconfdir}/samba"
     swatdir="\${DATADIR}/samba/swat"
-    codepagedir="\${DATADIR}/samba"
-    statedir="\${VARDIR}/lib/samba"
-    cachedir="\${VARDIR}/cache/samba"
-
-cat >>confdefs.h <<\_ACEOF
-#define FHS_COMPATIBLE 1
-_ACEOF
-
     ;;
   esac
 fi
@@ -2473,9 +2462,6 @@
 
 
 
-
-
-
 ## check for --enable-debug first before checking CFLAGS before
 ## so that we don't mix -O and -g
 # Check whether --enable-debug was given.
@@ -11630,27 +11616,6 @@
       fi
     ;;
 
-# Systems with LFS support.
-#
-    gnu* | k*bsd*-gnu)
-	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
-
-cat >>confdefs.h <<\_ACEOF
-#define _LARGEFILE64_SOURCE 1
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _FILE_OFFSET_BITS 64
-_ACEOF
-
-
-cat >>confdefs.h <<\_ACEOF
-#define _GNU_SOURCE 1
-_ACEOF
-
-	;;
-
 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
 #
     *linux*)
@@ -34704,7 +34669,7 @@
 #
 #
 case "$host_os" in
-    linux*-gnu* | gnu* | k*bsd*-gnu)
+    *linux*)
        # glibc <= 2.3.2 has a broken getgrouplist
        if test "$cross_compiling" = yes; then
   { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
@@ -39612,14 +39577,11 @@
 
   # and these are for particular systems
   case "$host_os" in
-		linux*-gnu* | gnu* | k*bsd*-gnu)
-			case "$host_os" in linux*)
-
+		*linux*)
 cat >>confdefs.h <<\_ACEOF
 #define LINUX 1
 _ACEOF
- ;;
-			esac
+
 			BLDSHARED="true"
 			if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
 				LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined"
@@ -62350,7 +62312,7 @@
 echo "${ECHO_T}yes" >&6; };
 
 	case "$host_os" in
-	linux*-gnu* | gnu* | k*bsd*-gnu)
+	*linux*)
 		{ echo "$as_me:$LINENO: checking for linux sendfile64 support" >&5
 echo $ECHO_N "checking for linux sendfile64 support... $ECHO_C" >&6; }
 if test "${samba_cv_HAVE_SENDFILE64+set}" = set; then
@@ -63372,11 +63334,11 @@
 SMB_KRB5_LOCATOR="bin/smb_krb5_locator.$SHLIBEXT"
 
 case "$host_os" in
-	linux*-gnu* | gnu* | k*bsd*-gnu)
+	*linux*)
 		NSSSONAMEVERSIONSUFFIX=".2"
 		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o"
 		;;
-	freebsd5*|*freebsd[6-9]*)
+	*freebsd[5-9]*)
 		# FreeBSD winbind client is implemented as a wrapper around
 		# the Linux version.
 		NSSSONAMEVERSIONSUFFIX=".1"
@@ -67933,9 +67895,6 @@
 logfilebase!$logfilebase$ac_delim
 privatedir!$privatedir$ac_delim
 swatdir!$swatdir$ac_delim
-codepagedir!$codepagedir$ac_delim
-statedir!$statedir$ac_delim
-cachedir!$cachedir$ac_delim
 rootsbindir!$rootsbindir$ac_delim
 pammodulesdir!$pammodulesdir$ac_delim
 SAMBA_CPPFLAGS!$SAMBA_CPPFLAGS$ac_delim
@@ -67973,6 +67932,9 @@
 PASSDB_LIBS!$PASSDB_LIBS$ac_delim
 IDMAP_LIBS!$IDMAP_LIBS$ac_delim
 KRB5_LIBS!$KRB5_LIBS$ac_delim
+UUID_LIBS!$UUID_LIBS$ac_delim
+LDAP_LIBS!$LDAP_LIBS$ac_delim
+PAM_MODULES!$PAM_MODULES$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -68014,9 +67976,6 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
-UUID_LIBS!$UUID_LIBS$ac_delim
-LDAP_LIBS!$LDAP_LIBS$ac_delim
-PAM_MODULES!$PAM_MODULES$ac_delim
 INSTALL_PAM_MODULES!$INSTALL_PAM_MODULES$ac_delim
 UNINSTALL_PAM_MODULES!$UNINSTALL_PAM_MODULES$ac_delim
 NSS_MODULES!$NSS_MODULES$ac_delim
@@ -68101,7 +68060,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 85; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 82; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: branches/samba/upstream/source/configure.in
===================================================================
--- branches/samba/upstream/source/configure.in	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/configure.in	2008-05-22 09:48:21 UTC (rev 1882)
@@ -51,7 +51,7 @@
 [  --with-fhs              Use FHS-compliant paths (default=no)],
 [ case "$withval" in
   yes)
-    lockdir="\${VARDIR}/run/samba"
+    lockdir="\${VARDIR}/lib/samba"
     piddir="\${VARDIR}/run"
     mandir="\${prefix}/share/man"
     logfilebase="\${VARDIR}/log/samba"
@@ -59,10 +59,6 @@
     libdir="\${prefix}/lib/samba"
     configdir="\${sysconfdir}/samba"
     swatdir="\${DATADIR}/samba/swat"
-    codepagedir="\${DATADIR}/samba"
-    statedir="\${VARDIR}/lib/samba"
-    cachedir="\${VARDIR}/cache/samba"
-    AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])
     ;;
   esac])
 
@@ -267,9 +263,6 @@
 AC_SUBST(swatdir)
 AC_SUBST(bindir)
 AC_SUBST(sbindir)
-AC_SUBST(codepagedir)
-AC_SUBST(statedir)
-AC_SUBST(cachedir)
 AC_SUBST(rootsbindir)
 AC_SUBST(pammodulesdir)
 
@@ -769,15 +762,6 @@
       fi
     ;;
 
-# Systems with LFS support.
-#
-    gnu* | k*bsd*-gnu)
-	CPPFLAGS="-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE $CPPFLAGS"
-	AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Whether to enable large file support])
-	AC_DEFINE(_FILE_OFFSET_BITS, 64, [File offset bits])
-	AC_DEFINE(_GNU_SOURCE, 1, [Whether to use GNU libc extensions])
-	;;
-
 # Tests for linux LFS support. Need kernel 2.4 and glibc2.2 or greater support.
 #
     *linux*)
@@ -1400,7 +1384,7 @@
 #
 #
 case "$host_os" in
-    linux*-gnu* | gnu* | k*bsd*-gnu)
+    *linux*)
        # glibc <= 2.3.2 has a broken getgrouplist
        AC_TRY_RUN([
 #include <unistd.h>
@@ -1709,10 +1693,7 @@
 
   # and these are for particular systems
   case "$host_os" in
-		linux*-gnu* | gnu* | k*bsd*-gnu)
-			case "$host_os" in linux*)
-				AC_DEFINE(LINUX,1,[Whether the host os is linux]) ;;
-			esac
+		*linux*)   AC_DEFINE(LINUX,1,[Whether the host os is linux])
 			BLDSHARED="true"
 			if test "${ac_cv_gnu_ld_no_default_allow_shlib_undefined}" = "yes"; then
 				LDSHFLAGS="-shared -Wl,-Bsymbolic -Wl,--allow-shlib-undefined"
@@ -5479,7 +5460,7 @@
 	AC_MSG_RESULT(yes);
 
 	case "$host_os" in
-	linux*-gnu* | gnu* | k*bsd*-gnu)
+	*linux*)
 		AC_CACHE_CHECK([for linux sendfile64 support],samba_cv_HAVE_SENDFILE64,[
 		AC_TRY_LINK([#include <sys/sendfile.h>],
 [\
@@ -5784,11 +5765,11 @@
 SMB_KRB5_LOCATOR="bin/smb_krb5_locator.$SHLIBEXT"
 
 case "$host_os" in
-	linux*-gnu* | gnu* | k*bsd*-gnu)
+	*linux*)
 		NSSSONAMEVERSIONSUFFIX=".2"
 		WINBIND_NSS_EXTRA_OBJS="nsswitch/winbind_nss_linux.o"
 		;;
-	freebsd5*|*freebsd[[6-9]]*)
+	*freebsd[[5-9]]*)
 		# FreeBSD winbind client is implemented as a wrapper around
 		# the Linux version.
 		NSSSONAMEVERSIONSUFFIX=".1"

Modified: branches/samba/upstream/source/dynconfig.c
===================================================================
--- branches/samba/upstream/source/dynconfig.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/dynconfig.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -53,13 +53,6 @@
 pstring dyn_LMHOSTSFILE = LMHOSTSFILE;
 
 /**
- * @brief Samba data directory.
- *
- * @sa data_path() to get the path to a file inside the CODEPAGEDIR.
- **/
-pstring dyn_CODEPAGEDIR = CODEPAGEDIR;
-
-/**
  * @brief Samba library directory.
  *
  * @sa lib_path() to get the path to a file inside the LIBDIR.
@@ -77,27 +70,3 @@
 
 pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE;
 pstring dyn_PRIVATE_DIR = PRIVATE_DIR;
-
-
-/* In non-FHS mode, these should be configurable using 'lock dir =';
-   but in FHS mode, they are their own directory.  Implement as wrapper
-   functions so that everything can still be kept in dynconfig.c.
- */
-
-char *dyn_STATEDIR(void)
-{
-#ifdef FHS_COMPATIBLE
-	return STATEDIR;
-#else
-	return lp_lockdir();
-#endif
-}
-
-char *dyn_CACHEDIR(void)
-{
-#ifdef FHS_COMPATIBLE
-	return CACHEDIR;
-#else
-	return lp_lockdir();
-#endif
-}

Modified: branches/samba/upstream/source/groupdb/mapping_tdb.c
===================================================================
--- branches/samba/upstream/source/groupdb/mapping_tdb.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/groupdb/mapping_tdb.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -39,7 +39,7 @@
 	if (tdb)
 		return True;
 		
-	tdb = tdb_open_log(state_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+	tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 	if (!tdb) {
 		DEBUG(0,("Failed to open group mapping database\n"));
 		return False;

Modified: branches/samba/upstream/source/include/config.h.in
===================================================================
--- branches/samba/upstream/source/include/config.h.in	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/include/config.h.in	2008-05-22 09:48:21 UTC (rev 1882)
@@ -57,9 +57,6 @@
 /* Define to turn on dmalloc debugging */
 #undef ENABLE_DMALLOC
 
-/* Whether to use fully FHS-compatible paths */
-#undef FHS_COMPATIBLE
-
 /* Whether the host os is FreeBSD */
 #undef FREEBSD
 

Modified: branches/samba/upstream/source/include/dynconfig.h
===================================================================
--- branches/samba/upstream/source/include/dynconfig.h	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/include/dynconfig.h	2008-05-22 09:48:21 UTC (rev 1882)
@@ -31,12 +31,8 @@
 extern pstring dyn_CONFIGFILE;
 extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE;
 extern pstring dyn_LIBDIR;
-extern pstring dyn_CODEPAGEDIR;
 extern fstring dyn_SHLIBEXT;
 extern pstring dyn_LOCKDIR;
 extern pstring dyn_PIDDIR;
 extern pstring dyn_SMB_PASSWD_FILE;
 extern pstring dyn_PRIVATE_DIR;
-
-char *dyn_STATEDIR(void);
-char *dyn_CACHEDIR(void);

Modified: branches/samba/upstream/source/include/local.h
===================================================================
--- branches/samba/upstream/source/include/local.h	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/include/local.h	2008-05-22 09:48:21 UTC (rev 1882)
@@ -109,7 +109,7 @@
 /* the default pager to use for the client "more" command. Users can
    override this with the PAGER environment variable */
 #ifndef PAGER
-#define PAGER "/usr/bin/pager"
+#define PAGER "more"
 #endif
 
 /* the size of the uid cache used to reduce valid user checks */

Modified: branches/samba/upstream/source/intl/lang_tdb.c
===================================================================
--- branches/samba/upstream/source/intl/lang_tdb.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/intl/lang_tdb.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -131,7 +131,7 @@
 	if (!lang) 
 		return True;
 
-	asprintf(&msg_path, "%s.msg", data_path((const char *)lang));
+	asprintf(&msg_path, "%s.msg", lib_path((const char *)lang));
 	if (stat(msg_path, &st) != 0) {
 		/* the msg file isn't available */
 		DEBUG(10, ("lang_tdb_init: %s: %s\n", msg_path, 

Modified: branches/samba/upstream/source/lib/account_pol.c
===================================================================
--- branches/samba/upstream/source/lib/account_pol.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/lib/account_pol.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -213,9 +213,9 @@
 		return True;
 	}
 
-	tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
+	tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
 	if (!tdb) { /* the account policies files does not exist or open failed, try to create a new one */
-		tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+		tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 		if (!tdb) {
 			DEBUG(0,("Failed to open account policy database\n"));
 			return False;

Modified: branches/samba/upstream/source/lib/sharesec.c
===================================================================
--- branches/samba/upstream/source/lib/sharesec.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/lib/sharesec.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -47,10 +47,10 @@
 		return True;
 	}
 
-	share_tdb = tdb_open_log(state_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+	share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 	if (!share_tdb) {
 		DEBUG(0,("Failed to open share info database %s (%s)\n",
-			state_path("share_info.tdb"), strerror(errno) ));
+			lock_path("share_info.tdb"), strerror(errno) ));
 		return False;
 	}
  

Modified: branches/samba/upstream/source/lib/util.c
===================================================================
--- branches/samba/upstream/source/lib/util.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/lib/util.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -2633,61 +2633,6 @@
 }
 
 /**
- * @brief Returns an absolute path to a file in the Samba data directory.
- *
- * @param name File to find, relative to CODEPAGEDIR.
- *
- * @retval Pointer to a static #pstring containing the full path.
- **/
-
-char *data_path(const char *name)
-{
-	static pstring fname;
-	snprintf(fname, sizeof(fname), "%s/%s", dyn_CODEPAGEDIR, name);
-	return fname;
-}
-
-/*****************************************************************
-a useful function for returning a path in the Samba state directory
- *****************************************************************/
-char *state_path(char *name)
-{
-	static pstring fname;
-
-	pstrcpy(fname,dyn_STATEDIR());
-	trim_string(fname,"","/");
-
-	if (!directory_exist(fname,NULL)) {
-		mkdir(fname,0755);
-	}
-
-	pstrcat(fname,"/");
-	pstrcat(fname,name);
-
-	return fname;
-}
-
-/*****************************************************************
-a useful function for returning a path in the Samba cache directory
- *****************************************************************/
-char *cache_path(char *name)
-{
-	static pstring fname;
-
-	pstrcpy(fname,dyn_CACHEDIR());
-	trim_string(fname,"","/");
-
-	if (!directory_exist(fname,NULL)) {
-			mkdir(fname,0755);
-	}
-
-	pstrcat(fname,"/");
-	pstrcat(fname,name);
-
-	return fname;
-}
-
-/**
  * @brief Returns the platform specific shared library extension.
  *
  * @retval Pointer to a static #fstring containing the extension.

Modified: branches/samba/upstream/source/lib/util_unistr.c
===================================================================
--- branches/samba/upstream/source/lib/util_unistr.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/lib/util_unistr.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -88,11 +88,11 @@
 	}
 	initialised = 1;
 
-	upcase_table = (smb_ucs2_t *)map_file(data_path("upcase.dat"),
+	upcase_table = (smb_ucs2_t *)map_file(lib_path("upcase.dat"),
 					      0x20000);
 	upcase_table_use_unmap = ( upcase_table != NULL );
 
-	lowcase_table = (smb_ucs2_t *)map_file(data_path("lowcase.dat"),
+	lowcase_table = (smb_ucs2_t *)map_file(lib_path("lowcase.dat"),
 					       0x20000);
 	lowcase_table_use_unmap = ( lowcase_table != NULL );
 
@@ -230,7 +230,7 @@
 		return;
 	}
 
-	valid_file = (uint8 *)map_file(data_path("valid.dat"), 0x10000);
+	valid_file = (uint8 *)map_file(lib_path("valid.dat"), 0x10000);
 	if (valid_file) {
 		valid_table = valid_file;
 		mapped_file = 1;

Modified: branches/samba/upstream/source/libgpo/gpo_fetch.c
===================================================================
--- branches/samba/upstream/source/libgpo/gpo_fetch.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/libgpo/gpo_fetch.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -60,7 +60,7 @@
 		return NT_STATUS_NO_MEMORY;
 	}
 
-	pstrcpy(path, cache_path(GPO_CACHE_DIR));
+	pstrcpy(path, lock_path(GPO_CACHE_DIR));
 	pstrcat(path, "/");
 	pstrcat(path, file_sys_path);
 	pstring_sub(path, "\\", "/");
@@ -80,7 +80,7 @@
 				     TALLOC_CTX *mem_ctx, 
 				     const char *unix_path)
 {
-	const char *top_dir = cache_path(GPO_CACHE_DIR);
+	const char *top_dir = lock_path(GPO_CACHE_DIR);
 	char *current_dir;
 	fstring tok;
 

Modified: branches/samba/upstream/source/libsmb/samlogon_cache.c
===================================================================
--- branches/samba/upstream/source/libsmb/samlogon_cache.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/libsmb/samlogon_cache.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -34,7 +34,7 @@
 BOOL netsamlogon_cache_init(void)
 {
 	if (!netsamlogon_tdb) {
-		netsamlogon_tdb = tdb_open_log(cache_path(NETSAMLOGON_TDB), 0,
+		netsamlogon_tdb = tdb_open_log(lock_path(NETSAMLOGON_TDB), 0,
 						   TDB_DEFAULT, O_RDWR | O_CREAT, 0600);
 	}
 
@@ -67,7 +67,7 @@
            winbindd_cache.tdb open.  Open the tdb if a NULL is passed. */
 
 	if (!tdb) {
-		tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 
+		tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 
 				   WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE,
 				   TDB_DEFAULT, O_RDWR, 0600);
 		if (!tdb) {

Modified: branches/samba/upstream/source/nmbd/nmbd_serverlistdb.c
===================================================================
--- branches/samba/upstream/source/nmbd/nmbd_serverlistdb.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/nmbd/nmbd_serverlistdb.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -325,7 +325,7 @@
 
 	updatecount++;
     
-	pstrcpy(fname,dyn_CACHEDIR());
+	pstrcpy(fname,lp_lockdir());
 	trim_char(fname,'\0' ,'/');
 	pstrcat(fname,"/");
 	pstrcat(fname,SERVER_LIST);

Modified: branches/samba/upstream/source/nmbd/nmbd_winsserver.c
===================================================================
--- branches/samba/upstream/source/nmbd/nmbd_winsserver.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/nmbd/nmbd_winsserver.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -585,7 +585,7 @@
 
 	add_samba_names_to_subnet(wins_server_subnet);
 
-	if((fp = x_fopen(state_path(WINS_LIST),O_RDONLY,0)) == NULL) {
+	if((fp = x_fopen(lock_path(WINS_LIST),O_RDONLY,0)) == NULL) {
 		DEBUG(2,("initialise_wins: Can't open wins database file %s. Error was %s\n",
 			WINS_LIST, strerror(errno) ));
 		return True;
@@ -2338,7 +2338,7 @@
 		}
 	}
 
-	slprintf(fname,sizeof(fname)-1,"%s/%s", dyn_STATEDIR(), WINS_LIST);
+	slprintf(fname,sizeof(fname)-1,"%s/%s", lp_lockdir(), WINS_LIST);
 	all_string_sub(fname,"//", "/", 0);
 	slprintf(fnamenew,sizeof(fnamenew)-1,"%s.%u", fname, (unsigned int)sys_getpid());
 

Modified: branches/samba/upstream/source/nsswitch/idmap_cache.c
===================================================================
--- branches/samba/upstream/source/nsswitch/idmap_cache.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/nsswitch/idmap_cache.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -55,7 +55,7 @@
 		return NULL;
 	}
 
-	cache_fname = cache_path("idmap_cache.tdb");
+	cache_fname = lock_path("idmap_cache.tdb");
 
 	DEBUG(10, ("Opening cache file at %s\n", cache_fname));
 

Modified: branches/samba/upstream/source/nsswitch/idmap_tdb.c
===================================================================
--- branches/samba/upstream/source/nsswitch/idmap_tdb.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/nsswitch/idmap_tdb.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -247,7 +247,7 @@
 	}
 
 	/* use the old database if present */
-	tdbfile = talloc_strdup(ctx, state_path("winbindd_idmap.tdb"));
+	tdbfile = talloc_strdup(ctx, lock_path("winbindd_idmap.tdb"));
 	if (!tdbfile) {
 		DEBUG(0, ("Out of memory!\n"));
 		ret = NT_STATUS_NO_MEMORY;

Modified: branches/samba/upstream/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/samba/upstream/source/nsswitch/winbindd_cache.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/nsswitch/winbindd_cache.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -2188,7 +2188,7 @@
 		return True;
 
 	/* when working offline we must not clear the cache on restart */
-	wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),
+	wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"),
 				WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, 
 				lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), 
 				O_RDWR|O_CREAT, 0600);
@@ -2231,9 +2231,9 @@
 		tdb_close(wcache->tdb);
 		wcache->tdb = NULL;
 
-		if (unlink(cache_path("winbindd_cache.tdb")) == -1) {
+		if (unlink(lock_path("winbindd_cache.tdb")) == -1) {
 			DEBUG(0,("initialize_winbindd_cache: unlink %s failed %s ",
-				cache_path("winbindd_cache.tdb"),
+				lock_path("winbindd_cache.tdb"),
 				strerror(errno) ));
 			return False;
 		}
@@ -2495,7 +2495,7 @@
 		return;
 
 	/* when working offline we must not clear the cache on restart */
-	wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),
+	wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"),
 				WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, 
 				lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), 
 				O_RDWR|O_CREAT, 0600);

Modified: branches/samba/upstream/source/pam_smbpass/README
===================================================================
--- branches/samba/upstream/source/pam_smbpass/README	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/pam_smbpass/README	2008-05-22 09:48:21 UTC (rev 1882)
@@ -37,7 +37,7 @@
 	smbconf=<file>	-	specify an alternate path to the smb.conf
 				file.
 
-See the examples/ directory for example PAM configurations using this
+See the samples/ directory for example PAM configurations using this
 module.
 
 Thanks go to the following people:

Modified: branches/samba/upstream/source/pam_smbpass/pam_smb_acct.c
===================================================================
--- branches/samba/upstream/source/pam_smbpass/pam_smb_acct.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/pam_smbpass/pam_smb_acct.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -52,21 +52,22 @@
 
 	/* Samba initialization. */
 	load_case_tables();
+	setup_logging( "pam_smbpass", False );
 	in_client = True;
 
-	ctrl = set_ctrl(pamh, flags, argc, argv);
+	ctrl = set_ctrl( flags, argc, argv );
 
 	/* get the username */
 
 	retval = pam_get_user( pamh, &name, "Username: " );
 	if (retval != PAM_SUCCESS) {
 		if (on( SMB_DEBUG, ctrl )) {
-			_log_err(pamh, LOG_DEBUG, "acct: could not identify user");
+			_log_err( LOG_DEBUG, "acct: could not identify user" );
 		}
 		return retval;
 	}
 	if (on( SMB_DEBUG, ctrl )) {
-		_log_err(pamh, LOG_DEBUG, "acct: username [%s] obtained", name);
+		_log_err( LOG_DEBUG, "acct: username [%s] obtained", name );
 	}
 
 	if (geteuid() != 0) {
@@ -78,7 +79,7 @@
 		from a SIGPIPE it's not expecting */
 	oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN);
 	if (!initialize_password_db(True)) {
-		_log_err(pamh, LOG_ALERT, "Cannot access samba password database");
+		_log_err( LOG_ALERT, "Cannot access samba password database" );
 		CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
 		return PAM_AUTHINFO_UNAVAIL;
 	}
@@ -92,7 +93,7 @@
 	}
 
 	if (!pdb_getsampwnam(sampass, name )) {
-		_log_err(pamh, LOG_DEBUG, "acct: could not identify user");
+		_log_err( LOG_DEBUG, "acct: could not identify user" );
         	CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
         	return PAM_USER_UNKNOWN;
 	}
@@ -105,8 +106,8 @@
 
 	if (pdb_get_acct_ctrl(sampass) & ACB_DISABLED) {
 		if (on( SMB_DEBUG, ctrl )) {
-			_log_err(pamh, LOG_DEBUG,
-				 "acct: account %s is administratively disabled", name);
+			_log_err( LOG_DEBUG
+				, "acct: account %s is administratively disabled", name );
 		}
 		make_remark( pamh, ctrl, PAM_ERROR_MSG
 			, "Your account has been disabled; "

Modified: branches/samba/upstream/source/pam_smbpass/pam_smb_auth.c
===================================================================
--- branches/samba/upstream/source/pam_smbpass/pam_smb_auth.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/pam_smbpass/pam_smb_auth.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -75,9 +75,10 @@
 
 	/* Samba initialization. */
 	load_case_tables();
+	setup_logging("pam_smbpass",False);
 	in_client = True;
 
-	ctrl = set_ctrl(pamh, flags, argc, argv);
+	ctrl = set_ctrl(flags, argc, argv);
 
 	/* Get a few bytes so we can pass our return value to
 		pam_sm_setcred(). */
@@ -92,12 +93,12 @@
 	retval = pam_get_user( pamh, &name, "Username: " );
 	if ( retval != PAM_SUCCESS ) {
 		if (on( SMB_DEBUG, ctrl )) {
-			_log_err(pamh, LOG_DEBUG, "auth: could not identify user");
+			_log_err(LOG_DEBUG, "auth: could not identify user");
 		}
 		AUTH_RETURN;
 	}
 	if (on( SMB_DEBUG, ctrl )) {
-		_log_err(pamh, LOG_DEBUG, "username [%s] obtained", name);
+		_log_err( LOG_DEBUG, "username [%s] obtained", name );
 	}
 
 	if (geteuid() != 0) {
@@ -107,14 +108,14 @@
 	}
 
 	if (!initialize_password_db(True)) {
-		_log_err(pamh, LOG_ALERT, "Cannot access samba password database");
+		_log_err( LOG_ALERT, "Cannot access samba password database" );
 		retval = PAM_AUTHINFO_UNAVAIL;
 		AUTH_RETURN;
 	}
 
 	sampass = samu_new( NULL );
     	if (!sampass) {
-		_log_err(pamh, LOG_ALERT, "Cannot talloc a samu struct");
+		_log_err( LOG_ALERT, "Cannot talloc a samu struct" );
 		retval = nt_status_to_pam(NT_STATUS_NO_MEMORY);
 		AUTH_RETURN;
 	}
@@ -128,7 +129,7 @@
 	}
 
 	if (!found) {
-		_log_err(pamh, LOG_ALERT, "Failed to find entry for user %s.", name);
+		_log_err(LOG_ALERT, "Failed to find entry for user %s.", name);
 		retval = PAM_USER_UNKNOWN;
 		TALLOC_FREE(sampass);
 		sampass = NULL;
@@ -147,7 +148,7 @@
 
 	retval = _smb_read_password(pamh, ctrl, NULL, "Password: ", NULL, _SMB_AUTHTOK, &p);
 	if (retval != PAM_SUCCESS ) {
-		_log_err(pamh,LOG_CRIT, "auth: no password provided for [%s]", name);
+		_log_err(LOG_CRIT, "auth: no password provided for [%s]", name);
 		TALLOC_FREE(sampass);
 		AUTH_RETURN;
 	}
@@ -199,8 +200,8 @@
     retval = pam_get_item( pamh, PAM_AUTHTOK, (const void **) &pass );
 
     if (retval != PAM_SUCCESS) {
-	_log_err(pamh, LOG_ALERT,
-	         "pam_get_item returned error to pam_sm_authenticate");
+	_log_err( LOG_ALERT
+	          , "pam_get_item returned error to pam_sm_authenticate" );
 	return PAM_AUTHTOK_RECOVER_ERR;
     } else if (pass == NULL) {
 	return PAM_AUTHTOK_RECOVER_ERR;

Modified: branches/samba/upstream/source/pam_smbpass/pam_smb_passwd.c
===================================================================
--- branches/samba/upstream/source/pam_smbpass/pam_smb_passwd.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/pam_smbpass/pam_smb_passwd.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -104,9 +104,10 @@
 
     /* Samba initialization. */
     load_case_tables();
+    setup_logging( "pam_smbpass", False );
     in_client = True;
 
-    ctrl = set_ctrl(pamh, flags, argc, argv);
+    ctrl = set_ctrl(flags, argc, argv);
 
     /*
      * First get the name of a user.  No need to do anything if we can't
@@ -116,12 +117,12 @@
     retval = pam_get_user( pamh, &user, "Username: " );
     if (retval != PAM_SUCCESS) {
         if (on( SMB_DEBUG, ctrl )) {
-            _log_err(pamh, LOG_DEBUG, "password: could not identify user");
+            _log_err( LOG_DEBUG, "password: could not identify user" );
         }
         return retval;
     }
     if (on( SMB_DEBUG, ctrl )) {
-        _log_err(pamh, LOG_DEBUG, "username [%s] obtained", user);
+        _log_err( LOG_DEBUG, "username [%s] obtained", user );
     }
 
     if (geteuid() != 0) {
@@ -134,7 +135,7 @@
     oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN);
 
     if (!initialize_password_db(False)) {
-        _log_err(pamh, LOG_ALERT, "Cannot access samba password database");
+        _log_err( LOG_ALERT, "Cannot access samba password database" );
         CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
         return PAM_AUTHINFO_UNAVAIL;
     }
@@ -146,12 +147,12 @@
     }
 
     if (!pdb_getsampwnam(sampass,user)) {
-        _log_err(pamh, LOG_ALERT, "Failed to find entry for user %s.", user);
+        _log_err( LOG_ALERT, "Failed to find entry for user %s.", user );
         CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
         return PAM_USER_UNKNOWN;
     }
     if (on( SMB_DEBUG, ctrl )) {
-        _log_err(pamh, LOG_DEBUG, "Located account for %s", user);
+        _log_err( LOG_DEBUG, "Located account for %s", user );
     }
 
     if (flags & PAM_PRELIM_CHECK) {
@@ -177,7 +178,7 @@
 #define greeting "Changing password for "
             Announce = SMB_MALLOC_ARRAY(char, sizeof(greeting)+strlen(user));
             if (Announce == NULL) {
-                _log_err(pamh, LOG_CRIT, "password: out of memory");
+                _log_err(LOG_CRIT, "password: out of memory");
                 TALLOC_FREE(sampass);
                 CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
                 return PAM_BUF_ERR;
@@ -192,8 +193,8 @@
             SAFE_FREE( Announce );
 
             if (retval != PAM_SUCCESS) {
-                _log_err(pamh, LOG_NOTICE,
-                         "password - (old) token not obtained");
+                _log_err( LOG_NOTICE
+                          , "password - (old) token not obtained" );
                 TALLOC_FREE(sampass);
                 CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
                 return retval;
@@ -238,7 +239,7 @@
         }
 
         if (retval != PAM_SUCCESS) {
-            _log_err(pamh, LOG_NOTICE, "password: user not authenticated");
+            _log_err( LOG_NOTICE, "password: user not authenticated" );
             TALLOC_FREE(sampass);
             CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
             return retval;
@@ -263,8 +264,8 @@
 
         if (retval != PAM_SUCCESS) {
             if (on( SMB_DEBUG, ctrl )) {
-                _log_err(pamh, LOG_ALERT,
-                         "password: new password not obtained");
+                _log_err( LOG_ALERT
+                          , "password: new password not obtained" );
             }
             pass_old = NULL;                               /* tidy up */
             TALLOC_FREE(sampass);
@@ -285,7 +286,7 @@
         retval = _pam_smb_approve_pass(pamh, ctrl, pass_old, pass_new);
 
         if (retval != PAM_SUCCESS) {
-            _log_err(pamh, LOG_NOTICE, "new password not acceptable");
+            _log_err(LOG_NOTICE, "new password not acceptable");
             pass_new = pass_old = NULL;               /* tidy up */
             TALLOC_FREE(sampass);
             CatchSignal(SIGPIPE, SIGNAL_CAST oldsig_handler);
@@ -305,17 +306,16 @@
 	    
             /* password updated */
 		if (!sid_to_uid(pdb_get_user_sid(sampass), &uid)) {
-			_log_err(pamh, LOG_NOTICE,
-			         "Unable to get uid for user %s",
+			_log_err( LOG_NOTICE, "Unable to get uid for user %s",
 				pdb_get_username(sampass));
-			_log_err(pamh, LOG_NOTICE, "password for (%s) changed by (%s/%d)",
+			_log_err( LOG_NOTICE, "password for (%s) changed by (%s/%d)",
 				user, uidtoname(getuid()), getuid());
 		} else {
-			_log_err(pamh, LOG_NOTICE, "password for (%s/%d) changed by (%s/%d)",
+			_log_err( LOG_NOTICE, "password for (%s/%d) changed by (%s/%d)",
 				user, uid, uidtoname(getuid()), getuid());
 		}
 	} else {
-		_log_err(pamh, LOG_ERR, "password change failed for user %s", user);
+		_log_err( LOG_ERR, "password change failed for user %s", user);
 	}
 
         pass_old = pass_new = NULL;
@@ -326,7 +326,7 @@
 
     } else {            /* something has broken with the library */
 
-        _log_err(pamh, LOG_ALERT, "password received unknown request");
+        _log_err( LOG_ALERT, "password received unknown request" );
         retval = PAM_ABORT;
 
     }

Modified: branches/samba/upstream/source/pam_smbpass/support.c
===================================================================
--- branches/samba/upstream/source/pam_smbpass/support.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/pam_smbpass/support.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -15,7 +15,6 @@
 	 * Mass Ave, Cambridge, MA 02139, USA.
 	 */
 
-	#include "config.h"
 	#include "includes.h"
 	#include "general.h"
 
@@ -67,44 +66,19 @@
 
 	char *servicesf = dyn_CONFIGFILE;
 
-/* syslogging function for errors and other information */
-#ifdef HAVE_PAM_VSYSLOG
-void _log_err( pam_handle_t *pamh, int err, const char *format, ... )
-{
-	va_list args;
+	/* syslogging function for errors and other information */
 
-	va_start(args, format);
-	pam_vsyslog(pamh, err, format, args);
-	va_end(args);
-}
-#else
-void _log_err( pam_handle_t *pamh, int err, const char *format, ... )
-{
-	va_list args;
-	const char tag[] = "(pam_smbpass) ";
-	char *mod_format;
+	void _log_err( int err, const char *format, ... )
+	{
+	    va_list args;
 
-	mod_format = SMB_MALLOC_ARRAY(char, sizeof(tag) + strlen(format));
-	/* try really, really hard to log something, since this may have
-	   been a message about a malloc() failure... */
-	if (mod_format == NULL) {
-		va_start(args, format);
-		vsyslog(err | LOG_AUTH, format, args);
-		va_end(args);
-		return;
+	    va_start( args, format );
+	    openlog( "PAM_smbpass", LOG_CONS | LOG_PID, LOG_AUTH );
+	    vsyslog( err, format, args );
+	    va_end( args );
+	    closelog();
 	}
 
-	strncpy(mod_format, tag, strlen(tag)+1);
-	strncat(mod_format, format, strlen(format));
-
-	va_start(args, format);
-	vsyslog(err | LOG_AUTH, mod_format, args);
-	va_end(args);
-
-	free(mod_format);
-}
-#endif
-
 	/* this is a front-end for module-application conversations */
 
 	int converse( pam_handle_t * pamh, int ctrl, int nargs
@@ -121,14 +95,12 @@
 								,response, conv->appdata_ptr);
 
 			if (retval != PAM_SUCCESS && on(SMB_DEBUG, ctrl)) {
-				_log_err(pamh, LOG_DEBUG,
-				         "conversation failure [%s]",
-				         pam_strerror(pamh, retval));
+				_log_err(LOG_DEBUG, "conversation failure [%s]"
+						 ,pam_strerror(pamh, retval));
 			}
 		} else {
-			_log_err(pamh, LOG_ERR,
-			         "couldn't obtain coversation function [%s]",
-			         pam_strerror(pamh, retval));
+			_log_err(LOG_ERR, "couldn't obtain coversation function [%s]"
+					 ,pam_strerror(pamh, retval));
 		}
 
 		return retval;				/* propagate error status */
@@ -154,7 +126,7 @@
 
 	/* set the control flags for the SMB module. */
 
-int set_ctrl( pam_handle_t *pamh, int flags, int argc, const char **argv )
+int set_ctrl( int flags, int argc, const char **argv )
 {
     int i = 0;
     const char *service_file = dyn_CONFIGFILE;
@@ -196,7 +168,7 @@
     /* Read some options from the Samba config. Can be overridden by
        the PAM config. */
     if(lp_load(service_file,True,False,False,True) == False) {
-	_log_err(pamh, LOG_ERR, "Error loading service file %s", service_file);
+	_log_err( LOG_ERR, "Error loading service file %s", service_file );
     }
 
     secrets_init();
@@ -219,7 +191,7 @@
         }
 
         if (j >= SMB_CTRLS_) {
-            _log_err(pamh, LOG_ERR, "unrecognized option [%s]", *argv);
+            _log_err( LOG_ERR, "unrecognized option [%s]", *argv );
         } else {
             ctrl &= smb_args[j].mask;	/* for turning things off */
             ctrl |= smb_args[j].flag;	/* for turning things on  */
@@ -258,7 +230,7 @@
  * evidence of old token around for later stack analysis.
  *
  */
-char * smbpXstrDup( pam_handle_t *pamh, const char *x )
+char * smbpXstrDup( const char *x )
 {
     register char *newstr = NULL;
 
@@ -268,7 +240,7 @@
         for (i = 0; x[i]; ++i); /* length of string */
         if ((newstr = SMB_MALLOC_ARRAY(char, ++i)) == NULL) {
             i = 0;
-            _log_err(pamh, LOG_CRIT, "out of memory in smbpXstrDup");
+            _log_err( LOG_CRIT, "out of memory in smbpXstrDup" );
         } else {
             while (i-- > 0) {
                 newstr[i] = x[i];
@@ -310,7 +282,7 @@
             /* log the number of authentication failures */
             if (failure->count != 0) {
                 pam_get_item( pamh, PAM_SERVICE, (const void **) &service );
-                _log_err(pamh, LOG_NOTICE
+                _log_err( LOG_NOTICE
                           , "%d authentication %s "
                             "from %s for service %s as %s(%d)"
                           , failure->count
@@ -319,7 +291,7 @@
                           , service == NULL ? "**unknown**" : service 
                           , failure->user, failure->id );
                 if (failure->count > SMB_MAX_RETRIES) {
-                    _log_err(pamh, LOG_ALERT
+                    _log_err( LOG_ALERT
                               , "service(%s) ignoring max retries; %d > %d"
                               , service == NULL ? "**unknown**" : service
                               , failure->count
@@ -355,7 +327,8 @@
 
     if (!pdb_get_lanman_passwd(sampass))
     {
-        _log_err(pamh, LOG_DEBUG, "user %s has null SMB password", name);
+        _log_err( LOG_DEBUG, "user %s has null SMB password"
+                  , name );
 
         if (off( SMB__NONULL, ctrl )
             && (pdb_get_acct_ctrl(sampass) & ACB_PWNOTREQ))
@@ -365,16 +338,15 @@
             const char *service;
 
             pam_get_item( pamh, PAM_SERVICE, (const void **)&service );
-            _log_err(pamh, LOG_NOTICE,
-	             "failed auth request by %s for service %s as %s",
-                     uidtoname(getuid()), service ? service : "**unknown**", name);
+            _log_err( LOG_NOTICE, "failed auth request by %s for service %s as %s",
+                      uidtoname(getuid()), service ? service : "**unknown**", name);
             return PAM_AUTH_ERR;
         }
     }
 
     data_name = SMB_MALLOC_ARRAY(char, sizeof(FAIL_PREFIX) + strlen( name ));
     if (data_name == NULL) {
-        _log_err(pamh, LOG_CRIT, "no memory for data-name");
+        _log_err( LOG_CRIT, "no memory for data-name" );
     }
     strncpy( data_name, FAIL_PREFIX, sizeof(FAIL_PREFIX) );
     strncpy( data_name + sizeof(FAIL_PREFIX) - 1, name, strlen( name ) + 1 );
@@ -420,31 +392,31 @@
                         retval = PAM_MAXTRIES;
                     }
                 } else {
-                    _log_err(pamh, LOG_NOTICE,
+                    _log_err(LOG_NOTICE,
                       "failed auth request by %s for service %s as %s",
                       uidtoname(getuid()),
                       service ? service : "**unknown**", name);
                     newauth->count = 1;
                 }
 		if (!sid_to_uid(pdb_get_user_sid(sampass), &(newauth->id))) {
-                    _log_err(pamh, LOG_NOTICE,
+                    _log_err(LOG_NOTICE,
                       "failed auth request by %s for service %s as %s",
                       uidtoname(getuid()),
                       service ? service : "**unknown**", name);
 		}		
-                newauth->user = smbpXstrDup(pamh, name);
-                newauth->agent = smbpXstrDup(pamh, uidtoname( getuid() ));
+                newauth->user = smbpXstrDup( name );
+                newauth->agent = smbpXstrDup( uidtoname( getuid() ) );
                 pam_set_data( pamh, data_name, newauth, _cleanup_failures );
 
             } else {
-                _log_err(pamh, LOG_CRIT, "no memory for failure recorder");
-                _log_err(pamh, LOG_NOTICE,
+                _log_err( LOG_CRIT, "no memory for failure recorder" );
+                _log_err(LOG_NOTICE,
                       "failed auth request by %s for service %s as %s(%d)",
                       uidtoname(getuid()),
                       service ? service : "**unknown**", name);
             }
         } else {
-            _log_err(pamh, LOG_NOTICE,
+            _log_err(LOG_NOTICE,
                       "failed auth request by %s for service %s as %s(%d)",
                       uidtoname(getuid()),
                       service ? service : "**unknown**", name);
@@ -518,8 +490,8 @@
         retval = pam_get_item( pamh, authtok_flag, (const void **) &item );
         if (retval != PAM_SUCCESS) {
             /* very strange. */
-            _log_err(pamh, LOG_ALERT,
-                     "pam_get_item returned error to smb_read_password");
+            _log_err( LOG_ALERT
+                      , "pam_get_item returned error to smb_read_password" );
             return retval;
         } else if (item != NULL) {	/* we have a password! */
             *pass = item;
@@ -571,7 +543,7 @@
 
         if (retval == PAM_SUCCESS) {	/* a good conversation */
 
-            token = smbpXstrDup(pamh, resp[j++].resp);
+            token = smbpXstrDup(resp[j++].resp);
             if (token != NULL) {
                 if (expect == 2) {
                     /* verify that password entered correctly */
@@ -583,8 +555,7 @@
                     }
                 }
             } else {
-                _log_err(pamh, LOG_NOTICE,
-		         "could not recover authentication token");
+                _log_err(LOG_NOTICE, "could not recover authentication token");
             }
         }
 
@@ -597,7 +568,7 @@
 
     if (retval != PAM_SUCCESS) {
         if (on( SMB_DEBUG, ctrl ))
-            _log_err(pamh, LOG_DEBUG, "unable to obtain a password");
+            _log_err( LOG_DEBUG, "unable to obtain a password" );
         return retval;
     }
     /* 'token' is the entered password */
@@ -612,7 +583,7 @@
             || (retval = pam_get_item( pamh, authtok_flag
                             ,(const void **)&item )) != PAM_SUCCESS)
         {
-            _log_err(pamh, LOG_CRIT, "error manipulating password");
+            _log_err( LOG_CRIT, "error manipulating password" );
             return retval;
         }
     } else {
@@ -626,8 +597,8 @@
             || (retval = pam_get_data( pamh, data_name, (const void **)&item ))
                              != PAM_SUCCESS)
         {
-            _log_err(pamh, LOG_CRIT, "error manipulating password data [%s]",
-                     pam_strerror( pamh, retval ));
+            _log_err( LOG_CRIT, "error manipulating password data [%s]"
+                      , pam_strerror( pamh, retval ));
             _pam_delete( token );
             item = NULL;
             return retval;
@@ -651,8 +622,8 @@
     if (pass_new == NULL || (pass_old && !strcmp( pass_old, pass_new )))
     {
 	if (on(SMB_DEBUG, ctrl)) {
-	    _log_err(pamh, LOG_DEBUG,
-	             "passwd: bad authentication token (null or unchanged)");
+	    _log_err( LOG_DEBUG,
+	              "passwd: bad authentication token (null or unchanged)" );
 	}
 	make_remark( pamh, ctrl, PAM_ERROR_MSG, pass_new == NULL ?
 				"No password supplied" : "Password unchanged" );

Modified: branches/samba/upstream/source/pam_smbpass/support.h
===================================================================
--- branches/samba/upstream/source/pam_smbpass/support.h	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/pam_smbpass/support.h	2008-05-22 09:48:21 UTC (rev 1882)
@@ -1,8 +1,8 @@
 /* syslogging function for errors and other information */
-extern void _log_err(pam_handle_t *, int, const char *, ...);
+extern void _log_err(int, const char *, ...);
 
 /* set the control flags for the UNIX module. */
-extern int set_ctrl(pam_handle_t *, int, int, const char **);
+extern int set_ctrl(int, int, const char **);
 
 /* generic function for freeing pam data segments */
 extern void _cleanup(pam_handle_t *, void *, int);
@@ -12,7 +12,7 @@
  * evidence of old token around for later stack analysis.
  */
 
-extern char *smbpXstrDup(pam_handle_t *,const char *);
+extern char *smbpXstrDup(const char *);
 
 /* ************************************************************** *
  * Useful non-trivial functions                                   *

Modified: branches/samba/upstream/source/param/loadparm.c
===================================================================
--- branches/samba/upstream/source/param/loadparm.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/param/loadparm.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -108,9 +108,6 @@
 	char *szAddPrinterCommand;
 	char *szDeletePrinterCommand;
 	char *szOs2DriverMap;
-#ifdef FHS_COMPATIBLE
-	char *szLockDirStub;
-#endif
 	char *szLockDir;
 	char *szPidDir;
 	char *szRootdir;
@@ -1213,13 +1210,8 @@
 	{"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, 
 	{"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, 
 	{"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, 
-#ifdef FHS_COMPATIBLE
-	{"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0}, 
-	{"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDirStub, NULL, NULL, 0},
-#else
 	{"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_ADVANCED}, 
 	{"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_HIDE}, 
-#endif
 	{"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, FLAG_ADVANCED}, 
 #ifdef WITH_UTMP
 	{"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, FLAG_ADVANCED}, 
@@ -1572,9 +1564,9 @@
 	Globals.bStatCache = True;	/* use stat cache by default */
 	Globals.iMaxStatCacheSize = 1024; /* one Meg by default. */
 	Globals.restrict_anonymous = 0;
-	Globals.bClientLanManAuth = False;	/* Do NOT use the LanMan hash if it is available */
-	Globals.bClientPlaintextAuth = False;	/* Do NOT use a plaintext password even if is requested by the server */
-	Globals.bLanmanAuth = False;	/* Do NOT use the LanMan hash, even if it is supplied */
+	Globals.bClientLanManAuth = True;	/* Do use the LanMan hash if it is available */
+	Globals.bClientPlaintextAuth = True;	/* Do use a plaintext password if is requested by the server */
+	Globals.bLanmanAuth = True;	/* Do use the LanMan hash if it is available */
 	Globals.bNTLMAuth = True;	/* Do use NTLMv1 if it is available (otherwise NTLMv2) */
 	Globals.bClientNTLMv2Auth = False; /* Client should not use NTLMv2, as we can't tell that the server supports it. */
 	/* Note, that we will use NTLM2 session security (which is different), if it is available */
@@ -1685,11 +1677,11 @@
 	Globals.bASUSupport       = False;
 	
 	/* User defined shares. */
-	pstrcpy(s, dyn_STATEDIR());
+	pstrcpy(s, dyn_LOCKDIR);
 	pstrcat(s, "/usershares");
 	string_set(&Globals.szUsersharePath, s);
 	string_set(&Globals.szUsershareTemplateShare, "");
-	Globals.iUsershareMaxShares = 100;
+	Globals.iUsershareMaxShares = 0;
 	/* By default disallow sharing of directories not owned by the sharer. */
 	Globals.bUsershareOwnerOnly = True;
 	/* By default disallow guest access to usershares. */

Modified: branches/samba/upstream/source/passdb/login_cache.c
===================================================================
--- branches/samba/upstream/source/passdb/login_cache.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/passdb/login_cache.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -36,7 +36,7 @@
 	/* skip file open if it's already opened */
 	if (cache) return True;
 
-	asprintf(&cache_fname, "%s/%s", dyn_CACHEDIR(), LOGIN_CACHE_FILE);
+	asprintf(&cache_fname, "%s/%s", lp_lockdir(), LOGIN_CACHE_FILE);
 	if (cache_fname)
 		DEBUG(5, ("Opening cache file at %s\n", cache_fname));
 	else {

Modified: branches/samba/upstream/source/passdb/pdb_tdb.c
===================================================================
--- branches/samba/upstream/source/passdb/pdb_tdb.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/passdb/pdb_tdb.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -1559,7 +1559,7 @@
 	uint32 rid;
 	BOOL ret = False;
 
-	tdb = tdb_open_log(state_path("winbindd_idmap.tdb"), 0,
+	tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0,
 			   TDB_DEFAULT, O_RDWR | O_CREAT, 0644);
 
 	if (tdb == NULL) {
@@ -1623,7 +1623,7 @@
 	/* save the path for later */
 			   
 	if ( !location ) {
-		pstr_sprintf( tdbfile, "%s/%s", dyn_STATEDIR(), PASSDB_FILE_NAME );
+		pstr_sprintf( tdbfile, "%s/%s", lp_private_dir(), PASSDB_FILE_NAME );
 		pfile = tdbfile;
 	}
 	pstrcpy( tdbsam_filename, pfile );

Modified: branches/samba/upstream/source/passdb/secrets.c
===================================================================
--- branches/samba/upstream/source/passdb/secrets.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/passdb/secrets.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -58,7 +58,8 @@
 	if (tdb)
 		return True;
 
-	pstrcpy(fname, state_path("secrets.tdb"));
+	pstrcpy(fname, lp_private_dir());
+	pstrcat(fname,"/secrets.tdb");
 
 	tdb = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 

Modified: branches/samba/upstream/source/printing/nt_printing.c
===================================================================
--- branches/samba/upstream/source/printing/nt_printing.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/printing/nt_printing.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -560,28 +560,28 @@
  
 	if (tdb_drivers)
 		tdb_close(tdb_drivers);
-	tdb_drivers = tdb_open_log(state_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+	tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 	if (!tdb_drivers) {
 		DEBUG(0,("nt_printing_init: Failed to open nt drivers database %s (%s)\n",
-			state_path("ntdrivers.tdb"), strerror(errno) ));
+			lock_path("ntdrivers.tdb"), strerror(errno) ));
 		return False;
 	}
  
 	if (tdb_printers)
 		tdb_close(tdb_printers);
-	tdb_printers = tdb_open_log(state_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+	tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 	if (!tdb_printers) {
 		DEBUG(0,("nt_printing_init: Failed to open nt printers database %s (%s)\n",
-			state_path("ntprinters.tdb"), strerror(errno) ));
+			lock_path("ntprinters.tdb"), strerror(errno) ));
 		return False;
 	}
  
 	if (tdb_forms)
 		tdb_close(tdb_forms);
-	tdb_forms = tdb_open_log(state_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+	tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 	if (!tdb_forms) {
 		DEBUG(0,("nt_printing_init: Failed to open nt forms database %s (%s)\n",
-			state_path("ntforms.tdb"), strerror(errno) ));
+			lock_path("ntforms.tdb"), strerror(errno) ));
 		return False;
 	}
  
@@ -2368,7 +2368,7 @@
 	close_all_print_db();
 
 	if (geteuid() == 0) {
-		pstrcpy(printdb_path, cache_path("printing/"));
+		pstrcpy(printdb_path, lock_path("printing/"));
 		pstrcat(printdb_path, sharename);
 		pstrcat(printdb_path, ".tdb");
 

Modified: branches/samba/upstream/source/printing/printing.c
===================================================================
--- branches/samba/upstream/source/printing/printing.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/printing/printing.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -185,8 +185,8 @@
 	int services = lp_numservices();
 	int snum;
 
-	unlink(cache_path("printing.tdb"));
-	pstrcpy(printing_path,cache_path("printing"));
+	unlink(lock_path("printing.tdb"));
+	pstrcpy(printing_path,lock_path("printing"));
 	mkdir(printing_path,0755);
 
 	/* handle a Samba upgrade */

Modified: branches/samba/upstream/source/printing/printing_db.c
===================================================================
--- branches/samba/upstream/source/printing/printing_db.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/printing/printing_db.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -91,7 +91,7 @@
 		DLIST_ADD(print_db_head, p);
 	}
 
-	pstrcpy(printdb_path, cache_path("printing/"));
+	pstrcpy(printdb_path, lock_path("printing/"));
 	pstrcat(printdb_path, printername);
 	pstrcat(printdb_path, ".tdb");
 

Modified: branches/samba/upstream/source/registry/reg_db.c
===================================================================
--- branches/samba/upstream/source/registry/reg_db.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/registry/reg_db.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -234,12 +234,12 @@
 	if ( tdb_reg )
 		return True;
 
-	if ( !(tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )
+	if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )
 	{
-		tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+		tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
 		if ( !tdb_reg ) {
 			DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n",
-				state_path("registry.tdb"), strerror(errno) ));
+				lock_path("registry.tdb"), strerror(errno) ));
 			return False;
 		}
 		
@@ -281,11 +281,11 @@
 	
 	become_root();
 
-	tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
+	tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
 	if ( !tdb_reg ) {
 		result = ntstatus_to_werror( map_nt_error_from_unix( errno ) );
 		DEBUG(0,("regdb_open: Failed to open %s! (%s)\n", 
-			state_path("registry.tdb"), strerror(errno) ));
+			lock_path("registry.tdb"), strerror(errno) ));
 	}
 
 	unbecome_root();

Modified: branches/samba/upstream/source/registry/reg_perfcount.c
===================================================================
--- branches/samba/upstream/source/registry/reg_perfcount.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/registry/reg_perfcount.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -46,7 +46,7 @@
 	
 	fstr_sprintf( path, "%s/%s", PERFCOUNTDIR, dbname );
 	
-	pstrcpy( fname, state_path( path ) );
+	pstrcpy( fname, lock_path( path ) );
 	
 	return fname;
 }
@@ -56,7 +56,7 @@
 
 void perfcount_init_keys( void )
 {
-	char *p = state_path(PERFCOUNTDIR);
+	char *p = lock_path(PERFCOUNTDIR);
 
 	/* no registry keys; just create the perfmon directory */
 	

Modified: branches/samba/upstream/source/rpc_server/srv_eventlog_lib.c
===================================================================
--- branches/samba/upstream/source/rpc_server/srv_eventlog_lib.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/rpc_server/srv_eventlog_lib.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -67,7 +67,7 @@
 {
 	fstring path;
 	char *tdb_fullpath;
-	char *eventlogdir = state_path( "eventlog" );
+	char *eventlogdir = lock_path( "eventlog" );
 	
 	pstr_sprintf( path, "%s/%s.tdb", eventlogdir, name );
 	strlower_m( path );
@@ -349,7 +349,7 @@
 	
 	/* make sure that the eventlog dir exists */
 	
-	eventlogdir = state_path( "eventlog" );
+	eventlogdir = lock_path( "eventlog" );
 	if ( !directory_exist( eventlogdir, NULL ) )
 		mkdir( eventlogdir, 0755 );	
 	

Modified: branches/samba/upstream/source/script/installswat.sh
===================================================================
--- branches/samba/upstream/source/script/installswat.sh	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/script/installswat.sh	2008-05-22 09:48:21 UTC (rev 1882)
@@ -198,11 +198,7 @@
 
 # Install/ remove Using Samba book (but only if it is there)
 
-# Under Debian we don't actually install the book. The book is part of
-# the samba-doc package, so we just provide a symlink that points to
-# where the book is actually installed. The symlink is created in
-# debian/rules.
-if /bin/false; then
+if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; then
 
     # Create directories
 

Modified: branches/samba/upstream/source/smbd/lanman.c
===================================================================
--- branches/samba/upstream/source/smbd/lanman.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/smbd/lanman.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -1094,9 +1094,9 @@
 	BOOL local_list_only;
 	int i;
 
-	lines = file_lines_load(cache_path(SERVER_LIST), NULL, 0);
+	lines = file_lines_load(lock_path(SERVER_LIST), NULL, 0);
 	if (!lines) {
-		DEBUG(4,("Can't open %s - %s\n",cache_path(SERVER_LIST),strerror(errno)));
+		DEBUG(4,("Can't open %s - %s\n",lock_path(SERVER_LIST),strerror(errno)));
 		return 0;
 	}
 

Modified: branches/samba/upstream/source/utils/smbcontrol.c
===================================================================
--- branches/samba/upstream/source/utils/smbcontrol.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/utils/smbcontrol.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -832,10 +832,10 @@
 	/* Remove the entry in the winbindd_cache tdb to tell a later
 	   starting winbindd that we're online. */
 
-	tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
+	tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600);
 	if (!tdb) {
 		fprintf(stderr, "Cannot open the tdb %s for writing.\n",
-			cache_path("winbindd_cache.tdb"));
+			lock_path("winbindd_cache.tdb"));
 		return False;
 	}
 
@@ -868,13 +868,13 @@
 	   starting winbindd that we're offline. We may actually create
 	   it here... */
 
-	tdb = tdb_open_log(cache_path("winbindd_cache.tdb"),
+	tdb = tdb_open_log(lock_path("winbindd_cache.tdb"),
 				WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE,
 				TDB_DEFAULT /* TDB_CLEAR_IF_FIRST */, O_RDWR|O_CREAT, 0600);
 
 	if (!tdb) {
 		fprintf(stderr, "Cannot open the tdb %s for writing.\n",
-			cache_path("winbindd_cache.tdb"));
+			lock_path("winbindd_cache.tdb"));
 		return False;
 	}
 

Modified: branches/samba/upstream/source/utils/status.c
===================================================================
--- branches/samba/upstream/source/utils/status.c	2008-05-22 07:10:31 UTC (rev 1881)
+++ branches/samba/upstream/source/utils/status.c	2008-05-22 09:48:21 UTC (rev 1882)
@@ -377,16 +377,6 @@
 			tdb_close(tdb);
 		}
 
-		tdb = tdb_open_log(lock_path("locking.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0);
-
-		if (!tdb) {
-			d_printf("%s not initialised\n", lock_path("locking.tdb"));
-			d_printf("This is normal if an SMB client has never connected to your server.\n");
-			exit(0);
-		} else {
-			tdb_close(tdb);
-		}
-
 		if (!locking_init(1)) {
 			d_printf("Can't initialise locking module - exiting\n");
 			exit(1);




More information about the Pkg-samba-maint mailing list