Summary: | POSIX: {get,set}groups gidsetsize is u_int not int | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Ed Maste <emaste> | ||||
Component: | standards | Assignee: | freebsd-standards (Nobody) <standards> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | Keywords: | patch | ||||
Priority: | Normal | ||||||
Version: | 9.0-STABLE | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
See Also: | https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189941 | ||||||
Attachments: |
|
Description
Ed Maste
![]() ![]() batch change of PRs untouched in 2018 marked "in progress" back to open. Fixed by: commit 4bc2174a1b489c36195ccc8cfc15e0775b817c69 Author: Moritz Buhl <gh@moritzbuhl.de> Date: Tue Jul 9 17:03:37 2019 +0200 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 commit 9f3d1a98dd17b9f02912aecab328fd0315d8ef35 Author: Warner Losh <imp@FreeBSD.org> Date: Wed Jun 2 12:06:13 2021 -0600 regen after tweaks to getgroups and setgroups Sponsored by: Netflix |