From ba63bfe1d5e352ee12bf186261229bee1604b319 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Fri, 30 Jun 2023 20:07:45 -0400 Subject: sbopkglint: handle symlinked static libs correctly. --- sbopkglint.d/75-static_libs.t.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbopkglint.d/75-static_libs.t.sh') diff --git a/sbopkglint.d/75-static_libs.t.sh b/sbopkglint.d/75-static_libs.t.sh index b0cdcdd..fab2a2b 100644 --- a/sbopkglint.d/75-static_libs.t.sh +++ b/sbopkglint.d/75-static_libs.t.sh @@ -14,11 +14,11 @@ for libdir in lib lib64 usr/lib usr/lib64; do if [ -d $libdir ]; then find_warnfiles "bad static library ownership (should be root:root):" \ - $libdir -mindepth 1 -maxdepth 1 -name '*.a' \! \( -user root -a -group root \) + -L $libdir -mindepth 1 -maxdepth 1 -name '*.a' \! \( -user root -a -group root \) find_warnfiles "bad static library permissions (should be 0644 or 0444):" \ - $libdir -mindepth 1 -maxdepth 1 -name '*.a' \! \( -perm 444 -o -perm 644 \) + -L $libdir -mindepth 1 -maxdepth 1 -name '*.a' \! \( -perm 444 -o -perm 644 \) find $libdir -mindepth 1 -maxdepth 1 -name '*.a' | while read static; do - ftype="$( file -b --mime-type "$static" )" + ftype="$( file -L -b --mime-type "$static" )" case "$ftype" in "application/x-archive") ;; # OK *) warn "$static is not a valid static library. MIME type is '$ftype'." ;; -- cgit v1.2.3