PSARC/2007/677 Allow ypinit -c to use IP addresses

Peter Memishian peter.memishian at sun.com
Wed Dec 5 09:25:37 PST 2007


I'm sponsoring this change for Paul Wernau; the timer is set for next
Wednesday, December 12th.

  Today, ypinit -c and the /var/yp/binding/`domainname`/ypservers file
  that is created by the command require the use of hostnames that are
  listed in the local /etc/inet/hosts file.  IP addresses are rejected by
  ypinit(1M) and are parsed as invalid by ypbind(1M).

  Using IP addresses directly is useful in a highly automated environment,
  such as punchin, inetmenu, etc, where the entries are transient and
  subject to change and modifying the hosts file directly is error-prone
  and as a shared file is subject to user modifications.

  This case proposes to:

  - Modify ypbind to attempt to parse entries in the ypservers file
    as v4/v6 addresses if local hostname resolution fails and directly
    bind to the listed IP address.

  - Relax the restrictions on ypinit -c to allow the entry of IP
    addresses.  The -s and -m options will retain the restriction,
    since propagating the change to servers opens up the possibility of
    sending unparsable data to clients and servers that might either be
    ignored or, on non-Solaris systems, expose bugs[1].  In a distributed
    server environment, it is expected that the name resolution
    maintenance is part of the infrastructure.

  [1] Testing by Paul on Solaris reveals this works fine -- and the
      relevant bits of code go back to SunOS4.

-- 
meem



More information about the opensolaris-arc mailing list