[Pkg-samba-maint] Bug#454770: Patch for schannel_store.tdb

Christian Perrier bubulle at debian.org
Sun Jul 20 04:45:45 UTC 2008


The attached (untested) patch should allow using /var/lib/samba for
schannel_store.tdb instead of /etc/samba

I indeed use a similar change than the one we're using for passdb.tdb

This patch is meant for the 3.2.0 branch.

-- 



-------------- next part --------------
Index: patches/fhs-filespaths.patch
===================================================================
--- patches/fhs-filespaths.patch	(r?vision 2050)
+++ patches/fhs-filespaths.patch	(copie de travail)
@@ -7,7 +7,7 @@
 
 Status wrt upstream: This is a greatly reduced patch; most of the
                      changes are already accepted upstream in 3.2, only
-                     two bits remain: one needs further analysis because
+                     three bits remain: two need further analysis because
                      Debian use of lp_private_dir() differs from that on
                      other distros, the other is a newly-introduced tdb
                      that went in the wrong dir
@@ -29,7 +29,7 @@
       export QUILT_PATCHES=debian/patches
       quilt push fhs.patch
       grep -r lock_path source/ | grep -vE \
-         '"((brlock|connections|gencache|locking|messages|notify|sessionid|unexpected|wins)\.tdb|namelist.debug|lang_)|char \*lock_path|WINBINDD_PRIV_SOCKET_SUBDIR'
+         '"((brlock|connections|gencache|locking|messages|notify|sessionid|unexpected|wins|schannel_store)\.tdb|namelist.debug|lang_)|char \*lock_path|WINBINDD_PRIV_SOCKET_SUBDIR'
 
       - This will get you the list of any new, unexpected references to
         lock_path.  The files mentioned above are the known good uses of
@@ -50,10 +50,10 @@
       grep -r lp_lockdir source/ | grep -vE \
          '%s/smb_(tmp_)*krb5|source/(lib/util|param/loadparm|dynconfig|utils/testparm|smbd/oplock_irix)\.c|WINBINDD_PRIV_SOCKET_SUBDIR|(directory_exist|mkdir)\(lp_lockdir\(\),|koplock\.%d|%s/sync\.%d'
 
-Index: samba-3.2.0rc1/source/passdb/pdb_tdb.c
+Index: samba-3.2.0/source/passdb/pdb_tdb.c
 ===================================================================
---- samba-3.2.0rc1.orig/source/passdb/pdb_tdb.c
-+++ samba-3.2.0rc1/source/passdb/pdb_tdb.c
+--- samba-3.2.0.orig/source/passdb/pdb_tdb.c
++++ samba-3.2.0/source/passdb/pdb_tdb.c
 @@ -1612,7 +1612,7 @@
  	/* save the path for later */
  
@@ -63,10 +63,10 @@
  			     PASSDB_FILE_NAME) < 0) {
  			return NT_STATUS_NO_MEMORY;
  		}
-Index: samba-3.2.0rc1/source/modules/vfs_xattr_tdb.c
+Index: samba-3.2.0/source/modules/vfs_xattr_tdb.c
 ===================================================================
---- samba-3.2.0rc1.orig/source/modules/vfs_xattr_tdb.c
-+++ samba-3.2.0rc1/source/modules/vfs_xattr_tdb.c
+--- samba-3.2.0.orig/source/modules/vfs_xattr_tdb.c
++++ samba-3.2.0/source/modules/vfs_xattr_tdb.c
 @@ -576,7 +576,7 @@
  	const char *dbname;
  
@@ -76,3 +76,16 @@
  
  	if (dbname == NULL) {
  		errno = ENOSYS;
+Index: samba-3.2.0/source/passdb/secrets.c
+===================================================================
+--- samba-3.2.0.orig/source/passdb/secrets.c
++++ samba-3.2.0/source/passdb/secrets.c
+@@ -1112,7 +1112,7 @@
+ 	TDB_DATA vers;
+ 	uint32 ver;
+ 	TDB_CONTEXT *tdb_sc = NULL;
+-	char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", lp_private_dir());
++	char *fname = talloc_asprintf(mem_ctx, "%s/schannel_store.tdb", get_dyn_STATEDIR());
+ 
+ 	if (!fname) {
+ 		return NULL;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20080720/eb7cc500/attachment.pgp 


More information about the Pkg-samba-maint mailing list