diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-06-16 00:45:17 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-06-16 00:45:17 +0000 |
commit | ee0ed0bfc9562bd41cc0de28e8d09e9c38ca22b8 (patch) | |
tree | c20ed03102d22cc8c5173d50151b085782ee13cd /usr.sbin/dhcp/dhclient | |
parent | eff7b973e01ead6747847342096fe6732e08488a (diff) |
Add more paranoia and try to ensure created resolv.conf files have the
correct owner and mode.
Suggested by & ok millert@.
Diffstat (limited to 'usr.sbin/dhcp/dhclient')
-rw-r--r-- | usr.sbin/dhcp/dhclient/scripts/dhclient-script | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/dhcp/dhclient/scripts/dhclient-script b/usr.sbin/dhcp/dhclient/scripts/dhclient-script index 16eec17b181..8c546713f1f 100644 --- a/usr.sbin/dhcp/dhclient/scripts/dhclient-script +++ b/usr.sbin/dhcp/dhclient/scripts/dhclient-script @@ -1,6 +1,6 @@ #!/bin/sh # -# $OpenBSD: dhclient-script,v 1.14 2003/06/15 22:54:00 krw Exp $ +# $OpenBSD: dhclient-script,v 1.15 2003/06/16 00:45:16 krw Exp $ # # Copyright (c) 2003 Kenneth R Westerback <krw@openbsd.org> # @@ -119,6 +119,10 @@ add_new_resolv_conf() { cat /etc/resolv.conf.std > /etc/resolv.conf rm -f /etc/resolv.conf.std + # Try to ensure correct ownership and permissions. + chown -RL root:wheel /etc/resolv.conf + chmod -RL 644 /etc/resolv.conf + return 0 fi |