[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#65041: hostname: hostname does not allow numeric hostnames



> Package: hostname
> Version: 2.07
> Severity: normal
> 
> Hi
> 
> /etc/hostname:
> 192.168.42.42   a2290.westend.com                       a2290
> 192.168.42.42   2290.westend.com                        2290
> 
> /etc/resolv.conf:
> search westend.com
> nameserver 212.117.67.2
> 
> # hostname 2290
> # hostname -f
> 2290
> 
> # hostname a2290
> # hostname -f
> a2290.westend.com
> 
> In the first case hostname seems to be not compliant with rfc1123 which
> says:
> 	"The syntax of a legal Internet host name was specified in RFC-952
>       	[DNS:4].  One aspect of host name syntax is hereby changed: the
>         restriction on the first character is relaxed to allow either a
> 	letter or a digit.  Host software MUST support this more liberal
> 	syntax."

Please use "strace" and "ltrace".  You can see that the FQDN is
resolved by gethostbyname() when you use "hostname -f".

BTW, /etc/hostname is not /etc/hosts.  This file is not used by
/bin/hostname.  So I think this bug report is invalid.

Please confirm.  If you have no objection, I'll close it.

Regards,
-- gotom





Reply to: