tags 454770 patch
thanks

Quoting Olaf Conradi (o...@conradi.org):
> Package: samba
> Version: 2:3.6.6-5
> Severity: normal
> 
> I'm using version 3.6 of Samba and I noticed schannel_store.tdb was in
> /etc/samba. After moving it to /var/lib/samba it was recreated in
> /etc/samba.
> 
> Is this a regression? According to this bug it should have been fixed in
> samba 3.2

Indeed.

The bug probably came back indirectly when upstream changed the
location of this file's use in their source.

The attached patch should fix this again.

Steve, would you mind ACKing it?



Index: debian/changelog
===================================================================
--- debian/changelog	(révision 4190)
+++ debian/changelog	(copie de travail)
@@ -1,3 +1,10 @@
+samba (2:3.6.6-6) UNRELEASED; urgency=low
+
+   * Move schannel_store.tdb out of /etc/samba to /var/lib/samba,
+     where it belongs according to the FHS.  Closes: #454770.
+
+ -- Christian Perrier <bubu...@debian.org>  Sun, 14 Apr 2013 15:30:05 +0200
+
 samba (2:3.6.6-5) unstable; urgency=high
 
   * Security update
Index: debian/patches/fhs-filespaths.patch
===================================================================
--- debian/patches/fhs-filespaths.patch	(révision 4183)
+++ debian/patches/fhs-filespaths.patch	(copie de travail)
@@ -63,3 +63,16 @@
  .sp
  Default:
  \fI\fIprivate dir\fR\fR\fI = \fR\fI${prefix}/private\fR\fI \fR
+Index: samba/libcli/auth/schannel_state_tdb.c
+===================================================================
+--- samba.orig/libcli/auth/schannel_state_tdb.c
++++ samba/libcli/auth/schannel_state_tdb.c
+@@ -40,7 +40,7 @@
+ 					     const char *private_dir)
+ {
+ 	struct tdb_wrap *tdb_sc = NULL;
+-	char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", private_dir);
++	char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", get_dyn_STATEDIR());
+ 
+ 	if (!fname) {
+ 		return NULL;
Index: debian/samba.postinst
===================================================================
--- debian/samba.postinst	(révision 4183)
+++ debian/samba.postinst	(copie de travail)
@@ -53,6 +53,14 @@
 
 # ------------------------- Debconf questions end ---------------------
 
+if dpkg --compare-versions "$2" lt-nl 2:3.6.6-6 \
+	&& dpkg --compare-versions "$2" ge 3.0.24 \
+	&& [ -e /etc/samba/schannel_store.tdb ] \
+	&& ! [ -e /var/lib/samba/schannel_store.tdb ]
+then
+	mv /etc/samba/schannel_store.tdb /var/lib/samba/schannel_store.tdb
+fi                                                                                                                                                                                 
+                                                                                                                                                                                    
 # We want to add these entries to inetd.conf commented out. Otherwise
 #	UDP traffic could make inetd to start nmbd or smbd right during
 #	the configuration stage.

Attachment: signature.asc
Description: Digital signature

Reply via email to