FreeBSD/sys/fs/nfsclient/nfs_clport.c
/*
 * Copy NFS uid, gids from the cred structure.
 */
Copy NFS uid, gids from the cred structure.
Copy NFS uid gids from the cred structure .
void
newnfs_copyincred(struct ucred *cr, struct nfscred *nfscr)
{
	int i;
	KASSERT(cr->cr_ngroups >= 0,
	    ("newnfs_copyincred: negative cr_ngroups"));
	nfscr->nfsc_uid = cr->cr_uid;
	nfscr->nfsc_ngroups = MIN(cr->cr_ngroups, NFS_MAXGRPS + 1);
	for (i = 0; i < nfscr->nfsc_ngroups; i++)
		nfscr->nfsc_groups[i] = cr->cr_groups[i];
}
void newnfs_copyincred ( struct ucred * cr , struct nfscred * nfscr ) { int i ; KASSERT ( cr -> cr_ngroups >= 0 , ( " " ) ) ; nfscr -> nfsc_uid = cr -> cr_uid ; nfscr -> nfsc_ngroups = MIN ( cr -> cr_ngroups , NFS_MAXGRPS + 1 ) ; for ( i = 0 ; i < nfscr -> nfsc_ngroups ; i ++ ) nfscr -> nfsc_groups [ i ] = cr -> cr_groups [ i ] ; }
Copy NFS uid, gids from the cred structure.
Copy NFS uid gids from the cred structure .