FreeBSD/sys/fs/nfsclient/nfs_clstate.c
/*
 * Try a delegreturn against the server. Just call nfsrpc_delegreturn(),
 * retrying while NFSERR_DELAY. Also, try system credentials, if the passed in
 * credentials fail.
 */
Try a delegreturn against the server.
Try a delegreturn against the server .
static int
nfscl_trydelegreturn(struct nfscldeleg *dp, struct ucred *cred,
    struct nfsmount *nmp, NFSPROC_T *p)
{
	int error;
	do {
		error = nfsrpc_delegreturn(dp, cred, nmp, p, 0);
		if (error == NFSERR_DELAY)
			(void) nfs_catnap(PZERO, error, "nfstrydp");
	} while (error == NFSERR_DELAY);
	if (error == EAUTH || error == EACCES) {
		newnfs_setroot(cred);
		do {
			error = nfsrpc_delegreturn(dp, cred, nmp, p, 1);
			if (error == NFSERR_DELAY)
				(void) nfs_catnap(PZERO, error, "nfstrydp");
		} while (error == NFSERR_DELAY);
	}
	return (error);
}
static int nfscl_trydelegreturn ( struct nfscldeleg * dp , struct ucred * cred , struct nfsmount * nmp , NFSPROC_T * p ) { int error ; do { error = nfsrpc_delegreturn ( dp , cred , nmp , p , 0 ) ; if ( error == NFSERR_DELAY ) ( void ) nfs_catnap ( PZERO , error , " " ) ; } while ( error == NFSERR_DELAY ) ; if ( error == EAUTH || error == EACCES ) { newnfs_setroot ( cred ) ; do { error = nfsrpc_delegreturn ( dp , cred , nmp , p , 1 ) ; if ( error == NFSERR_DELAY ) ( void ) nfs_catnap ( PZERO , error , " " ) ; } while ( error == NFSERR_DELAY ) ; } return ( error ) ; }
Try a delegreturn against the server.
Try a delegreturn against the server .
/* Try again using system credentials */