X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fuserspec.c;h=3e67b1b56305b8269a4c87074680ab3c7be8e358;hb=d36212cb0a461bc3f063ecbcb1c4d88316eaa397;hp=67bde6574d298324af290f7efd3b299f98334f33;hpb=2bcfb3c5f7e791a1d906cfd6fe577af87ab3fcd0;p=gnulib.git diff --git a/lib/userspec.c b/lib/userspec.c index 67bde6574..3e67b1b56 100644 --- a/lib/userspec.c +++ b/lib/userspec.c @@ -163,8 +163,8 @@ is_number (const char *str) use the given user's login group. If SPEC_ARG contains a `:', then use that as the separator, ignoring any `.'s. If there is no `:', but there is a `.', then first look - up SPEC_ARG as a login name. If that look-up fails, then try again - interpreting the `.' as a separator. + up the entire SPEC_ARG as a login name. If that look-up fails, then + try again interpreting the `.' as a separator. USERNAME and GROUPNAME will be in newly malloc'd memory. Either one might be NULL instead, indicating that it was not @@ -261,7 +261,6 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid, if (xstrtoul (u, NULL, 0, &tmp_long, NULL) != LONGINT_OK || tmp_long > MAXUID) return _(E_invalid_user); - printf ("MAXUID: %u\n", (uid_t) MAXUID); *uid = tmp_long; } } @@ -305,7 +304,7 @@ parse_user_spec (const char *spec_arg, uid_t *uid, gid_t *gid, else { unsigned long int tmp_long; - if (xstrtoul (u, NULL, 0, &tmp_long, NULL) != LONGINT_OK + if (xstrtoul (g, NULL, 0, &tmp_long, NULL) != LONGINT_OK || tmp_long > MAXGID) return _(E_invalid_group); *gid = tmp_long;