Fix inverted check in sys_setgroups().

This commit is contained in:
dsl 2007-06-30 21:31:41 +00:00
parent 8dedfc4041
commit 477e862d2a
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_prot.c,v 1.103 2007/06/30 13:32:14 dsl Exp $ */
/* $NetBSD: kern_prot.c,v 1.104 2007/06/30 21:31:41 dsl Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1990, 1991, 1993
@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.103 2007/06/30 13:32:14 dsl Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_prot.c,v 1.104 2007/06/30 21:31:41 dsl Exp $");
#include "opt_compat_43.h"
@ -235,7 +235,7 @@ sys_getgroups(struct lwp *l, void *v, register_t *retval)
*retval = kauth_cred_ngroups(l->l_cred);
if (SCARG(uap, gidsetsize) == 0)
return 0;
if (SCARG(uap, gidsetsize) > *retval)
if (SCARG(uap, gidsetsize) < *retval)
return EINVAL;
return kauth_cred_getgroups(l->l_cred, SCARG(uap, gidset), *retval,