*** empty log message ***
[gnulib.git] / lib / userspec.c
index 67bde65..3e67b1b 100644 (file)
@@ -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;