]> git.ipfire.org Git - pakfire.git/commitdiff
FHS: Check for correct location and permission of shared objects
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 12:17:31 +0000 (12:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 12:17:31 +0000 (12:17 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/fhs.c

index c8f8b48e5cdc08e5a871078e2a29269c604886e5..4a84b677fd3b6b1f177fb03806c6dba2e6f506f0 100644 (file)
@@ -65,6 +65,13 @@ static const struct pakfire_fhs_check {
        { "/usr/bin/*",           S_IFREG, 0755, "root", "root", 0 },
        { "/usr/sbin/*",          S_IFREG, 0755, "root", "root", 0 },
 
+       // Shared Libraries must be executable
+       { "/usr/lib64/*.so.*",    S_IFREG, 0755, "root", "root", 0 },
+       { "/usr/lib64/**/*.so",   S_IFREG, 0755, "root", "root", 0 },
+
+       // Shared Libraries must not exist in /usr/lib
+       { "/usr/lib/*.so*",       S_IFREG,    0,   NULL,   NULL, PAKFIRE_FHS_MUSTNOTEXIST },
+
        // /usr/include: Ensure that:
        //   * All files are non-executable and belong to root
        //   * All directories have 0755 and belong to root