[Adduser-devel] Bug#339686: Fails where shadow passwords are
disabled
Matt Zimmerman
mdz at ubuntu.com
Thu Nov 17 23:10:08 UTC 2005
Package: adduser
Version: 3.78ubuntu1
Severity: important
Tags: patch
Many chroot environments don't use shadow passwords, and adduser seems to
fail in those enviroments now. The code in adduser attempts to cope with
this, but it's defeated by the check within the systemcall function.
Patch attached.
-- System Information:
Debian Release: testing/unstable
APT prefers dapper
APT policy: (500, 'dapper')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-9-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages adduser depends on:
ii debconf [debconf-2.0] 1.4.59ubuntu1 Debian configuration management sy
ii passwd 1:4.0.13-6ubuntu1 change and administer password and
ii perl-base 5.8.7-8 The Pathologically Eclectic Rubbis
adduser recommends no packages.
-- debconf information excluded
--
- mdz
-------------- next part --------------
diff -Nru /tmp/InEuVwVKcO/adduser-3.78/adduser /tmp/R5W8T7emGw/adduser-3.78ubuntu1/adduser
--- /tmp/InEuVwVKcO/adduser-3.78/adduser 2005-11-15 14:44:39.000000000 -0800
+++ /tmp/R5W8T7emGw/adduser-3.78ubuntu1/adduser 2005-11-17 14:45:06.000000000 -0800
@@ -374,8 +374,8 @@
&systemcall('/usr/sbin/useradd', '-d', $home_dir, '-g', $ingroup_name, '-s',
$shell, '-u', $new_uid, $new_name);
print "/usr/bin/chage -M 99999 $new_name\n" if ($verbose > 1);
- if (&systemcall('/usr/bin/chage', '-M', '99999', $new_name)) {
- if( ($?>>8) ne 15 ) {
+ if (system("/usr/bin/chage -M 99999 $new_name")) {
+ if( ($?>>8) != 15 ) {
&cleanup("$0: `/usr/bin/chage -M 99999 $new_name' returned error code " . ($?>>8) . ". Aborting.\n")
if ($?>>8);
&cleanup("$0: `/usr/bin/chage -M 99999 $new_name' exited from signal " . ($?&255) . ". Aborting.\n");
More information about the Adduser-devel
mailing list