diff options
author | Chao Yu <yuchao0@huawei.com> | 2019-07-17 17:06:11 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2019-08-23 07:57:15 -0700 |
commit | 4507847c86bfc64e9bdce941a0f707560d3df98a (patch) | |
tree | 7e76cf839e82f3fdbf71f09943f0feb7e68bb7de /fs/f2fs/segment.h | |
parent | 899fee36fac07e49bb969e3f214e572eecb14f00 (diff) | |
download | linux-4507847c86bfc64e9bdce941a0f707560d3df98a.tar.bz2 |
f2fs: support FS_IOC_{GET,SET}FSLABEL
Support two generic fs ioctls FS_IOC_{GET,SET}FSLABEL, letting
f2fs pass generic/492 testcase.
Fixes were made by Eric where:
- f2fs: fix buffer overruns in FS_IOC_{GET, SET}FSLABEL
utf16s_to_utf8s() and utf8s_to_utf16s() take the number of characters,
not the number of bytes.
- f2fs: fix copying too many bytes in FS_IOC_SETFSLABEL
Userspace provides a null-terminated string, so don't assume that the
full FSLABEL_MAX bytes can always be copied.
- f2fs: add missing authorization check in FS_IOC_SETFSLABEL
FS_IOC_SETFSLABEL modifies the filesystem superblock, so it shouldn't be
allowed to regular users. Require CAP_SYS_ADMIN, like xfs and btrfs do.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.h')
0 files changed, 0 insertions, 0 deletions