Re: Bug#105364: installer allows user to insert underscores in the hostname
Matt Kraai <firstname.lastname@example.org> writes:
> In order to implement this, I really need to know the answers to
> the following questions:
> * What encoding is used for the host name input by the user?
> * What host name validation should be performed by dbootstrap?
> * What encoding should be used for writing the host name?
> The kernel treats the host name as any other character string, and
> so doesn't appear to care about the encoding. I haven't been able
> to find the libc source which deals with internationalized host
> names, so I don't know what format it expects things in.
IMHO, we should only enforce what has been standardised.
* Only allow components matching the simple grammar in RFC 1034.
* Each name component is max 63 octets.
* Total hostname length is max 255 octets.
* No component can start with <letter><letter><hyphen><hyphen>
(not really in the standards, but pertinent anyway)
When the process moves out of the draft process, implement whatever
the RFC says.