aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-11 00:24:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-11 00:24:59 -0400
commit155134fef2b6c7426c3f25ffe84fb3043167c860 (patch)
tree15caf4a9c0e359002f8771a8cdb60ee2c19578fd /fs/proc
parent58d08e3b2c2033354b91467da33deffa06360c28 (diff)
Revert "proc: Point /proc/{mounts,net} at /proc/thread-self/{mounts,net} instead of /proc/self/{mounts,net}"
This reverts commits 344470cac42e and e81324407269. 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>
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/proc_net.c2
-rw-r--r--fs/proc/root.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index 39481028ec08..a63af3e0a612 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -226,7 +226,7 @@ static struct pernet_operations __net_initdata proc_net_ns_ops = {
226 226
227int __init proc_net_init(void) 227int __init proc_net_init(void)
228{ 228{
229 proc_symlink("net", NULL, "thread-self/net"); 229 proc_symlink("net", NULL, "self/net");
230 230
231 return register_pernet_subsys(&proc_net_ns_ops); 231 return register_pernet_subsys(&proc_net_ns_ops);
232} 232}
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 6296c7626963..094e44d4a6be 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -173,7 +173,7 @@ void __init proc_root_init(void)
173 173
174 proc_self_init(); 174 proc_self_init();
175 proc_thread_self_init(); 175 proc_thread_self_init();
176 proc_symlink("mounts", NULL, "thread-self/mounts"); 176 proc_symlink("mounts", NULL, "self/mounts");
177 177
178 proc_net_init(); 178 proc_net_init();
179 179