[Pkg-samba-maint] r4213 - in branches/samba/wheezy/debian: . patches
idd-guest at alioth.debian.org
idd-guest at alioth.debian.org
Mon Apr 15 21:26:16 UTC 2013
tags 454770 pending
thanks
Author: idd-guest
Date: 2013-04-15 21:26:16 +0000 (Mon, 15 Apr 2013)
New Revision: 4213
Modified:
branches/samba/wheezy/debian/changelog
branches/samba/wheezy/debian/patches/fhs-filespaths.patch
branches/samba/wheezy/debian/samba.postinst
Log:
* Move binary files out of /etc/samba to /var/lib/samba,
where they belong according to the FHS:
- schannel_store.tdb
- idmap2.tdb
- MACHINE.sid
Closes: #454770
Modified: branches/samba/wheezy/debian/changelog
===================================================================
--- branches/samba/wheezy/debian/changelog 2013-03-18 21:37:55 UTC (rev 4212)
+++ branches/samba/wheezy/debian/changelog 2013-04-15 21:26:16 UTC (rev 4213)
@@ -1,3 +1,14 @@
+samba (2:3.6.6-6) UNRELEASED; urgency=low
+
+ * Move binary files out of /etc/samba to /var/lib/samba,
+ where they belong according to the FHS:
+ - schannel_store.tdb
+ - idmap2.tdb
+ - MACHINE.sid
+ Closes: #454770
+
+ -- Ivo De Decker <ivo.dedecker at ugent.be> Mon, 15 Apr 2013 23:07:57 +0200
+
samba (2:3.6.6-5) unstable; urgency=high
* Security update
Modified: branches/samba/wheezy/debian/patches/fhs-filespaths.patch
===================================================================
--- branches/samba/wheezy/debian/patches/fhs-filespaths.patch 2013-03-18 21:37:55 UTC (rev 4212)
+++ branches/samba/wheezy/debian/patches/fhs-filespaths.patch 2013-04-15 21:26:16 UTC (rev 4213)
@@ -63,3 +63,47 @@
.sp
Default:
\fI\fIprivate dir\fR\fR\fI = \fR\fI${prefix}/private\fR\fI \fR
+--- a/libcli/auth/schannel_state_tdb.c
++++ b/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;
+--- a/source3/passdb/machine_sid.c
++++ b/source3/passdb/machine_sid.c
+@@ -132,7 +132,7 @@
+ }
+
+ /* check for an old MACHINE.SID file for backwards compatibility */
+- if (asprintf(&fname, "%s/MACHINE.SID", lp_private_dir()) == -1) {
++ if (asprintf(&fname, "%s/MACHINE.SID", lp_statedir()) == -1) {
+ SAFE_FREE(sam_sid);
+ return NULL;
+ }
+--- a/source3/utils/net_idmap.c
++++ b/source3/utils/net_idmap.c
+@@ -75,7 +75,7 @@
+ dbfile = lp_parm_talloc_string(-1, "tdb", "idmap2.tdb", NULL);
+ if (dbfile == NULL) {
+ dbfile = talloc_asprintf(talloc_tos(), "%s/idmap2.tdb",
+- lp_private_dir());
++ lp_statedir());
+ }
+ if (dbfile == NULL) {
+ d_fprintf(stderr, _("Out of memory!\n"));
+--- a/source3/winbindd/idmap_tdb2.c
++++ b/source3/winbindd/idmap_tdb2.c
+@@ -108,7 +108,7 @@
+ return NT_STATUS_OK;
+ }
+
+- db_path = talloc_asprintf(NULL, "%s/idmap2.tdb", lp_private_dir());
++ db_path = talloc_asprintf(NULL, "%s/idmap2.tdb", lp_statedir());
+ NT_STATUS_HAVE_NO_MEMORY(db_path);
+
+ /* Open idmap repository */
Modified: branches/samba/wheezy/debian/samba.postinst
===================================================================
--- branches/samba/wheezy/debian/samba.postinst 2013-03-18 21:37:55 UTC (rev 4212)
+++ branches/samba/wheezy/debian/samba.postinst 2013-04-15 21:26:16 UTC (rev 4213)
@@ -53,6 +53,27 @@
# ------------------------- Debconf questions end ---------------------
+# bug #454770
+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
+
+# bug #454770
+if dpkg --compare-versions "$2" lt-nl 2:3.6.6-6 \
+ && dpkg --compare-versions "$2" ge 3.0.24 \
+ && [ -e /etc/samba/idmap2.tdb ] \
+ && ! [ -e /var/lib/samba/idmap2.tdb ]
+then
+ mv /etc/samba/idmap2.tdb /var/lib/samba/idmap2.tdb
+fi
+
+# TODO what if /etc/samba/idmap2.tdb and /var/lib/samba/idmap2.tdb both exist.
+# Should we abort and warn the user?
+
# 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.
More information about the Pkg-samba-maint
mailing list