* ip netns exec namespace ls -l /proc/pid/fd prepends "/root" to the filename.
@ 2022-08-25 18:38 David Laight
0 siblings, 0 replies; only message in thread
From: David Laight @ 2022-08-25 18:38 UTC (permalink / raw)
To: netdev, linux-fsdevel, linux-kernel
If a process inside a network namespace calls readlink() on
/proc/pid/fd/n (for any pid) then the returned string is
prefixed by "/root".
So you get "/root/sys/console" or "/root/var/log/fred" etc.
There seems to be an extra call to prepend_name() called
from prepend_path() from d_path().
This seems decidedly wrong, especially since /root usually
exists.
Even it is were reporting a file outside a chroot (opened
before the chroot) prepending "/root" would be wrong.
Kernel is 5.10.132 (LTS before the retbleed breakages!)
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-25 18:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25 18:38 ip netns exec namespace ls -l /proc/pid/fd prepends "/root" to the filename David Laight
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).