-/* $OpenBSD: kern_prot.c,v 1.61 2014/09/17 19:26:06 millert Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.62 2015/01/17 17:49:26 deraadt Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
} */ *uap = v;
struct process *pr = p->p_p;
struct ucred *pruc, *newcred;
- gid_t groups[NGROUPS];
+ gid_t groups[NGROUPS_MAX];
u_int ngrp;
int error;
if ((error = suser(p, 0)) != 0)
return (error);
ngrp = SCARG(uap, gidsetsize);
- if (ngrp > NGROUPS)
+ if (ngrp > NGROUPS_MAX)
return (EINVAL);
error = copyin(SCARG(uap, gidset), groups, ngrp * sizeof(gid_t));
if (error == 0) {
-/* $OpenBSD: nfs_socket.c,v 1.106 2014/11/14 23:01:44 tedu Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.107 2015/01/17 17:49:27 deraadt Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
}
nfsm_dissect(tl, u_int32_t *, (len + 2) * NFSX_UNSIGNED);
for (i = 0; i < len; i++)
- if (i < NGROUPS)
+ if (i < NGROUPS_MAX)
nd->nd_cr.cr_groups[i] = fxdr_unsigned(gid_t, *tl++);
else
tl++;
- nd->nd_cr.cr_ngroups = (len > NGROUPS) ? NGROUPS : len;
+ nd->nd_cr.cr_ngroups = (len > NGROUPS_MAX) ? NGROUPS_MAX : len;
len = fxdr_unsigned(int, *++tl);
if (len < 0 || len > RPCAUTH_MAXSIZ) {
m_freem(info.nmi_mrep);
-/* $OpenBSD: nfs_subs.c,v 1.123 2014/12/29 05:29:28 miod Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.124 2015/01/17 17:49:27 deraadt Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
if (cred->cr_uid == 0 || (exflags & MNT_EXPORTANON)) {
cred->cr_uid = credanon->cr_uid;
cred->cr_gid = credanon->cr_gid;
- for (i = 0; i < credanon->cr_ngroups && i < NGROUPS; i++)
+ for (i = 0; i < credanon->cr_ngroups && i < NGROUPS_MAX; i++)
cred->cr_groups[i] = credanon->cr_groups[i];
cred->cr_ngroups = i;
}
-/* $OpenBSD: nfs_vfsops.c,v 1.105 2014/12/18 20:59:21 tedu Exp $ */
+/* $OpenBSD: nfs_vfsops.c,v 1.106 2015/01/17 17:49:27 deraadt Exp $ */
/* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */
/*
proc0.p_ucred->cr_uid = ntohl(nfs_diskless.swap_ucred.cr_uid);
proc0.p_ucred->cr_gid = ntohl(nfs_diskless.swap_ucred.cr_gid);
if ((proc0.p_ucred->cr_ngroups = ntohs(nfs_diskless.swap_ucred.cr_ngroups)) >
- NGROUPS)
- proc0.p_ucred->cr_ngroups = NGROUPS;
+ NGROUPS_MAX)
+ proc0.p_ucred->cr_ngroups = NGROUPS_MAX;
for (i = 0; i < proc0.p_ucred->cr_ngroups; i++)
proc0.p_ucred->cr_groups[i] = ntohl(nfs_diskless.swap_ucred.cr_groups[i]);
#endif