Re: Bug#336843: adduser: removes user from group if /etc/group file ends with ":"
severity 336843 wishlist
thanks
On Fri, Nov 04, 2005 at 06:29:10PM +1100, Brendan O'Dea wrote:
> reassign 336843 glibc
> thanks
>
> On Thu, Nov 03, 2005 at 09:11:15PM +0100, Marc Haber wrote:
> >On Tue, Nov 01, 2005 at 05:43:40PM +0100, Marc Haber wrote:
> >> If a line in /etc/group ends with a colon, adduser user group removes
> >> the last user listed in /etc/group:
>
> >Actually, it's perl's fault:
> >$ grep '^wheel' /etc/group
> >wheel:x:104:mh,scyadmin:
> >$ perl -e 'foreach (split(/ /,
> >(getgrnam("wheel"))[3])) { print "$_\n"; };'
> >mh
> >scyadmin:
> >[12/511]mh@scyw00225:~$
> >
> >Judged that ":" is the field separator in /etc/group, and that
> >/etc/group might change its format to include more fields, and that a
> >colon is not a valid character in a user name (it would wreck havoc in
> >/etc/passwd), I would expect that perl would consider the ":" a
> >delimiter here and not return it as part of the group name.
>
The format of /etc/group does not allow to put a colon at this place, so
if you put one anyway, it's normal to have some breakage.
Closing the bug.
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
Reply to: