[Pkg-samba-maint] [samba] 01/01: Also do the tdb move in libpam-smbpass.preinst
Ivo De Decker
idd-guest at alioth.debian.org
Sat Nov 2 10:11:47 UTC 2013
This is an automated email from the git hooks/post-receive script.
idd-guest pushed a commit to branch master
in repository samba.
commit e5460c9415520b06983897047c0c0c2cffc734bf
Author: Ivo De Decker <ivo.dedecker at ugent.be>
Date: Sat Nov 2 10:49:07 2013 +0100
Also do the tdb move in libpam-smbpass.preinst
---
debian/changelog | 2 ++
.../{samba-libs.preinst => libpam-smbpass.preinst} | 23 +++++++++-----------
debian/samba-libs.preinst | 4 +++-
3 files changed, 15 insertions(+), 14 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9bf409a..8434969 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ samba (2:4.0.10+dfsg-4) UNRELEASED; urgency=low
[ Ivo De Decker ]
* Handle move of tdb files to private dir in samba-libs.preinst.
Closes: #726472
+ * Also do the tdb move in libpam-smbpass.preinst, to avoid breaking the pam
+ module if the upgrade fails.
-- Christian Perrier <bubulle at debian.org> Tue, 22 Oct 2013 20:29:59 +0200
diff --git a/debian/samba-libs.preinst b/debian/libpam-smbpass.preinst
similarity index 62%
copy from debian/samba-libs.preinst
copy to debian/libpam-smbpass.preinst
index 68b8d5d..ba0b5f9 100644
--- a/debian/samba-libs.preinst
+++ b/debian/libpam-smbpass.preinst
@@ -4,8 +4,14 @@
set -e
-# Move files to private subdir now fhs patch is finally gone
-if [ "$1" = "install" ]
+# this code is identical to the code in samba-libs.preinst
+# it is here to make sure that libpam-smbpass isn't upgraded in cases where
+# the samba-libs preinst would fail
+# if this code fails, the old version of libpam-smbpass will stay on the
+# system, and keep working (the 3.6 version of libpam-smbpass was
+# self-contained and doesn't need any shared libraries from other samba
+# packages)
+if [ "$1" = "upgrade" ]
then
for file in passdb.tdb secrets.tdb schannel_store.tdb idmap2.tdb
do
@@ -14,7 +20,7 @@ then
if [ -e /var/lib/samba/private/$file ] &&
[ ! /var/lib/samba/$file -ef /var/lib/samba/private/$file ]
then
- echo $file exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst
+ echo $file exists in /var/lib/samba and /var/lib/samba/private, aborting libpam-smbpass preinst
echo rename one of them to allow the install/upgrade to continue
echo http://bugs.debian.org/726472
ls -al /var/lib/samba /var/lib/samba/private
@@ -33,19 +39,10 @@ then
mkdir /var/lib/samba/private
fi
mv /var/lib/samba/$file /var/lib/samba/private/$file
- ln -s /var/lib/samba/private/$file /var/lib/samba/$file
+ ln /var/lib/samba/private/$file /var/lib/samba/$file
fi
fi
done
-
- # bug #454770
- # this is only relevant for upgrades from versions before 2:3.6.13-2
- # this bug was never present in a stable release
- if [ -e /etc/samba/idmap2.tdb ] \
- && ! [ -e /var/lib/samba/private/idmap2.tdb ]
- then
- mv /etc/samba/idmap2.tdb /var/lib/samba/private/idmap2.tdb
- fi
fi
diff --git a/debian/samba-libs.preinst b/debian/samba-libs.preinst
index 68b8d5d..52f7989 100644
--- a/debian/samba-libs.preinst
+++ b/debian/samba-libs.preinst
@@ -5,6 +5,8 @@
set -e
# Move files to private subdir now fhs patch is finally gone
+# this code is also present in libpam-smbpass.preinst (and should be kept in
+# sync)
if [ "$1" = "install" ]
then
for file in passdb.tdb secrets.tdb schannel_store.tdb idmap2.tdb
@@ -33,7 +35,7 @@ then
mkdir /var/lib/samba/private
fi
mv /var/lib/samba/$file /var/lib/samba/private/$file
- ln -s /var/lib/samba/private/$file /var/lib/samba/$file
+ ln /var/lib/samba/private/$file /var/lib/samba/$file
fi
fi
done
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git
More information about the Pkg-samba-maint
mailing list