linux-os (Dick Johnson) wrote: > MAXHOSTNAMELEN, defined by POSIX, is 64 bytes. Where do you think this is written? The minimum maximum for the host name length in POSIX is 255. This is the whole motivation of the patch. Linux currently cannot conform because this is one of the things the kernel gets wrong. > You can't just > change it to 255. If you did, all servers in the universe, all > everything would have to be shutdown, recompiled, and rebooted > simultaneously. You can't have a name-server returning a 255-byte > string when a mail-server can only handle 64 bytes. The hostname is a machine-local value. How the machine is represented to the outside world is governed by services like DNS. DNS defines its own limits on the length of the name and each component. So, if a host name (without domain) exceeds 64 bytes you need a different external name for the machine. But this doesn't stop anybody from locally using a longer name. Can there be programs which have problems? Certainly. But gethostname() won't just overwrite memory. It'll return an error and the programs with the wrong assumptions can be fix. -- ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖
Attachment:
signature.asc
Description: OpenPGP digital signature
- Follow-Ups:
- Re: [PATCH] POSIX-hostname up to 255 characters
- From: "linux-os \(Dick Johnson\)" <[email protected]>
- Re: [PATCH] POSIX-hostname up to 255 characters
- References:
- [PATCH] POSIX-hostname up to 255 characters
- From: "Randy.Dunlap" <[email protected]>
- Re: [PATCH] POSIX-hostname up to 255 characters
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH] POSIX-hostname up to 255 characters
- From: Jan-Benedict Glaw <[email protected]>
- Re: [PATCH] POSIX-hostname up to 255 characters
- From: "Randy.Dunlap" <[email protected]>
- Re: [PATCH] POSIX-hostname up to 255 characters
- From: Jan-Benedict Glaw <[email protected]>
- Re: [PATCH] POSIX-hostname up to 255 characters
- From: "linux-os \(Dick Johnson\)" <[email protected]>
- [PATCH] POSIX-hostname up to 255 characters
- Prev by Date: Re: [ANNOUNCE] Linux-2.4.32-hf32.5
- Next by Date: [Patch 2/2] megaraid_sas: add support for ZCR controller
- Previous by thread: Re: [PATCH] POSIX-hostname up to 255 characters
- Next by thread: Re: [PATCH] POSIX-hostname up to 255 characters
- Index(es):