diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-02 19:18:05 +0200 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-10-02 19:18:05 +0200 |
commit | 2e57bf9a4220a1c99cdb87136fad1b83d14cc454 (patch) | |
tree | 936ceb033be8fdcbb82f97a34bec3bad661db2d8 /scripts/dns-forwarding/vyatta-dns-forwarding.pl | |
parent | 73f0546e5f5c8d9bd367771ae0012797114ca340 (diff) | |
parent | 21031c67393d26a814298a8755d4bea43b0834de (diff) | |
download | vyatta-cfg-system-2e57bf9a4220a1c99cdb87136fad1b83d14cc454.tar.gz vyatta-cfg-system-2e57bf9a4220a1c99cdb87136fad1b83d14cc454.zip |
Fix overlapping edits of standalone_pw_reset
Put in new code to set password, rather than reset it to default
Although resetting passwd to default sounds good from a usuablity point
of view, it is a potential security hole when system is rebooted. Instead,
allow user to choose new passwd.
Diffstat (limited to 'scripts/dns-forwarding/vyatta-dns-forwarding.pl')
-rw-r--r-- | scripts/dns-forwarding/vyatta-dns-forwarding.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/dns-forwarding/vyatta-dns-forwarding.pl b/scripts/dns-forwarding/vyatta-dns-forwarding.pl index 4a011b6a..38f5ee67 100644 --- a/scripts/dns-forwarding/vyatta-dns-forwarding.pl +++ b/scripts/dns-forwarding/vyatta-dns-forwarding.pl @@ -119,7 +119,7 @@ sub dnsforwarding_get_values { if (@use_dhcp_nameservers != 0) { $use_dnsmasq_conf = 1; foreach my $interface (@use_dhcp_nameservers) { - my $dhcp_nameserver_count=`grep nameserver /etc/resolv.conf.dhclient-new-$interface | wc -l`; + my $dhcp_nameserver_count=`grep nameserver /etc/resolv.conf.dhclient-new-$interface 2>/dev/null | wc -l`; if ($dhcp_nameserver_count > 0) { my @dhcp_nameservers = `grep nameserver /etc/resolv.conf.dhclient-new-$interface`; for my $each_nameserver (@dhcp_nameservers) { @@ -149,7 +149,7 @@ sub dnsforwarding_write_file { sub check_nameserver { - my $cmd = `grep nameserver /etc/resolv.conf|wc -l`; + my $cmd = `grep nameserver /etc/resolv.conf 2>/dev/null | wc -l`; return $cmd; } |