Processed: Re: Bug#336843: adduser: removes user from group if /etc/group file ends with :

2007-03-06 Thread Debian Bug Tracking System
Processing commands for [EMAIL PROTECTED]:

 tags 336843 wontfix
Bug#336843: getgrnam returns trailing : in user name
There were no tags set.
Tags added: wontfix

 thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#336843: adduser: removes user from group if /etc/group file ends with :

2007-03-06 Thread Helmut Grohne
tags 336843 wontfix
thanks

 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.
 perl doesn't parse /etc/group directly, it just calls libc's getgrname,
 which returns a list as gr_mem (the last entry of which has a trailing
 colon in this case).

There is specified behaviour on invalid passwd files, so whatever glibc
does here is within the specs. The function could also segfault at that
point. This could maybe reported to the upstream but they'll probably
think the same way.

Helmut Grohne


signature.asc
Description: Digital signature


Re: Bug#336843: adduser: removes user from group if /etc/group file ends with :

2006-08-27 Thread Aurelien Jarno
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/[EMAIL PROTECTED]:~$
 
 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
 `. `'   [EMAIL PROTECTED] | [EMAIL PROTECTED]
   `-people.debian.org/~aurel32 | www.aurel32.net


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Bug#336843: adduser: removes user from group if /etc/group file ends with :

2005-11-03 Thread Brendan O'Dea
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/[EMAIL PROTECTED]:~$

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.

perl doesn't parse /etc/group directly, it just calls libc's getgrname,
which returns a list as gr_mem (the last entry of which has a trailing
colon in this case).

--bod


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]