Allocate space for the group array in a static credential used in

the quota code.  One case was correctly handled in r194498, but
this one was missed.

PR:		kern/138657
Tested by:	PR submitter
MFC after:	3 days
This commit is contained in:
Brooks Davis 2009-09-17 12:35:13 +00:00
parent 2fdaa90df8
commit 5343b3a28c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=197269

View File

@ -1449,6 +1449,7 @@ ufs_mkdir(ap)
{
#ifdef QUOTA
struct ucred ucred, *ucp;
gid_t ucred_group;
ucp = cnp->cn_cred;
#endif
/*
@ -1476,6 +1477,7 @@ ufs_mkdir(ap)
refcount_init(&ucred.cr_ref, 1);
ucred.cr_uid = ip->i_uid;
ucred.cr_ngroups = 1;
ucred.cr_groups = &ucred_group;
ucred.cr_groups[0] = dp->i_gid;
ucp = &ucred;
}