[Fwd: [PATCH] support to add a username consists of only digitals]

Warren Togami wtogami at redhat.com
Wed Feb 18 20:36:38 UTC 2009


If anyone cares enough to follow up on this...

-------- Original Message --------
Subject: [PATCH] support to add a username consists of only digitals
Date: Wed, 18 Feb 2009 11:18:12 +0800
From: 潘卫平 <wppan at redflag-linux.com>
To: fedora-devel-list-owner at redhat.com

Hi all,

I found a BUG in libuser-0.56.9.
<https://fedorahosted.org/libuser/attachment/wiki/LibuserDownloads/libuser-0.56.9.tar.bz2>
When I add a username consists of only digitals, like "1234", error happens.

Reproduce steps:
1 luseradd 1234
2 Group 1234 does not exist

But when I use "useradd 1234" command, no error happens.

I find the reason that luseradd converts "1234" from string to a long
int, and uses it as gid.
But when luseradd uses lu_group_lookup_id(ctx, gidNumber, groupEnt,
&error) to find the group,
error happens, because there is not such a group.

Regards!

Pan Weiping


-------------- next part --------------
A non-text attachment was scrubbed...
Name: libuser-0.56.9-numbered_user.patch
Type: text/x-patch
Size: 714 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20090218/76ef2d34/attachment.bin 


More information about the devel mailing list