diff options
-rw-r--r-- | fs/nfsd/nfs4state.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index efa3d4c09dab..ed58ced6fa8b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -2385,6 +2385,15 @@ nfsd4_exchange_id(struct svc_rqst *rqstp, | |||
2385 | status = nfserr_inval; | 2385 | status = nfserr_inval; |
2386 | goto out_nolock; | 2386 | goto out_nolock; |
2387 | } | 2387 | } |
2388 | /* | ||
2389 | * Sometimes userspace doesn't give us a principal. | ||
2390 | * Which is a bug, really. Anyway, we can't enforce | ||
2391 | * MACH_CRED in that case, better to give up now: | ||
2392 | */ | ||
2393 | if (!new->cl_cred.cr_principal) { | ||
2394 | status = nfserr_serverfault; | ||
2395 | goto out_nolock; | ||
2396 | } | ||
2388 | new->cl_mach_cred = true; | 2397 | new->cl_mach_cred = true; |
2389 | case SP4_NONE: | 2398 | case SP4_NONE: |
2390 | break; | 2399 | break; |