summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-12-16 13:28:13 +0000
committerJim Meyering <jim@meyering.net>2000-12-16 13:28:13 +0000
commit608b34758439c89a2e0e1007565bf23abc901502 (patch)
tree06f6f94c01fb1daf310f31952f8e297f1b599e4e /lib
parent6c4cbe6b5f60e5c00acabdaea5e66da0f0f7c905 (diff)
downloadcoreutils-608b34758439c89a2e0e1007565bf23abc901502.tar.xz
This bug had a serious impact on chown: `chown N:M FILE' (for integer
N and M) would have treated it like `chown N:N FILE'. (parse_user_spec): Fix typo: s/u/g/.
Diffstat (limited to 'lib')
-rw-r--r--lib/userspec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/userspec.c b/lib/userspec.c
index 3b69d7395..3e67b1b56 100644
--- a/lib/userspec.c
+++ b/lib/userspec.c
@@ -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;