[Pkg-samba-maint] Bug#249873: Updated patch

Nikolaus Rath Nikolaus at rath.org
Sun Apr 29 19:41:19 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/29/2012 02:24 PM, Steve Langasek wrote:
> On Sun, Apr 29, 2012 at 10:01:51AM -0400, Nikolaus Rath wrote:
> 
>>> This changes the privatedir path, but I don't see any handling
>>> here for the existing files in /etc/samba that need to be moved
>>> on upgrade to preserve functionality.  In addition to the
>>> obvious smbpasswd, there are references to lp_private_dir()
>>> scattered throughout the source3 directory; these each need to
>>> be handled properly on package upgrade (presumably by moving
>>> the files).
> 
>> Did you read the other comments on this bug? There is no need to
>> move anything, since no samba directories are changed.
> 
> You are mistaken.  The current value of privatedir used in the
> package is /etc/samba.  Anything in the source that currently
> references privatedir is going to be created/looked for in
> /etc/samba, *not* in /var/lib/samba.  The trivial proof of this is
> /etc/samba/smbpasswd which, while not used by default in Debian,
> needs to be handled gracefully on upgrades.
> 
> So someone needs to actually audit the remaining references to the 
> privatedir in the code, and make sure they're handled correctly on
> upgrade.


Oh, of course you are right. Thanks for spotting this. Grepping
through source3, I found the following affected files:

idmap2.tdb
secrets.tdb
passdb.tdb (as PASSDB_FILE_NAME)
ldap_priv/
MACHINE.SID

Since this does actually not include smbpasswd, I may have missed
something here.  Can you tell me where the references to smbpasswd are
located? Are they just in debian/?

In terms of moving the files, would a simple

for name in idmap2.tdb \
            secrets.tdb \
            passdb.tdb \
            ldap_priv \
            MACHINE.SID; do
    [ -e /etc/samba/${name} ] && mv /etc/samba/${name} /var/lib/samba/
done

in debian/samba-common.postins be sufficient? (or should it be
samba.postinst?)



Best,

   -Nikolaus

- -- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iGoEARECACoFAk+dmVUjGmh0dHA6Ly93d3cucmF0aC5vcmcvZ3BncG9saWN5Lmh0
bWwACgkQqa23+K5OQlxfOACfawQub5A4qGSf7kULDSrWUuoZc7UAmwV/21wrhPTd
+RGtRbjV9NNvMYRT
=toPT
-----END PGP SIGNATURE-----





More information about the Pkg-samba-maint mailing list