From owner-cvs-sys Mon Mar 31 05:21:41 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA17122 for cvs-sys-outgoing; Mon, 31 Mar 1997 05:21:41 -0800 (PST) Received: (from peter@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA17115; Mon, 31 Mar 1997 05:21:39 -0800 (PST) Date: Mon, 31 Mar 1997 05:21:39 -0800 (PST) From: Peter Wemm Message-Id: <199703311321.FAA17115@freefall.freebsd.org> To: CVS-committers, cvs-all, cvs-sys Subject: cvs commit: src/sys/kern kern_prot.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk peter 97/03/31 05:21:39 Modified: sys/kern kern_prot.c Log: Make setgroups(0, xxx) behave as it does on SYSV, namely clear the groups vector except for the egid in groups[0]. There is a risk that programs that come from SYSV/Linux that expect this to work and don't check for error returns may accidently pass root's groups on to child processes. We now do what is least suprising (to non BSD programs/programmers) in this scenario, and nothing is changed for programs written with BSD groups rules in mind. Reviewed by: ache Revision Changes Path 1.27 +20 -6 src/sys/kern/kern_prot.c