diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2014-10-26 14:25:42 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2014-10-26 14:25:42 +0000 |
commit | b90638866e17e63e760e6b18e15460b4ec587ca0 (patch) | |
tree | 8a065c085016285b7df094a6abbcbf9ba26fc04a /sys | |
parent | 9d66b6a5a904b291e22f01b68ea99d3959a2da00 (diff) | |
download | src-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.c | 2 |
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); |