svn commit: r273691 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Sun Oct 26 14:25:43 UTC 2014


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);


More information about the svn-src-head mailing list