From 9c9371a55b0f4f0801c2a0eb7fec742e55acef1d Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 17 Jun 2023 06:03:49 -0400 Subject: sbopkglint: actually check owner/perms of icons. --- sbopkglint.d/50-icons.t.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sbopkglint.d/50-icons.t.sh') diff --git a/sbopkglint.d/50-icons.t.sh b/sbopkglint.d/50-icons.t.sh index 1f1f032..8b3303a 100644 --- a/sbopkglint.d/50-icons.t.sh +++ b/sbopkglint.d/50-icons.t.sh @@ -75,9 +75,17 @@ for icondir in usr/share/pixmaps usr/share/icons/hicolor; do if [ -d "$icondir" ]; then find -L "$icondir" -type f | while read i; do check_image "$i" + [ "$( stat -Lc '%a %U %G' "$i" )" = "644 root root" ] || \ + ls -ld "$i" >> .badperms.$$ done fi done [ -s .nonimages.$$ ] && warn "non-image files in icon dirs:" && cat .nonimages.$$ -rm -f .nonimages.$$ + +if [ -s .badperms.$$ ]; then + warn "bad permissions/owner on icon(s) (should be 0644 root:root):" + cat .badperms.$$ +fi + +rm -f .nonimages.$$ .badperms.$$ -- cgit v1.2.3