Commit d7caa336 authored by Kees Cook's avatar Kees Cook

pstore: Make default pstorefs root dir perms 0750

Currently only DMESG and CONSOLE record types are protected, and it isn't
obvious that they are using a capability check. Instead switch to explicit
root directory mode of 0750 to keep files private by default. This will
allow the removal of the capability check, which was non-obvious and
forces a process to have possibly too much privilege when simple post-boot
chgrp for readers would be possible without it.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
parent 520eccdf
...@@ -471,7 +471,7 @@ static int pstore_fill_super(struct super_block *sb, void *data, int silent) ...@@ -471,7 +471,7 @@ static int pstore_fill_super(struct super_block *sb, void *data, int silent)
inode = pstore_get_inode(sb); inode = pstore_get_inode(sb);
if (inode) { if (inode) {
inode->i_mode = S_IFDIR | 0755; inode->i_mode = S_IFDIR | 0750;
inode->i_op = &pstore_dir_inode_operations; inode->i_op = &pstore_dir_inode_operations;
inode->i_fop = &simple_dir_operations; inode->i_fop = &simple_dir_operations;
inc_nlink(inode); inc_nlink(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment