Skip to content
Snippets Groups Projects
Commit 1c1f5c02 authored by Janis Danisevskis's avatar Janis Danisevskis Committed by Alain Vongsouvanh
Browse files

UPSTREAM: procfs: fixes pthread cross-thread naming if !PR_DUMPABLE


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.

Change-Id: I41d57c1844db6e1476ad2ab47700e48b57d4a82e
Signed-off-by: default avatarJanis Danisevskis <jdanis@google.com>
parent ca99ed4f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment