diff options
-rw-r--r-- | fs/nfsd/export.c | 1 | ||||
-rw-r--r-- | fs/nfsd/nfs3proc.c | 8 | ||||
-rw-r--r-- | include/uapi/linux/nfsd/export.h | 5 |
3 files changed, 12 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 72ffd7cce3c3..30a739d896ff 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -1145,6 +1145,7 @@ static struct flags { | |||
1145 | { NFSEXP_ALLSQUASH, {"all_squash", ""}}, | 1145 | { NFSEXP_ALLSQUASH, {"all_squash", ""}}, |
1146 | { NFSEXP_ASYNC, {"async", "sync"}}, | 1146 | { NFSEXP_ASYNC, {"async", "sync"}}, |
1147 | { NFSEXP_GATHERED_WRITES, {"wdelay", "no_wdelay"}}, | 1147 | { NFSEXP_GATHERED_WRITES, {"wdelay", "no_wdelay"}}, |
1148 | { NFSEXP_NOREADDIRPLUS, {"nordirplus", ""}}, | ||
1148 | { NFSEXP_NOHIDE, {"nohide", ""}}, | 1149 | { NFSEXP_NOHIDE, {"nohide", ""}}, |
1149 | { NFSEXP_CROSSMOUNT, {"crossmnt", ""}}, | 1150 | { NFSEXP_CROSSMOUNT, {"crossmnt", ""}}, |
1150 | { NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}}, | 1151 | { NFSEXP_NOSUBTREECHECK, {"no_subtree_check", ""}}, |
diff --git a/fs/nfsd/nfs3proc.c b/fs/nfsd/nfs3proc.c index fc51f7f6b36d..12f2aab4f614 100644 --- a/fs/nfsd/nfs3proc.c +++ b/fs/nfsd/nfs3proc.c | |||
@@ -466,6 +466,14 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp, | |||
466 | resp->buflen = resp->count; | 466 | resp->buflen = resp->count; |
467 | resp->rqstp = rqstp; | 467 | resp->rqstp = rqstp; |
468 | offset = argp->cookie; | 468 | offset = argp->cookie; |
469 | |||
470 | nfserr = fh_verify(rqstp, &resp->fh, S_IFDIR, NFSD_MAY_NOP); | ||
471 | if (nfserr) | ||
472 | RETURN_STATUS(nfserr); | ||
473 | |||
474 | if (resp->fh.fh_export->ex_flags & NFSEXP_NOREADDIRPLUS) | ||
475 | RETURN_STATUS(nfserr_notsupp); | ||
476 | |||
469 | nfserr = nfsd_readdir(rqstp, &resp->fh, | 477 | nfserr = nfsd_readdir(rqstp, &resp->fh, |
470 | &offset, | 478 | &offset, |
471 | &resp->common, | 479 | &resp->common, |
diff --git a/include/uapi/linux/nfsd/export.h b/include/uapi/linux/nfsd/export.h index cf47c313794e..584b6ef3a5e8 100644 --- a/include/uapi/linux/nfsd/export.h +++ b/include/uapi/linux/nfsd/export.h | |||
@@ -28,7 +28,8 @@ | |||
28 | #define NFSEXP_ALLSQUASH 0x0008 | 28 | #define NFSEXP_ALLSQUASH 0x0008 |
29 | #define NFSEXP_ASYNC 0x0010 | 29 | #define NFSEXP_ASYNC 0x0010 |
30 | #define NFSEXP_GATHERED_WRITES 0x0020 | 30 | #define NFSEXP_GATHERED_WRITES 0x0020 |
31 | /* 40 80 100 currently unused */ | 31 | #define NFSEXP_NOREADDIRPLUS 0x0040 |
32 | /* 80 100 currently unused */ | ||
32 | #define NFSEXP_NOHIDE 0x0200 | 33 | #define NFSEXP_NOHIDE 0x0200 |
33 | #define NFSEXP_NOSUBTREECHECK 0x0400 | 34 | #define NFSEXP_NOSUBTREECHECK 0x0400 |
34 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ | 35 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ |
@@ -47,7 +48,7 @@ | |||
47 | */ | 48 | */ |
48 | #define NFSEXP_V4ROOT 0x10000 | 49 | #define NFSEXP_V4ROOT 0x10000 |
49 | /* All flags that we claim to support. (Note we don't support NOACL.) */ | 50 | /* All flags that we claim to support. (Note we don't support NOACL.) */ |
50 | #define NFSEXP_ALLFLAGS 0x17E3F | 51 | #define NFSEXP_ALLFLAGS 0x1FE7F |
51 | 52 | ||
52 | /* The flags that may vary depending on security flavor: */ | 53 | /* The flags that may vary depending on security flavor: */ |
53 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ | 54 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ |