diff options
author | Kees Cook <keescook@chromium.org> | 2017-08-09 23:43:17 -0400 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2017-08-17 19:28:37 -0400 |
commit | d7caa33687cea218b6d68beea89d10a45a901e19 (patch) | |
tree | 734350f4d0037478c7064db3a5f637ececc6fca7 /fs/pstore | |
parent | 520eccdfe187591a51ea9ab4c1a024ae4d0f68d9 (diff) |
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: Kees Cook <keescook@chromium.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Diffstat (limited to 'fs/pstore')
-rw-r--r-- | fs/pstore/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c index fefd22611cf6..f1e88b695090 100644 --- a/fs/pstore/inode.c +++ b/fs/pstore/inode.c | |||
@@ -471,7 +471,7 @@ static int pstore_fill_super(struct super_block *sb, void *data, int silent) | |||
471 | 471 | ||
472 | inode = pstore_get_inode(sb); | 472 | inode = pstore_get_inode(sb); |
473 | if (inode) { | 473 | if (inode) { |
474 | inode->i_mode = S_IFDIR | 0755; | 474 | inode->i_mode = S_IFDIR | 0750; |
475 | inode->i_op = &pstore_dir_inode_operations; | 475 | inode->i_op = &pstore_dir_inode_operations; |
476 | inode->i_fop = &simple_dir_operations; | 476 | inode->i_fop = &simple_dir_operations; |
477 | inc_nlink(inode); | 477 | inc_nlink(inode); |