Date: Mon, 19 May 2014 09:21:55 GMT From: Peter Holm <pho@freebsd.org> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/189941: getgroups(2) implements first argument as unsigned int Message-ID: <201405190921.s4J9LtP3089031@cgiserv.freebsd.org> Resent-Message-ID: <201405190930.s4J9U0QM058672@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 189941 >Category: kern >Synopsis: getgroups(2) implements first argument as unsigned int >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon May 19 09:30:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Peter Holm >Release: 11.0-CURRENT >Organization: >Environment: FreeBSD x4.osted.lan 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r265724: Fri May 9 03:32:53 CEST 2014 pho@x4.osted.lan:/usr/src/sys/i386/compile/PHO i386 >Description: Passing -1 as gidsetlen is not detected. Discovered by ATF. Caught on Ubuntu and OS/X. >How-To-Repeat: #include <err.h> #include <errno.h> #include <unistd.h> #include <sys/param.h> int main(void) { gid_t gidset[NGROUPS_MAX]; if (getgroups(-1, gidset) != -1) errx(1, "getgroups(-1, ...) must fail."); else if (errno != EINVAL) err(1, "getgroups(-1, ...) failed."); return (0); } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405190921.s4J9LtP3089031>