[23106] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r22769 - trunk/debathena/config/nsswitch-config/debian

daemon@ATHENA.MIT.EDU (tabbott@MIT.EDU)
Mon Feb 25 22:16:36 2008

Date: Mon, 25 Feb 2008 22:14:56 -0500 (EST)
From: tabbott@MIT.EDU
Message-Id: <200802260314.WAA05558@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: tabbott
Date: 2008-02-25 22:14:55 -0500 (Mon, 25 Feb 2008)
New Revision: 22769

Modified:
   trunk/debathena/config/nsswitch-config/debian/adduser.debathena
Log:
The last checkin broke 'adduser <user> <group>' where <group> is a
local group and <user> is a nonlocal user.
*debathena/config/nsswitch-config/debian/adduser.debathena: Check
 which mode adduser is running in by parsing its arguments, and don't
 set NSS_NONLOCAL_IGNORE in the 2-argument adduser mode.


Modified: trunk/debathena/config/nsswitch-config/debian/adduser.debathena
===================================================================
--- trunk/debathena/config/nsswitch-config/debian/adduser.debathena	2008-02-26 02:27:31 UTC (rev 22768)
+++ trunk/debathena/config/nsswitch-config/debian/adduser.debathena	2008-02-26 03:14:55 UTC (rev 22769)
@@ -1,3 +1,40 @@
 #!/usr/bin/perl
-$ENV{'NSS_NONLOCAL_IGNORE'} = 'ignore';
+use Getopt::Long;
+
+my $nop;
+my @names;
+my @save_names=@names;
+my @SAVE_ARGV=@ARGV;
+# Parse adduser options
+GetOptions ("quiet|q" => \$nop,
+            "force-badname" => \$nop,
+	    "help|h" => \$nop,
+	    "version|v" => \$nop,
+	    "system" => \$nop,
+	    "group" => \$nop,
+	    "ingroup=s" => \$nop,
+	    "home=s" => \$nop,
+	    "gecos=s" => \$nop,
+	    "shell=s" => \$nop,
+	    "disabled-password" => \$nop,
+	    "disabled-login" => \$nop,
+	    "uid=i" => \$nop,
+	    "firstuid=i" => \$nop,
+	    "lastuid=i" => \$nop,
+	    "gid=i" => \$nop,
+	    "conf=s" => \$nop,
+	    "no-create-home" => \$nop,
+            "add_extra_groups" => \$nop,
+	    "debug" => \$nop);
+
+while (defined(my $arg = shift(@ARGV))) {
+  push (@names, $arg);
+}
+
+if (@names != 2) {
+    $ENV{'NSS_NONLOCAL_IGNORE'} = 'ignore';
+}
+
+@ARGV=@SAVE_ARGV;
+@names=@save_names;
 do '/usr/sbin/adduser.debathena-orig';


home help back first fref pref prev next nref lref last post