X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fuserspec.c;h=3e67b1b56305b8269a4c87074680ab3c7be8e358;hb=aaea9d07f672ec45a4687a5e99c3994ef41d4491;hp=27b687d43eae25e586c9cec17dda6e918ef270b7;hpb=a0611e0e25a9a502332a5464b014f11cc6cd88d6;p=gnulib.git diff --git a/lib/userspec.c b/lib/userspec.c index 27b687d43..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 @@ -304,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;