Bug 89988 - [patch] bootparamd(8) null host support and whoami fix
Summary: [patch] bootparamd(8) null host support and whoami fix
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2005-12-05 19:20 UTC by John
Modified: 2017-12-31 22:36 UTC (History)
0 users

See Also:

file.diff (3.65 KB, patch)
2005-12-05 19:20 UTC, John
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John 2005-12-05 19:20:02 UTC
There are two issues with bootparamd that I ran into trying to
get Solaris Jumpstart working nicely.  One was permitting null 
hostnames.  Certain options are passed to the jumpstart client
using /etc/bootparams file entries like "term=:vt100".  The current 
implementation only makes an exception for the file "dump=..." and 
will not return anything else if it can not be resolved.  I have 
added in a check to return an address of if the length of 
the hostname is zero.

The second issue is a little more significant.  If a router
address is not supplied using the -r option, bootparamd uses the
function get_myaddress(3) to determine the address of the host.
The bootparamd(8) man page states:

     -r router   The default router (a machine or an IP-address).  This
                 defaults to the machine running the server.

The function get_myaddress always returns INADDR_LOOPBACK.  This
qualify as a bug.  Using -r solves this problem, unless you are
running on multiple networks.  The patch attempts to make rpc.bootparamd
more intelligent.  If -r is not supplied, the ip address of the
client is checked against all configured network interfaces on the
host in the function myaddr.  If the client is on a local subnet,
the ip address of the server on that network is returned (if not,
INADDR_LOOPBACK).  This allows for whoami on multiple networks.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:41 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped