summaryrefslogtreecommitdiff
path: root/etc/netstart
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-09 22:46:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-09 22:46:43 +0000
commit8585245d5a6e10c2e09d2a4a531f89455bf9193d (patch)
tree88c723f7c88eb1a6c7e5acc16d374b6a81ac6cc8 /etc/netstart
parent612e833c0d7d44fbfd7a5cb6f823d24a54cf52ae (diff)
Ensure that hostname.* files are also re-chowned to root.wheel at each
boot as discussed with claudio while eating tasty donairs. ok todd
Diffstat (limited to 'etc/netstart')
-rw-r--r--etc/netstart5
1 files changed, 3 insertions, 2 deletions
diff --git a/etc/netstart b/etc/netstart
index 4f98acc3d44..ea1bcd92705 100644
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: netstart,v 1.119 2008/04/17 19:03:25 deraadt Exp $
+# $OpenBSD: netstart,v 1.120 2008/06/09 22:46:42 deraadt Exp $
# Strip comments (and leading/trailing whitespace if IFS is set)
# from a file and spew to stdout
@@ -36,9 +36,10 @@ ifstart() {
fi
file=/etc/hostname.$if
- if [ "$(stat -f "%SLp" $file)" != "---" ]; then
+ if [ "$(stat -f "%SLp %u %g" $file)" != "--- 0 0" ]; then
echo "WARNING: $file is insecure, fixing permissions"
chmod o-rwx $file
+ chown root.wheel $file
fi
ifconfig $if > /dev/null 2>&1
if [ "$?" != "0" ]; then