FreeBSD Bugzilla – Attachment 183563 Details for
Bug 48325
[patch] /etc/periodic/security/100.chksetuid doesn't work with spaces in mount points
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix handling mountpoints with spaces in 100.chksetuid and 110.neggrpprm
48325.diff (text/plain), 1.83 KB, created by
Alan Somers
on 2017-06-17 04:33:33 UTC
(
hide
)
Description:
Fix handling mountpoints with spaces in 100.chksetuid and 110.neggrpprm
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2017-06-17 04:33:33 UTC
Size:
1.83 KB
patch
obsolete
>Index: etc/periodic/security/100.chksetuid >=================================================================== >--- etc/periodic/security/100.chksetuid (revision 318606) >+++ etc/periodic/security/100.chksetuid (working copy) >@@ -45,7 +45,13 @@ > then > echo "" > echo 'Checking setuid files and devices:' >- MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` >+ IFS=$'\t\n' # Don't split mount points with spaces >+ 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 \{\} \+ | >Index: etc/periodic/security/110.neggrpperm >=================================================================== >--- etc/periodic/security/110.neggrpperm (revision 318606) >+++ etc/periodic/security/110.neggrpperm (working copy) >@@ -43,7 +43,13 @@ > then > echo "" > echo 'Checking negative group permissions:' >- MP=`mount -t ufs,zfs | awk '$0 !~ /no(suid|exec)/ { print $3 }'` >+ IFS=$'\t\n' # Don't split mount points with spaces >+ 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 \ >Index: etc/periodic/security/security.functions >=================================================================== >--- etc/periodic/security/security.functions (revision 318606) >+++ etc/periodic/security/security.functions (working copy) >@@ -48,6 +48,7 @@ > # LABEL is the base name of the ${LOG}/${label}.{today,yesterday} files. > > check_diff() { >+ unset IFS > rc=0 > if [ "$1" = "new_only" ]; then > shift
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 48325
:
28832
| 183563