Subject: Re: insecurity output showing unimportant changes
To: None <netbsd-help@netbsd.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: netbsd-help
Date: 03/19/2006 17:27:45
Thierry Lacoste --> netbsd-help (2006-03-19 13:25:10 +0100):
> I have this kind of insecurity output:
> ======
> /etc/resolv.conf diffs (OLD < > NEW)
> ======
> --- /var/backups//etc/resolv.conf.current       2006-03-18 02:17:53.000000000 
> +0000
> +++ /etc/resolv.conf    2006-03-19 00:26:59.000000000 +0000
> @@ -1,4 +1,4 @@
> -# Created by dhclient at: Fri Mar 17 23:17:47 CET 2006
> +# Created by dhclient at: Sun Mar 19 01:26:59 CET 2006
>  search miage.univ-paris12.fr
>  nameserver 194.214.13.2
>  nameserver 194.214.13.3
> 
> Following http://readlist.com/lists/netbsd.org/current-users/0/743.html
> 
> # tail -1 /etc/security.conf
> diff_options=-u -I '^# Created by dhclient.*'
> # sh /etc/security
> -I: not found
> 
> Putting the diff options between quotes
> 
> # tail -1 /etc/security.conf
> diff_options="-u -I '^# Created by dhclient.*'"
> # sh /etc/security
> diff: extra operand `dhclient.*''
> 
> AFAICS there is a problem with the spaces in the regular expression.
> 
> # diff -u -I '^# Created by dhclient.*' \
> > /etc/resolv.conf /var/backups/etc/resolv.conf.current
> # diff $diff_options \
> > /etc/resolv.conf /var/backups/etc/resolv.conf.current
> diff: extra operand `dhclient.*''
> diff: Try `diff --help' for more information.
> 
> The words "Created" and "by" are respectively taken for the first
> and second argument to diff.
> 
> What did I miss?
> What are the options to prevent unimportant changes to show up
> in insecurity output ?

I don't know what is considered to be the "correct solution", but
calling `eval diff $diff_options ...' instead of `diff $diff_options'
from /etc/security should work around this problem.


HTH, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~