提交 16780cab 编写于 作者: C Chris Mason

Btrfs: add extra sanity checks on the path names in btrfs_mksubvol

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 a6b0d5c8
......@@ -1333,6 +1333,12 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
goto out;
}
if (name[0] == '.' &&
(namelen == 1 || (name[1] == '.' && namelen == 2))) {
ret = -EEXIST;
goto out;
}
if (subvol) {
ret = btrfs_mksubvol(&file->f_path, name, namelen,
NULL, transid, readonly);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册