Browse Source

better path handling; jbernard@tater.mines.edu, netbsd pr#3995

OPENBSD_2_2
deraadt 27 years ago
parent
commit
699300c397
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      src/etc/security

+ 7
- 3
src/etc/security View File

@ -1,6 +1,6 @@
#!/bin/sh - #!/bin/sh -
# #
# $OpenBSD: security,v 1.20 1997/06/23 02:54:31 millert Exp $
# $OpenBSD: security,v 1.21 1997/09/02 06:46:42 deraadt Exp $
# from: @(#)security 8.1 (Berkeley) 6/9/93 # from: @(#)security 8.1 (Berkeley) 6/9/93
# #
@ -141,11 +141,13 @@ for i in $list ; do
{ print "Root umask is group writeable" } { print "Root umask is group writeable" }
$2 % 10 < 2 \ $2 % 10 < 2 \
{ print "Root umask is other writeable" }' >> $OUTPUT { print "Root umask is other writeable" }' >> $OUTPUT
SAVE_PATH=$PATH
unset PATH
/bin/csh -f -s << end-of-csh > /dev/null 2>&1 /bin/csh -f -s << end-of-csh > /dev/null 2>&1
unset path
source $i source $i
/bin/ls -ldgT \$path > $TMP1 /bin/ls -ldgT \$path > $TMP1
end-of-csh end-of-csh
PATH=$SAVE_PATH
awk '{ awk '{
if ($10 ~ /^\.$/) { if ($10 ~ /^\.$/) {
print "The root path includes ."; print "The root path includes .";
@ -183,12 +185,14 @@ for i in $list; do
{ print "Root umask is group writeable" } \ { print "Root umask is group writeable" } \
$2 % 10 < 2 \ $2 % 10 < 2 \
{ print "Root umask is other writeable" }' >> $OUTPUT { print "Root umask is other writeable" }' >> $OUTPUT
SAVE_PATH=$PATH
unset PATH
/bin/sh << end-of-sh > /dev/null 2>&1 /bin/sh << end-of-sh > /dev/null 2>&1
PATH=
. $i . $i
list=\`echo \$PATH | /usr/bin/sed -e 's/:/ /g'\` list=\`echo \$PATH | /usr/bin/sed -e 's/:/ /g'\`
/bin/ls -ldgT \$list > $TMP1 /bin/ls -ldgT \$list > $TMP1
end-of-sh end-of-sh
PATH=$SAVE_PATH
awk '{ awk '{
if ($10 ~ /^\.$/) { if ($10 ~ /^\.$/) {
print "The root path includes ."; print "The root path includes .";


Loading…
Cancel
Save