Browse Source

before using them, force hostname.* files to be unreadable by world

first version from todd, ok millert
OPENBSD_4_4
deraadt 16 years ago
parent
commit
d5af9ca8a2
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      src/etc/netstart

+ 6
- 1
src/etc/netstart View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $OpenBSD: netstart,v 1.118 2008/01/17 12:36:33 brad Exp $
# $OpenBSD: netstart,v 1.119 2008/04/17 19:03:25 deraadt Exp $
# Strip comments (and leading/trailing whitespace if IFS is set)
# from a file and spew to stdout
@ -35,6 +35,11 @@ ifstart() {
return
fi
file=/etc/hostname.$if
if [ "$(stat -f "%SLp" $file)" != "---" ]; then
echo "WARNING: $file is insecure, fixing permissions"
chmod o-rwx $file
fi
ifconfig $if > /dev/null 2>&1
if [ "$?" != "0" ]; then
# Try to create interface if it does not exist


Loading…
Cancel
Save