This bug had a serious impact on chown: `chown N:M FILE' (for integer
authorJim Meyering <jim@meyering.net>
Sat, 16 Dec 2000 13:28:13 +0000 (13:28 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 16 Dec 2000 13:28:13 +0000 (13:28 +0000)
N and M) would have treated it like `chown N:N FILE'.
(parse_user_spec): Fix typo: s/u/g/.

lib/userspec.c

index 3b69d73..3e67b1b 100644 (file)
@@ -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;