]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "proc: Point /proc/{mounts,net} at /proc/thread-self/{mounts,net} instead...
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 11 Aug 2014 04:24:59 +0000 (21:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 11 Aug 2014 04:24:59 +0000 (21:24 -0700)
commita5bab1d9e09713717a5f3a1f46326158725a1e68
tree15caf4a9c0e359002f8771a8cdb60ee2c19578fd
parente28573576d090e3bfd01930f677652eb8a7f7d12
Revert "proc: Point /proc/{mounts,net} at /proc/thread-self/{mounts,net} instead of /proc/self/{mounts,net}"

This reverts commits aa40c790a880 and e7c538fb9853.

It turns out that the exact path in the symlink matters, if for somewhat
unfortunate reasons: some apparmor configurations don't allow dhclient
access to the per-thread /proc files.  As reported by Jörg Otte:

  audit: type=1400 audit(1407684227.003:28): apparmor="DENIED"
    operation="open" profile="/sbin/dhclient"
    name="/proc/1540/task/1540/net/dev" pid=1540 comm="dhclient"
    requested_mask="r" denied_mask="r" fsuid=0 ouid=0

so we had better revert this for now.  We might be able to work around
this in practice by only using the per-thread symlinks if the thread
isn't the thread group leader, and if the namespaces differ between
threads (which basically never happens).

We'll see. In the meantime, the revert was made to be intentionally easy.

Reported-by: Jörg Otte <jrg.otte@gmail.com>
Acked-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/proc_net.c
fs/proc/root.c