summaryrefslogtreecommitdiff
path: root/fs/utimes.c
diff options
context:
space:
mode:
authorJanis Danisevskis <jdanis@google.com>2016-05-20 17:00:08 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-26 08:48:55 +0200
commitb8c71ce9e00d7aa60b847a5822fd18a716a52332 (patch)
tree89a88b0d838c36a318f1ffaf712f9a3b5bd27947 /fs/utimes.c
parenta58c00657ec02755fe322eebd11dbf6a24da1d91 (diff)
procfs: fix pthread cross-thread naming if !PR_DUMPABLE
commit 1b3044e39a89cb1d4d5313da477e8dfea2b5232d upstream. The PR_DUMPABLE flag causes the pid related paths of the proc file system to be owned by ROOT. The implementation of pthread_set/getname_np however needs access to /proc/<pid>/task/<tid>/comm. If PR_DUMPABLE is false this implementation is locked out. This patch installs a special permission function for the file "comm" that grants read and write access to all threads of the same group regardless of the ownership of the inode. For all other threads the function falls back to the generic inode permission check. [akpm@linux-foundation.org: fix spello in comment] Signed-off-by: Janis Danisevskis <jdanis@google.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Colin Ian King <colin.king@canonical.com> Cc: David Rientjes <rientjes@google.com> Cc: Minfei Huang <mnfhuang@gmail.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Calvin Owens <calvinowens@fb.com> Cc: Jann Horn <jann@thejh.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/utimes.c')
0 files changed, 0 insertions, 0 deletions