Anders Kaseorg
2011-Mar-09 08:56 UTC
Bug#617480: ‘delgroup 0’ spews ‘Use of uninitialized value $gr_gid’
Package: adduser Version: 3.112+nmu2 Severity: minor Tags: patch Believe it or not, I just had a legitimate reason to try this: $ sudo addgroup --force-badname 0 Allowing use of questionable username. Adding group `0'' (GID 1002) ... Done. $ sudo delgroup 0 Use of uninitialized value $gr_gid in string eq at /usr/sbin/delgroup line 414. Use of uninitialized value $gr_gid in string eq at /usr/sbin/delgroup line 414. Use of uninitialized value $gr_gid in string eq at /usr/sbin/delgroup line 414. … Use of uninitialized value $gr_gid in string eq at /usr/sbin/delgroup line 414. Use of uninitialized value $gr_gid in string eq at /usr/sbin/delgroup line 414. Use of uninitialized value $gr_gid in string eq at /usr/sbin/delgroup line 414. Removing group `0'' ... Done. Here’s a patch: --- adduser-3.112+nmu2/deluser +++ adduser-3.112+nmu2/deluser @@ -175,7 +175,7 @@ my ($pw_uid, $pw_gid, $pw_homedir, $gr_gid, $maingroup); -if($user) { +if (defined($user)) { my @passwd = getpwnam($user); $pw_uid = $passwd[2]; $pw_gid = $passwd[3]; @@ -183,7 +183,7 @@ $maingroup = $pw_gid ? getgrgid($pw_gid) : ""; } -if($group) { +if (defined($group)) { #($gr_name,$gr_passwd,$gr_gid,$gr_members) = getgrnam($group); my @group = getgrnam($group); $gr_gid = $group[2];
Debian Bug Tracking System
2011-Jun-13 19:51 UTC
[Adduser-devel] Bug#617480: marked as done ( ‘delgroup 0’ spews ‘Use of uninitialized value =?UTF-8?Q?$gr=5Fgid=E2=80=99?=)
Your message dated Mon, 13 Jun 2011 19:47:09 +0000 with message-id <E1QWD6L-0004Fd-NF at franck.debian.org> and subject line Bug#617480: fixed in adduser 3.113 has caused the Debian Bug report #617480, regarding ?delgroup 0? spews ?Use of uninitialized value $gr_gid? to be marked as done. This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact owner at bugs.debian.org immediately.) -- 617480: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617480 Debian Bug Tracking System Contact owner at bugs.debian.org with problems -------------- next part -------------- An embedded message was scrubbed... From: Anders Kaseorg <andersk at MIT.EDU> Subject: ?delgroup 0? spews ?Use of uninitialized value $gr_gid? Date: Wed, 9 Mar 2011 03:56:27 -0500 (EST) Size: 3510 URL: <http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20110613/a43e1bbf/attachment-0002.mht> -------------- next part -------------- An embedded message was scrubbed... From: Stephen Gran <sgran at debian.org> Subject: Bug#617480: fixed in adduser 3.113 Date: Mon, 13 Jun 2011 19:47:09 +0000 Size: 5233 URL: <http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20110613/a43e1bbf/attachment-0003.mht>