[haiku-bugs] Re: [Haiku] #10841: gethostid() is missing

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Sun, 10 May 2020 08:52:15 -0000

#10841: gethostid() is missing
---------------------------------+----------------------------
  Reporter:  korli               |      Owner:  nobody
      Type:  bug                 |     Status:  closed
  Priority:  normal              |  Milestone:  Unscheduled
 Component:  System/POSIX        |    Version:  R1/Development
Resolution:  no change required  |   Keywords:
Blocked By:                      |   Blocking:
  Platform:  All                 |
---------------------------------+----------------------------
Changes (by pulkomandy):

 * status:  new => closed
 * resolution:   => no change required

Comment:

 After discussion in https://review.haiku-os.org/c/haiku/+/883 , we have
 decided that this function is useless and it is better to not implement it
 at all.

 For reference:
 - The implementation in glibc attempts to compute an hostid based on the
 local IP, but on Debian it computes it based on 127.0.0.1 instead so all
 machines have the same host id.
 - musl just returns 0
 - NetBSD, FreeBSD and OpenBSD implements it but mentions that is
 deprecated and that it had been removed in 4.4BSD

 Alternative mechanisms (sysctl, file in /etc, dbus or systemd functions,
 ...) are available to identify the machine with a larger id (typically an
 UUID or similar).

 I suggest we open a ticket against POSIX so that they remove it from the
 spec (apparently no one has bothered to do that yet).
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/10841#comment:2>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: