]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
FHS: Fix setuid check
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Mar 2023 19:37:59 +0000 (19:37 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 19 Mar 2023 19:37:59 +0000 (19:37 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/fhs.c

index 95acb11c51bb07f53f8e8f8b1e144aa931a94a04..fc96ec1027b5643e92c137840b466309b5172951 100644 (file)
@@ -65,9 +65,9 @@ static const struct pakfire_fhs_check {
        { "/usr/sbin/*",          S_IFDIR,    0,   NULL,   NULL, PAKFIRE_FHS_MUSTNOTEXIST },
 
        // Permitted setuid binaries
-       { "/usr/bin/passwd",      S_IFREG, 4755, "root", "root", 0 },
-       { "/usr/bin/su",          S_IFREG, 4755, "root", "root", 0 },
-       { "/usr/bin/sudo",        S_IFREG, 4755, "root", "root", 0 },
+       { "/usr/bin/passwd",      S_IFREG, S_ISUID|0755, "root", "root", 0 },
+       { "/usr/bin/su",          S_IFREG, S_ISUID|0755, "root", "root", 0 },
+       { "/usr/bin/sudo",        S_IFREG, S_ISUID|0755, "root", "root", 0 },
 
        // Any files in /usr/{,s}bin must be owned by root and have 0755
        { "/usr/bin/*",           S_IFREG, 0755, "root", "root", 0 },