[Bug 172276] POSIX: {get,set}groups gidsetsize is u_int not int

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 07 Aug 2021 00:08:10 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=172276

Ed Maste <emaste_at_freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|Open                        |Closed

--- Comment #2 from Ed Maste <emaste_at_freebsd.org> ---
Fixed by:

commit 4bc2174a1b489c36195ccc8cfc15e0775b817c69
Author: Moritz Buhl <gh_at_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_at_ updated syscall.master and made changes markj_at_ suggested

    PR:                     189941
    Tested by:              imp_at_
    Reviewed by:            markj_at_
    Pull Request:           https://github.com/freebsd/freebsd-src/pull/407
    Differential Revision:  https://reviews.freebsd.org/D30617

commit 9f3d1a98dd17b9f02912aecab328fd0315d8ef35
Author: Warner Losh <imp_at_FreeBSD.org>
Date:   Wed Jun 2 12:06:13 2021 -0600

    regen after tweaks to getgroups and setgroups

    Sponsored by:           Netflix

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Sat Aug 07 2021 - 00:08:10 UTC

Original text of this message