Android Wear 8.0.0 Release 0.3
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: I52549463e2736cd233e77c5e6041d42c20691c73
Signed-off-by: Janis Danisevskis <jdanis@google.com>
1 file changed