mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 06:15:12 +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 @@ create_lostfound:
|
||||
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…
x
Reference in New Issue
Block a user