mirror of
https://github.com/torvalds/linux
synced 2024-10-03 09:48:02 +00:00
bcachefs: Set lost+found mode to 0700
For security and conformance with other filesystems, the lost+found directory should not be world or group accessible. Signed-off-by: Justin Husted <sigstop@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
0897705163
commit
b627c7d8f4
|
@ -797,7 +797,7 @@ static int check_lostfound(struct bch_fs *c,
|
|||
bch2_create_trans(&trans,
|
||||
BCACHEFS_ROOT_INO, root_inode,
|
||||
lostfound_inode, &lostfound,
|
||||
0, 0, S_IFDIR|0755, 0, NULL, NULL));
|
||||
0, 0, S_IFDIR|0700, 0, NULL, NULL));
|
||||
if (ret)
|
||||
bch_err(c, "error creating lost+found: %i", ret);
|
||||
|
||||
|
|
|
@ -1013,7 +1013,7 @@ int bch2_fs_initialize(struct bch_fs *c)
|
|||
bch2_create_trans(&trans, BCACHEFS_ROOT_INO,
|
||||
&root_inode, &lostfound_inode,
|
||||
&lostfound,
|
||||
0, 0, S_IFDIR|0755, 0,
|
||||
0, 0, S_IFDIR|0700, 0,
|
||||
NULL, NULL));
|
||||
if (ret)
|
||||
goto err;
|
||||
|
|
Loading…
Reference in a new issue