OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bca0ec6
)
nfsd4: require version 4 when enabling or disabling minorversion
author
J. Bruce Fields
<bfields@redhat.com>
Wed, 23 Jan 2013 23:25:01 +0000
(18:25 -0500)
committer
J. Bruce Fields
<bfields@redhat.com>
Wed, 23 Jan 2013 23:25:01 +0000
(18:25 -0500)
The current code will allow silly things like:
echo "+2 +3 +4 +7.1">/proc/fs/nfsd/versions
Reported-by: Fan Chaoting <fanchaoting@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfsctl.c
patch
|
blob
|
history
diff --git
a/fs/nfsd/nfsctl.c
b/fs/nfsd/nfsctl.c
index
7493428
..
65889ec
100644
(file)
--- a/
fs/nfsd/nfsctl.c
+++ b/
fs/nfsd/nfsctl.c
@@
-534,7
+534,7
@@
static ssize_t __write_versions(struct file *file, char *buf, size_t size)
else
num = simple_strtol(vers, &minorp, 0);
if (*minorp == '.') {
- if (num
<
4)
+ if (num
!=
4)
return -EINVAL;
minor = simple_strtoul(minorp+1, NULL, 0);
if (minor == 0)