View | Details | Raw Unified | Return to bug 261291 | Differences between
and this patch

Collapse All | Expand All

(-)sys/fs/nfsserver/nfs_nfsdstate.c (-10 / +24 lines)
Lines 133-138 static volatile int nfsrv_writedelegcnt = 0; Link Here
133
static int nfsrv_faildscnt;
133
static int nfsrv_faildscnt;
134
134
135
/* local functions */
135
/* local functions */
136
static void nfsrv_revoke(struct nfsclient *clp, NFSPROC_T *p);
136
static void nfsrv_dumpaclient(struct nfsclient *clp,
137
static void nfsrv_dumpaclient(struct nfsclient *clp,
137
    struct nfsd_dumpclients *dumpp);
138
    struct nfsd_dumpclients *dumpp);
138
static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep,
139
static void nfsrv_freeopenowner(struct nfsstate *stp, int cansleep,
Lines 677-685 nfsrv_getclient(nfsquad_t clientid, int opflags, struc Link Here
677
	 */
678
	 */
678
	if (opflags & CLOPS_CONFIRM) {
679
	if (opflags & CLOPS_CONFIRM) {
679
		if ((nd->nd_flag & ND_NFSV41) != 0 &&
680
		if ((nd->nd_flag & ND_NFSV41) != 0 &&
680
		     clp->lc_confirm.lval[0] != confirm.lval[0])
681
		     clp->lc_confirm.lval[0] != confirm.lval[0]) {
681
			error = NFSERR_SEQMISORDERED;
682
			nfsrv_revoke(clp, p);
682
		else if ((nd->nd_flag & ND_NFSV41) == 0 &&
683
			error = NFSERR_ADMINREVOKED;
684
		} else if ((nd->nd_flag & ND_NFSV41) == 0 &&
683
		     clp->lc_confirm.qval != confirm.qval)
685
		     clp->lc_confirm.qval != confirm.qval)
684
			error = NFSERR_STALECLIENTID;
686
			error = NFSERR_STALECLIENTID;
685
		else if (nfsrv_notsamecredname(nd, clp))
687
		else if (nfsrv_notsamecredname(nd, clp))
Lines 908-913 nfsrv_adminrevoke(struct nfsd_clid *revokep, NFSPROC_T Link Here
908
		goto out;
910
		goto out;
909
	}
911
	}
910
912
913
	nfsrv_revoke(clp, p);
914
915
	NFSLOCKV4ROOTMUTEX();
916
	nfsv4_unlock(&nfsv4rootfs_lock, 0);
917
	NFSUNLOCKV4ROOTMUTEX();
918
919
out:
920
	NFSEXITCODE(error);
921
	return (error);
922
}
923
924
/*
925
 * Do the actual revokation of the client.  The exclusive lock on
926
 * nfsv4rootfs_lock must be held.
927
 */
928
static void
929
nfsrv_revoke(struct nfsclient *clp, NFSPROC_T *p)
930
{
931
911
	/*
932
	/*
912
	 * Now, write out the revocation record
933
	 * Now, write out the revocation record
913
	 */
934
	 */
Lines 922-934 nfsrv_adminrevoke(struct nfsd_clid *revokep, NFSPROC_T Link Here
922
	nfsrv_cleanclient(clp, p);
943
	nfsrv_cleanclient(clp, p);
923
	nfsrv_freedeleglist(&clp->lc_deleg);
944
	nfsrv_freedeleglist(&clp->lc_deleg);
924
	nfsrv_freedeleglist(&clp->lc_olddeleg);
945
	nfsrv_freedeleglist(&clp->lc_olddeleg);
925
	NFSLOCKV4ROOTMUTEX();
926
	nfsv4_unlock(&nfsv4rootfs_lock, 0);
927
	NFSUNLOCKV4ROOTMUTEX();
928
929
out:
930
	NFSEXITCODE(error);
931
	return (error);
932
}
946
}
933
947
934
/*
948
/*

Return to bug 261291