5
* getgrnam_ext - first calls getgrnam, and if this call doesn't return
6
* anything, then it checks if the name is actually a group id by calling getgrgid
8
* @param grp_name (I) - a string containing either the group's name or id
9
* @return a pointer to the group, or NULL if the string represents neither
10
* a valid group name nor a valid group id, or is NULL itself.
14
struct group * getgrnam_ext(
16
char * grp_name ) /* I */
22
/* bad argument check */
26
grp = getgrnam( grp_name );
28
/* if the group wasn't found by name, check if the name */
29
/* was the group's id */
33
if (isdigit(grp_name[0]))
34
grp = getgrgid(atoi(grp_name));