Hello, yelninei--- via Bug reports for the GNU Hurd, le sam. 28 nov. 2026 21:28:33 +0100, a ecrit: > - 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?
That should be fine yes. > 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. _hurd_get_host_config probably got modified at some point without checking whether gethostid is still working. Samuel
