]> git.baikalelectronics.ru Git - kernel.git/commit
tracefs: Have tracefs directories not set OTH permission bits by default
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 18 Aug 2021 15:24:50 +0000 (11:24 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 8 Oct 2021 22:08:43 +0000 (18:08 -0400)
commit286ec692e18deb55365b7974fa0a016db0473857
tree4d359f106527a54a2f02b43d277b542461fb4bee
parente8c37aab3fea727047949ef72079637f2285a54f
tracefs: Have tracefs directories not set OTH permission bits by default

The tracefs file system is by default mounted such that only root user can
access it. But there are legitimate reasons to create a group and allow
those added to the group to have access to tracing. By changing the
permissions of the tracefs mount point to allow access, it will allow
group access to the tracefs directory.

There should not be any real reason to allow all access to the tracefs
directory as it contains sensitive information. Have the default
permission of directories being created not have any OTH (other) bits set,
such that an admin that wants to give permission to a group has to first
disable all OTH bits in the file system.

Link: https://lkml.kernel.org/r/20210818153038.664127804@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
fs/tracefs/inode.c