OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/9] namespaces: Introduction
Re: [PATCH 4/9] namespaces: utsname: switch to using uts namespaces [message #3279 is a reply to message #3263] Fri, 19 May 2006 17:37 Go to previous messageGo to previous message
rdunlap is currently offline  rdunlap
Messages: 11
Registered: May 2006
Junior Member
On Fri, 19 May 2006 03:05:23 -0600 Eric W. Biederman wrote:

> "Randy.Dunlap" <rdunlap@xenotime.net> writes:
>
> > On Thu, 18 May 2006 10:49:36 -0500 Serge E. Hallyn wrote:
> >
> >> Replace references to system_utsname to the per-process uts namespace
> >> where appropriate. This includes things like uname.
> >>
> >> Changes: Per Eric Biederman's comments, use the per-process uts namespace
> >> for ELF_PLATFORM, sunrpc, and parts of net/ipv4/ipconfig.c
> >>
> >> Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
>
> >
> > OK, here's my big comment/question. I want to see <nodename> increased to
> > 256 bytes (per current POSIX), so each field of struct <variant>_utsname
> > needs be copied individually (I think) instead of doing a single
> > struct copy.
>
> Where is it specified? Looking at the spec as SUSV3 I don't see a size
> specified for nodename.

It's actually for hostname. It looks to me like they are used
interchangeably. yes/no?

gethostname:
http://www.opengroup.org/onlinepubs/009695399/functions/geth ostname.html
sysconf:
http://www.opengroup.org/onlinepubs/009695399/functions/sysc onf.html
unistd.h:
http://www.opengroup.org/onlinepubs/009695399/basedefs/unist d.h.html
limits.h:
http://www.opengroup.org/onlinepubs/009695399/basedefs/limit s.h.html

>From the latter:
{HOST_NAME_MAX}
Maximum length of a host name (not including the terminating null) as returned from the gethostname() function.
Minimum Acceptable Value: {_POSIX_HOST_NAME_MAX}
(and)
{_POSIX_HOST_NAME_MAX}
Maximum length of a host name (not including the terminating null) as returned from the gethostname() function.
Value: 255



> > I've been working on this for the past few weeks (among other
> > things). Sorry about the timing.
> > I could send patches for this against mainline in a few days,
> > but I'll be glad to listen to how it would be easiest for all of us
> > to handle.
> >
> > I'm probably a little over half done with my patches.
> > They will end up adding a lib/utsname.c that has functions for:
> > put_oldold_uname() // to user
> > put_old_uname() // to user
> > put_new_uname() // to user
> > put_posix_uname() // to user
>
> Sounds reasonable, if we really need a 256 byte nodename.
>
> As long as they take a pointer to the appropriate utsname
> structure these patches should not fundamentally conflict.


---
~Randy
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [PATCH 0/9] namespaces: Introduction
Next Topic: [PATCH] namespaces: uts_ns: make information visible via /proc/PID/uts directory
Goto Forum:
  


Current Time: Sun Jul 20 09:59:22 GMT 2025

Total time taken to generate the page: 0.07722 seconds