From ee0ed0bfc9562bd41cc0de28e8d09e9c38ca22b8 Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Mon, 16 Jun 2003 00:45:17 +0000 Subject: Add more paranoia and try to ensure created resolv.conf files have the correct owner and mode. Suggested by & ok millert@. --- usr.sbin/dhcp/dhclient/scripts/dhclient-script | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.sbin/dhcp/dhclient') 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 # @@ -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 -- cgit v1.2.3