提交 ff89be87 编写于 作者: J J. Bruce Fields

nfsd4: require version 4 when enabling or disabling minorversion

The current code will allow silly things like:

	echo "+2 +3 +4 +7.1">/proc/fs/nfsd/versions
Reported-by: NFan Chaoting <fanchaoting@cn.fujitsu.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 bca0ec65
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册