[PATCH 12/21] SQUASHME: nfsd41: return nfserr_serverfault for spa_how == SP4_MACH_CRED

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As per Bruce's review comment, we cannot return nfserr_encr_alg_unsupp
for SP4_MACH_CRED.

squash into "nfsd41: exchange_id operation"

Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx>
---
 fs/nfsd/nfs4state.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 9cf7d01..c3d555d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1227,8 +1227,16 @@ nfsd4_exchange_id(struct svc_rqst *rqstp,
 		return nfserr_inval;
 
 	/* Currently only support SP4_NONE */
-	if (exid->spa_how != SP4_NONE)
+	switch (exid->spa_how) {
+	case SP4_NONE:
+		break;
+	case SP4_SSV:
 		return nfserr_encr_alg_unsupp;
+	default:
+		BUG();				/* checked by xdr code */
+	case SP4_MACH_CRED:
+		return nfserr_serverfault;	/* no excuse :-/ */
+	}
 
 	status = nfs4_make_rec_clidname(dname, &exid->clname);
 
-- 
1.6.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux