/* Match credentials against current process creds. The root_override argument takes care of cases where the caller may request root creds (e.g. for NFS swapping).  */
static int unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags)
/* Match credentials against current process creds. The root_override argument takes care of cases where the caller may request root creds (e.g. for NFS swapping).  */
static int unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags)
{
	struct unx_cred	*cred = container_of(rcred, struct unx_cred, uc_base);
	unsigned int groups = 0;
	unsigned int i;
	if (cred->uc_uid != acred->uid || cred->uc_gid != acred->gid)
		return 0;
	if (acred->group_info != NULL)
		groups = acred->group_info->ngroups;
	if (groups > NFS_NGROUPS)
		groups = NFS_NGROUPS;
	for (i = 0; i < groups ; i++)
		if (cred->uc_gids[i] != GROUP_AT(acred->group_info, i))
			return 0;
	return 1;
}