[pve-devel] [PATCH] INotify.pm: Correct read_etc_resolv_conf search filter

Dietmar Maurer dietmar at proxmox.com
Fri Mar 8 09:24:07 CET 2013


We need to be very careful changing such things. For example we use the return value
in PVE::Cluster:: gen_pve_ssl_cert()

It is also use in PVE::API::OpenVZ

We need to fix that too if we allow more than one domain. 

> diff --git a/data/PVE/INotify.pm b/data/PVE/INotify.pm index
> 850668a..0d871d9 100644
> --- a/data/PVE/INotify.pm
> +++ b/data/PVE/INotify.pm
> @@ -536,7 +536,7 @@ sub read_etc_resolv_conf {
>      my $nscount = 0;
>      while (my $line = <$fh>) {
>  	chomp $line;
> -	if ($line =~ m/^(search|domain)\s+(\S+)\s*/) {
> +	if ($line =~ m/^(search|domain)\s+(.+)/) {
>  	    $res->{search} = $2;
>  	} elsif ($line =~
> m/^nameserver\s+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\s*/) {
>  	    $nscount++;
> --



More information about the pve-devel mailing list