aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
diff options
context:
space:
mode:
authorMoritz Buhl <gh@moritzbuhl.de>2019-07-09 15:03:37 +0000
committerWarner Losh <imp@FreeBSD.org>2021-07-07 20:09:44 +0000
commite991afea1e794885931d17310019e4c067501981 (patch)
treebd51550e2a67337a899e8ee1881603778f6b4227 /sys/kern/syscalls.master
parent9e06b34bb5d3544915ebea1a3f343f915004bbe1 (diff)
kern: fail getgroup and setgroup with negative int
Found using https://github.com/NetBSD/src/blob/trunk/tests/lib/libc/sys/t_getgroups.c getgroups/setgroups want an int and therefore casting it to u_int resulted in `getgroups(-1, ...)` not returning -1 / errno = EINVAL. imp@ updated syscall.master and made changes markj@ suggested PR: 189941 Tested by: imp@ Reviewed by: markj@ Pull Request: https://github.com/freebsd/freebsd-src/pull/407 Differential Revision: https://reviews.freebsd.org/D30617 (cherry picked from commit 4bc2174a1b489c36195ccc8cfc15e0775b817c69)
Diffstat (limited to 'sys/kern/syscalls.master')
-rw-r--r--sys/kern/syscalls.master4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 5c6ebeb9b52f..5b8e8049927c 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -526,13 +526,13 @@
}
79 AUE_GETGROUPS STD {
int getgroups(
- u_int gidsetsize,
+ int gidsetsize,
_Out_writes_opt_(gidsetsize) gid_t *gidset
);
}
80 AUE_SETGROUPS STD {
int setgroups(
- u_int gidsetsize,
+ int gidsetsize,
_In_reads_(gidsetsize) gid_t *gidset
);
}