Author: mjg
Date: Sun Oct 26 14:25:42 2014
New Revision: 273691
URL: https://svnweb.freebsd.org/changeset/base/273691

Log:
  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>

Modified:
  head/sys/kern/kern_prot.c

Modified: head/sys/kern/kern_prot.c
==============================================================================
--- head/sys/kern/kern_prot.c   Sun Oct 26 13:30:53 2014        (r273690)
+++ head/sys/kern/kern_prot.c   Sun Oct 26 14:25:42 2014        (r273691)
@@ -835,7 +835,7 @@ kern_setgroups(struct thread *td, u_int 
        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);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to