mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 08:09:08 +00:00
MFC r322868:
Fix 100.chksetuid and 110.neggrpperm for mountpoints with spaces Also, fix them for mountpoints with tabs. PR: 48325 Reported by: pguyot@kallisys.net, aaron@baugher.biz
This commit is contained in:
parent
103b5ba329
commit
e5d402ee36
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=326326
@ -45,7 +45,13 @@ if check_yesno_period security_status_chksetuid_enable
|
||||
then
|
||||
echo ""
|
||||
echo 'Checking setuid files and devices:'
|
||||
MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'`
|
||||
IFS=$'\n' # Don't split mount points with spaces or tabs
|
||||
MP=`mount -t ufs,zfs | awk '
|
||||
$0 !~ /no(suid|exec)/ {
|
||||
sub(/^.* on \//, "/");
|
||||
sub(/ \(.*\)/, "");
|
||||
print $0
|
||||
}'`
|
||||
find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \
|
||||
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
|
||||
\( -perm -u+s -or -perm -g+s \) -exec ls -liTd \{\} \+ |
|
||||
|
@ -43,7 +43,13 @@ if check_yesno_period security_status_neggrpperm_enable
|
||||
then
|
||||
echo ""
|
||||
echo 'Checking negative group permissions:'
|
||||
MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'`
|
||||
IFS=$'\n' # Don't split mount points with spaces or tabs
|
||||
MP=`mount -t ufs,zfs | awk '
|
||||
$0 !~ /no(suid|exec)/ {
|
||||
sub(/^.* on \//, "/");
|
||||
sub(/ \(.*\)/, "");
|
||||
print $0
|
||||
}'`
|
||||
n=$(find -sx $MP /dev/null \( ! -fstype local \) -prune -o -type f \
|
||||
\( \( ! -perm +010 -and -perm +001 \) -or \
|
||||
\( ! -perm +020 -and -perm +002 \) -or \
|
||||
|
@ -48,6 +48,7 @@ rc=0
|
||||
# LABEL is the base name of the ${LOG}/${label}.{today,yesterday} files.
|
||||
|
||||
check_diff() {
|
||||
unset IFS
|
||||
rc=0
|
||||
if [ "$1" = "new_only" ]; then
|
||||
shift
|
||||
|
Loading…
Reference in New Issue
Block a user