[Devel] Re: [PATCH] namespaces: uts_ns: make information visible via /proc/PID/uts directory
Eric W. Biederman
ebiederm at xmission.com
Mon May 22 09:39:08 PDT 2006
Sam Vilain <sam at vilain.net> writes:
> From: Sam Vilain <sam.vilain at catalyst.net.nz>
>
> Export the UTS information to a per-process directory /proc/PID/uts,
> that has individual nodes for hostname, ostype, etc - similar to
> those in /proc/sys/kernel
>
> This duplicates the approach used for /proc/PID/attr, which involves a
> lot of duplication of similar functions. Much room for maintenance
> optimisation of both implementations remains.
> ---
> Sorry for the duplication of this to the list, stuffed up the stgit
> command.
>
> After doing this I noticed that the whole way this is done via sysctls
> in /proc/sys is much, much nicer. I was going there to make
> /proc/sys/kernel/osname -> /proc/self/uts/sysname (etc), but it seems
> that symlinks from /proc/sys are not a done thing.
>
> Is there an argument here perhaps for some integration between the way
> this is done for /proc/sys and /proc/PID/xxx ?
>
> fs/proc/base.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 236 insertions(+), 0 deletions(-)
Good intentions :)
But since this doesn't actually fix /proc/sys/kernel/osname and friends.
I would call this implementation a failure.
Let's first fix /proc/sys/kernel/osname to be sensitive to the caller,
and then see if we can make /proc/sys a symlink to /proc/<pid>/sys
Eric
More information about the Devel
mailing list