Package: sbuild
Version: 0.64.0-1
Severity: wishlist
Tags: patch

I run a setup where the sbuild user is in LDAP. This makes the usermod command
in the postinst script fail, because usermod only operates on local users. 

Attached patch verifies the user exists in /etc/passwd before attempting to run
usermod. I couldn't find another way to check whether running usermod on a user
would work.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing-proposed-updates
  APT policy: (910, 'testing-proposed-updates'), (900, 'testing'), (900, 
'stable'), (525, 'unstable'), (515, 'experimental'), (500, 'stable-updates'), 
(110, 'precise-updates'), (110, 'precise')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages sbuild depends on:
ii  adduser         3.113+nmu3
ii  apt-utils       0.9.8.1
ii  libsbuild-perl  0.64.0-1
ii  perl            5.14.2-21
ii  perl-modules    5.14.2-21

Versions of packages sbuild recommends:
ii  debootstrap  1.0.49
ii  fakeroot     1.18.4-2

Versions of packages sbuild suggests:
pn  deborphan  <none>
ii  wget       1.14-1

-- no debconf information

*** /tmp/patch
--- debian/sbuild.postinst.orig 2013-05-28 19:26:51.069190007 +0200
+++ debian/sbuild.postinst      2013-05-28 19:27:20.906396270 +0200
@@ -68,7 +68,7 @@
                --shell /bin/bash --ingroup sbuild --gecos "Debian source 
builder" sbuild
         fi
        # Unlock account in case it was locked from previous purge.
-       usermod -U -e '' sbuild
+       grep '^sbuild:' /etc/passwd >/dev/null && usermod -U -e '' sbuild
 
         chown -R sbuild:sbuild /var/lib/sbuild
         chmod 02770 /var/lib/sbuild


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/debian-bugs-dist

Reply via email to