aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2013-05-17 16:25:32 -0400
committerJ. Bruce Fields <bfields@redhat.com>2013-07-01 17:23:07 -0400
commit57569a707082a337e4a61a657521d79cac3528bf (patch)
treeb885b287f3b2754cfb8d213ecab74a27ca5305fc /fs/nfsd/nfs4xdr.c
parentb78724b70599f66a91c6d6c897a81f4f87f549f4 (diff)
nfsd4: allow client to send no cb_sec flavors
In testing I notice that some of the pynfs tests forget to send any cb_sec flavors, and that we haven't necessarily errored out in that case before. I'll fix pynfs, but am also inclined to default to trying AUTH_NONE in that case in case this is something clients actually do. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 3126210383bd..171fe5e4af67 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -460,7 +460,11 @@ static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_
460 /* callback_sec_params4 */ 460 /* callback_sec_params4 */
461 READ_BUF(4); 461 READ_BUF(4);
462 READ32(nr_secflavs); 462 READ32(nr_secflavs);
463 cbs->flavor = (u32)(-1); 463 if (nr_secflavs)
464 cbs->flavor = (u32)(-1);
465 else
466 /* Is this legal? Be generous, take it to mean AUTH_NONE: */
467 cbs->flavor = 0;
464 for (i = 0; i < nr_secflavs; ++i) { 468 for (i = 0; i < nr_secflavs; ++i) {
465 READ_BUF(4); 469 READ_BUF(4);
466 READ32(dummy); 470 READ32(dummy);