Package: libuuid1
Version: 2.25.1-3
Severity: important
Tags: patch

Today upgrades of libuuid1 failed in my sbuild chroots. The following is
an excerpt of a normal sbuild run that installs upgrades before starting
the build:

Get:1 http://localhost:3142/debian/ unstable/main libgpg-error0 amd64 1.16-2 
[80.2 kB]
Get:2 http://localhost:3142/debian/ unstable/main libgcrypt20 amd64 1.6.2-4 
[389 kB]
Get:3 http://localhost:3142/debian/ unstable/main libsystemd0 amd64 215-5+b1 
[82.3 kB]
Get:4 http://localhost:3142/debian/ unstable/main bsdutils amd64 1:2.25.1-3 
[92.3 kB]
Get:5 http://localhost:3142/debian/ unstable/main libuuid1 amd64 2.25.1-3 [63.0 
kB]
Get:6 http://localhost:3142/debian/ unstable/main libblkid1 amd64 2.25.1-3 [155 
kB]
Get:7 http://localhost:3142/debian/ unstable/main libmount1 amd64 2.25.1-3 [162 
kB]
Get:8 http://localhost:3142/debian/ unstable/main libsmartcols1 amd64 2.25.1-3 
[109 kB]
Get:9 http://localhost:3142/debian/ unstable/main mount amd64 2.25.1-3 [167 kB]
Get:10 http://localhost:3142/debian/ unstable/main util-linux amd64 2.25.1-3 
[852 kB]
Get:11 http://localhost:3142/debian/ unstable/main binutils amd64 
2.24.51.20141001-2 [3320 kB]
Get:12 http://localhost:3142/debian/ unstable/main libfakeroot amd64 1.20.2-1 
[44.7 kB]
Get:13 http://localhost:3142/debian/ unstable/main fakeroot amd64 1.20.2-1 
[84.7 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 5600 kB in 1s (3115 kB/s)
Selecting previously unselected package libgpg-error0:amd64.
(Reading database ... 11052 files and directories currently installed.)
Preparing to unpack .../libgpg-error0_1.16-2_amd64.deb ...
Unpacking libgpg-error0:amd64 (1.16-2) ...
Setting up libgpg-error0:amd64 (1.16-2) ...
Processing triggers for libc-bin (2.19-11) ...
Selecting previously unselected package libgcrypt20:amd64.
(Reading database ... 11073 files and directories currently installed.)
Preparing to unpack .../libgcrypt20_1.6.2-4_amd64.deb ...
Unpacking libgcrypt20:amd64 (1.6.2-4) ...
Setting up libgcrypt20:amd64 (1.6.2-4) ...
Processing triggers for libc-bin (2.19-11) ...
Selecting previously unselected package libsystemd0:amd64.
(Reading database ... 11083 files and directories currently installed.)
Preparing to unpack .../libsystemd0_215-5+b1_amd64.deb ...
Unpacking libsystemd0:amd64 (215-5+b1) ...
Setting up libsystemd0:amd64 (215-5+b1) ...
Processing triggers for libc-bin (2.19-11) ...
(Reading database ... 11089 files and directories currently installed.)
Preparing to unpack .../bsdutils_1%3a2.25.1-3_amd64.deb ...
Unpacking bsdutils (1:2.25.1-3) over (1:2.20.1-5.11) ...
Setting up bsdutils (1:2.25.1-3) ...
(Reading database ... 11095 files and directories currently installed.)
Preparing to unpack .../libuuid1_2.25.1-3_amd64.deb ...
Unpacking libuuid1:amd64 (2.25.1-3) over (2.20.1-5.11) ...
Setting up libuuid1:amd64 (2.25.1-3) ...
Password: chsh: PAM: Authentication failure
dpkg: error processing package libuuid1:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 libuuid1:amd64

When running the upgrade interactively in the chroot, it does not fail
immediately, but presents a password prompt instead:

Preparing to unpack .../libuuid1_2.25.1-3_amd64.deb ...
Unpacking libuuid1:amd64 (2.25.1-3) over (2.20.1-5.11) ...
Setting up libuuid1:amd64 (2.25.1-3) ...
Password:

After some hours of debugging there seem to be two ways to make it
upgrade:
 1. use usermod instead of chsh in libuuid1's postinst script
 2. change chsh's PAM configuration to not include "auth required
    pam_shells.so".

Since I'm not a PAM expert by any means, I cannot say anything about 2.
The first appraoch is implemented by the attached patch.

If you think this is a bug in chsh instead, please reassign accordingly.

Cheers
-- 
Sebastian Ramacher
diff -Nru util-linux-2.25.1/debian/changelog util-linux-2.25.1/debian/changelog
--- util-linux-2.25.1/debian/changelog	2014-10-05 19:06:55.000000000 +0200
+++ util-linux-2.25.1/debian/changelog	2014-10-06 17:07:41.000000000 +0200
@@ -1,3 +1,10 @@
+util-linux (2.25.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/libuuid1.postinst: Use usermod instead of chsh.
+
+ -- Sebastian Ramacher <[email protected]>  Mon, 06 Oct 2014 17:07:40 +0200
+
 util-linux (2.25.1-3) unstable; urgency=medium
 
   [ Ben Hutchings ]
diff -Nru util-linux-2.25.1/debian/libuuid1.postinst util-linux-2.25.1/debian/libuuid1.postinst
--- util-linux-2.25.1/debian/libuuid1.postinst	2014-10-05 19:06:55.000000000 +0200
+++ util-linux-2.25.1/debian/libuuid1.postinst	2014-10-06 17:06:13.000000000 +0200
@@ -17,7 +17,7 @@
 if getent passwd libuuid >/dev/null && ! getent passwd uuidd >/dev/null ; then
 	# switch existing libuuid user to not have a login shell.
 	if [ "$(getent passwd libuuid | cut -d: -f7)" = "/bin/sh" ]; then
-		chsh -s /bin/false libuuid
+		usermod -s /bin/false libuuid
 	fi
 
 	# attempt to stop potentially running uuidd, otherwise usermod will fail.

Attachment: signature.asc
Description: Digital signature

Reply via email to