Re: getgroups(2) with negative values

2019-07-08 Thread Todd C . Miller
On Mon, 08 Jul 2019 16:36:05 +0200, Moritz Buhl wrote: > while porting some NetBSD syscall tests to OpenBSD I noticed that the > getgroups test is failing. Simply put: > > gid_t gidset[NGROUPS_MAX]; > getgroups(-1, gidset); > > This was fixed on NetBSD 8 years ago: > http://cvsweb.netbsd.org/bsdwe

getgroups(2) with negative values

2019-07-08 Thread Moritz Buhl
Hi, while porting some NetBSD syscall tests to OpenBSD I noticed that the getgroups test is failing. Simply put: gid_t gidset[NGROUPS_MAX]; getgroups(-1, gidset); This was fixed on NetBSD 8 years ago: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_prot.c > if (SCARG(uap, gidsetsize)