From owner-freebsd-bugs@FreeBSD.ORG Mon May 19 09:30:00 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B293B367 for ; Mon, 19 May 2014 09:30:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77369246E for ; Mon, 19 May 2014 09:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9U0rV058675 for ; Mon, 19 May 2014 09:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s4J9U0QM058672; Mon, 19 May 2014 09:30:00 GMT (envelope-from gnats) Resent-Date: Mon, 19 May 2014 09:30:00 GMT Resent-Message-Id: <201405190930.s4J9U0QM058672@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Peter Holm Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E014F9F for ; Mon, 19 May 2014 09:21:55 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BC5823F4 for ; Mon, 19 May 2014 09:21:55 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s4J9LtEB089041 for ; Mon, 19 May 2014 09:21:55 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s4J9LtP3089031; Mon, 19 May 2014 09:21:55 GMT (envelope-from nobody) Message-Id: <201405190921.s4J9LtP3089031@cgiserv.freebsd.org> Date: Mon, 19 May 2014 09:21:55 GMT From: Peter Holm To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: kern/189941: getgroups(2) implements first argument as unsigned int X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2014 09:30:00 -0000 >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 #include #include #include 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: