summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2018-09-18 15:14:06 +0000
committertb <tb@openbsd.org>2018-09-18 15:14:06 +0000
commitf102d685f14ca856783f29dde899b5e0a281e429 (patch)
tree99252fa715089c2915374d4df5ace6c005af0d3f
parentfix a crash when prefix length is not specified (diff)
downloadwireguard-openbsd-f102d685f14ca856783f29dde899b5e0a281e429.tar.xz
wireguard-openbsd-f102d685f14ca856783f29dde899b5e0a281e429.zip
Fix typo in previous: group_from_gid(st->st_gid, 1), not st_uid.
This broke the chmod regression test, as noted and tracked down by bluhm. ok millert
-rw-r--r--usr.bin/stat/stat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/stat/stat.c b/usr.bin/stat/stat.c
index 6ff0f2659c4..0107e42de91 100644
--- a/usr.bin/stat/stat.c
+++ b/usr.bin/stat/stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: stat.c,v 1.22 2018/09/16 02:42:19 millert Exp $ */
+/* $OpenBSD: stat.c,v 1.23 2018/09/18 15:14:06 tb Exp $ */
/* $NetBSD: stat.c,v 1.19 2004/06/20 22:20:16 jmc Exp $ */
/*
@@ -598,7 +598,7 @@ format1(const struct stat *st,
case SHOW_st_gid:
small = (sizeof(st->st_gid) == 4);
data = st->st_gid;
- sdata = group_from_gid(st->st_uid, 1);
+ sdata = group_from_gid(st->st_gid, 1);
if (sdata == NULL) {
snprintf(sid, sizeof(sid), "(%ld)", (long)st->st_gid);
sdata = sid;