This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch]: getent: properly check for non numeric arguments


Hi,
currently getent handles lookups like:
	getent group 1foo
as numeric (since it only checks the first digit) and tries to lookup
the group name matching the gid=1foo which always fails, same for
passwd.
The attached patch uses strtoul() instead of isdigit(), to make sure the
passed argument is really a number and treats it as group/user name
otherwise. Please apply.
Cheers,
 -- Guido

Attachment: getent-numeric-uid.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]