Hi, I was playing around with get/sethostid and noticed the following:
- After a successfull sethostid () /etc/hostid has the id in hex. - gethostid fails to read it back. _hurd_get_host_config fails with ENAMETOOLONG causing gethostid to return -1. The reason is that _hurd_get_host_config always tries to null-terminate the given buffer however gethostid passes a buffer that is just large enough to contain the contents as the id has a fixed size and a trailing null is not really neccessary. Should that just use a bigger buffer? I dont know if this ever worked or if the hostid was a casualty of making sure the return is null-terminated which seems reasonable for the hostname as the hostid is not really used much. Thanks, Y.
