Browse Source

Fix setting of umaskset. Also, there is no need to use TMP3 for

umask detection.
OPENBSD_3_4
millert 21 years ago
parent
commit
c3a8fa3c18
1 changed files with 5 additions and 6 deletions
  1. +5
    -6
      src/etc/security

+ 5
- 6
src/etc/security View File

@ -1,6 +1,6 @@
#!/bin/sh -
#
# $OpenBSD: security,v 1.62 2003/07/01 22:12:50 millert Exp $
# $OpenBSD: security,v 1.63 2003/07/03 23:05:42 millert Exp $
# from: @(#)security 8.1 (Berkeley) 6/9/93
#
@ -136,6 +136,9 @@ umaskset=no
list="/etc/csh.cshrc /etc/csh.login ${rhome}/.cshrc ${rhome}/.login"
for i in $list ; do
if [ -s $i ] ; then
if egrep -q '[[:space:]]*umask[[:space:]]' $i ; then
umaskset=yes
fi
awk '{
if ($1 == "umask") {
if ($2 % 100 / 10 ~ /^[0145]/)
@ -143,11 +146,7 @@ for i in $list ; do
if ($2 % 10 ~ /^[0145]/)
print "Root umask is other writable";
}
}' < $i > $TMP3
if [ -s $TMP3 ]; then
umaskset=yes
cat $TMP3 >> $OUTPUT
fi
}' < $i >> $OUTPUT
SAVE_PATH=$PATH
unset PATH
/bin/csh -f -s << end-of-csh > /dev/null 2>&1


Loading…
Cancel
Save