FreeBSD Bugzilla – Attachment 185827 Details for
Bug 221866
[patch] ls -liTd in 100.chksetuid with large inodes will cause daily security run output to misreport setuid changes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Use stat instead of ls
0001-ls-i-with-multiple-files-pads-left-side-spaces.patch (text/plain), 1.09 KB, created by
Derek Schrock
on 2017-08-27 20:24:51 UTC
(
hide
)
Description:
Use stat instead of ls
Filename:
MIME Type:
Creator:
Derek Schrock
Created:
2017-08-27 20:24:51 UTC
Size:
1.09 KB
patch
obsolete
>From 910d51d317d0687b076c03c1a73c85174ca6e512 Mon Sep 17 00:00:00 2001 >From: Derek Schrock <dereks@lifeofadishwasher.com> >Date: Sun, 27 Aug 2017 16:05:17 -0400 >Subject: [PATCH] ls -i with multiple files pads left side spaces > >If a new setuid program is found with a large inode 100.chksetuid will >report all programs have changed due to left side padded spaces. > >Use stat with the same (or closest to) as ls -liTd output. >--- > etc/periodic/security/100.chksetuid | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/etc/periodic/security/100.chksetuid b/etc/periodic/security/100.chksetuid >index 670ae979202..aa4e35ce46f 100755 >--- a/etc/periodic/security/100.chksetuid >+++ b/etc/periodic/security/100.chksetuid >@@ -54,7 +54,8 @@ then > }'` > 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 \{\} \+ | >+ \( -perm -u+s -or -perm -g+s \) \ >+ -exec stat -f '%i %Sp %l %Su %Sg %t%10z %Sm %N' \{\} \+ | > check_diff setuid - "${host} setuid diffs:" > rc=$? > fi >-- >2.14.1 >
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 221866
: 185827