aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2014-10-26 14:25:42 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2014-10-26 14:25:42 +0000
commitb90638866e17e63e760e6b18e15460b4ec587ca0 (patch)
tree8a065c085016285b7df094a6abbcbf9ba26fc04a /sys
parent9d66b6a5a904b291e22f01b68ea99d3959a2da00 (diff)
downloadsrc-b90638866e17e63e760e6b18e15460b4ec587ca0.tar.gz
src-b90638866e17e63e760e6b18e15460b4ec587ca0.zip
Fix up an assertion in kern_setgroups, it should compare with ngroups_max + 1
Bug introdued in r273685. Noted by: Tiwei Bie <btw mail.ustc.edu.cn>
Notes
Notes: svn path=/head/; revision=273691
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_prot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 339c5ff056c7..9b2bcd86791c 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -835,7 +835,7 @@ kern_setgroups(struct thread *td, u_int ngrp, gid_t *groups)
struct ucred *newcred, *oldcred;
int error;
- MPASS(ngrp <= ngroups_max);
+ MPASS(ngrp <= ngroups_max + 1);
AUDIT_ARG_GROUPSET(groups, ngrp);
newcred = crget();
crextend(newcred, ngrp);