Re: hosts.allow default behaviour: IPv6 on its own lines

From: Warner Losh <imp_at_bsdimp.com>
Date: Thu, 16 Feb 2006 15:25:55 -0700 (MST)
From: Dmitry Morozovsky <marck_at_rinet.ru>
Subject: hosts.allow default behaviour: IPv6 on its own lines
Date: Thu, 16 Feb 2006 14:03:37 +0300 (MSK)

> Dear colleagues,
> 
> at least rpcbind brokes on parsing hosts.allow file when built with NO_INET6:
> 
> Feb 16 13:55:41 ... rpcbind: error: /etc/hosts.allow, line 42: missing option name
> Feb 16 13:55:41 ... rpcbind: connect from 127.0.0.1 to getport/addr(mountd): request from unauthorized host
> 
> Maybe split default line to simplify commenting second one out?
> 
> Index: hosts.allow
> ===================================================================
> RCS file: /home/ncvs/src/etc/hosts.allow,v
> retrieving revision 1.19
> diff -u -r1.19 hosts.allow
> --- hosts.allow 3 Aug 2004 08:58:34 -0000       1.19
> +++ hosts.allow 16 Feb 2006 10:58:00 -0000
> _at__at_ -36,7 +36,9 _at__at_
>  
>  # Allow anything from localhost.  Note that an IP address (not a host
>  # name) *MUST* be specified for rpcbind(8).
> -ALL : localhost 127.0.0.1 [::1] : allow
> +ALL : localhost 127.0.0.1 : allow
> +# Comment out next line if you use kernel without IPv6.
> +ALL : [::1] : allow
>  ALL : my.machine.example.com 192.0.2.35 : allow
>  
>  # To use IPv6 addresses you must enclose them in []'s

The comment isn't quite right.  If the kernel doesn't have IPv6, then
it is fine.  It is only if userland is compiled with NO_IPV6 that
there's a problem.
Received on Thu Feb 16 2006 - 21:28:08 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:52 UTC