[Pkg-samba-maint] Bug#454770: Bug#454770: Patch for schannel_store.tdb
Steve Langasek
vorlon at debian.org
Sun Jul 20 22:19:31 UTC 2008
On Sun, Jul 20, 2008 at 06:45:45AM +0200, Christian Perrier wrote:
> 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.
> 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
This is wrong; schannel_store should never wind up in the lockdir, so any
references to it appearing there are bugs that should *not* be ignored here.
> @@ -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
Blah. I think we should consider a policy to always use the -p ab option to
quilt refresh when managing patches. That would help a lot to cut down on
gratuitous diffs. :/
> @@ -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;
This looks ok.
The other thing that's missing is upgrade handling; we need to make sure
that any existing schannel_store.tdb file gets migrated to /var/lib as part
of the upgrade. I'll fix this up and commit it to the repo shortly, just as
soon as I figure out which package needs to own this file (samba-common vs.
samba).
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
More information about the Pkg-samba-maint
mailing list