FreeBSD/sys/fs/nfsserver/nfs_nfsdport.c
/*
 * Check the nfsv4 root exports.
 */
Check the nfsv4 root exports.
Check the nfsv4 root exports .
int
nfsvno_v4rootexport(struct nfsrv_descript *nd)
{
	struct ucred *credanon;
	int exflags, error = 0, numsecflavor, *secflavors, i;
	error = vfs_stdcheckexp(&nfsv4root_mnt, nd->nd_nam, &exflags,
	    &credanon, &numsecflavor, &secflavors);
	if (error) {
		error = NFSERR_PROGUNAVAIL;
		goto out;
	}
	if (credanon != NULL)
		crfree(credanon);
	for (i = 0; i < numsecflavor; i++) {
		if (secflavors[i] == AUTH_SYS)
			nd->nd_flag |= ND_EXAUTHSYS;
		else if (secflavors[i] == RPCSEC_GSS_KRB5)
			nd->nd_flag |= ND_EXGSS;
		else if (secflavors[i] == RPCSEC_GSS_KRB5I)
			nd->nd_flag |= ND_EXGSSINTEGRITY;
		else if (secflavors[i] == RPCSEC_GSS_KRB5P)
			nd->nd_flag |= ND_EXGSSPRIVACY;
	}
out:
	NFSEXITCODE(error);
	return (error);
}
int nfsvno_v4rootexport ( struct nfsrv_descript * nd ) { struct ucred * credanon ; int exflags , error = 0 , numsecflavor , * secflavors , i ; error = vfs_stdcheckexp ( & nfsv4root_mnt , nd -> nd_nam , & exflags , & credanon , & numsecflavor , & secflavors ) ; if ( error ) { error = NFSERR_PROGUNAVAIL ; goto out ; } if ( credanon != NULL ) crfree ( credanon ) ; for ( i = 0 ; i < numsecflavor ; i ++ ) { if ( secflavors [ i ] == AUTH_SYS ) nd -> nd_flag |= ND_EXAUTHSYS ; else if ( secflavors [ i ] == RPCSEC_GSS_KRB5 ) nd -> nd_flag |= ND_EXGSS ; else if ( secflavors [ i ] == RPCSEC_GSS_KRB5I ) nd -> nd_flag |= ND_EXGSSINTEGRITY ; else if ( secflavors [ i ] == RPCSEC_GSS_KRB5P ) nd -> nd_flag |= ND_EXGSSPRIVACY ; } out : NFSEXITCODE ( error ) ; return ( error ) ; }
Check the nfsv4 root exports.
Check the nfsv4 root exports .