diff options
author | Robert Peichaer <rpe@cvs.openbsd.org> | 2017-05-07 09:40:16 +0000 |
---|---|---|
committer | Robert Peichaer <rpe@cvs.openbsd.org> | 2017-05-07 09:40:16 +0000 |
commit | bf0fad56e5d35ceffed5fe4e14e540f777d272b9 (patch) | |
tree | 4ddd398ab567469ef07660fbf678fb348593c2b8 /etc | |
parent | 213cb529b1d0c7d84c6c8fa97da26dd55cd0b970 (diff) |
Change test from [] to [[]] and simplify pattern.
OK tb@, krw@ (for [[]])
Feedback and OK halex@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/netstart | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/netstart b/etc/netstart index 15ee069ce46..74c9f376d5d 100644 --- a/etc/netstart +++ b/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.182 2017/05/07 07:55:17 rpe Exp $ +# $OpenBSD: netstart,v 1.183 2017/05/07 09:40:15 rpe Exp $ # Turn off Strict Bourne shell mode. set +o sh @@ -96,7 +96,7 @@ ifstart() { # Not using stat(1), we can't rely on having /usr yet. set -A _stat -- $(ls -nL $_file) - if [ "${_stat[0]#???????} ${_stat[2]} ${_stat[3]}" != "--- 0 0" ]; then + if [[ "${_stat[0]}${_stat[2]}${_stat[3]}" != *---00 ]]; then echo "WARNING: $_file is insecure, fixing permissions" chmod -LR o-rwx $_file chown -LR root.wheel $_file |