]> git.ipfire.org Git - pakfire.git/commitdiff
FHS: Do not allow any subdirectories in /usr/bin & /usr/sbin
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 10:40:33 +0000 (10:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 10:40:33 +0000 (10:40 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/fhs.c

index f82d80349c4aa2c98e65dd86c6027c05481a0c79..b09da67fe91465dbea28a11ab2ea2ba4385837a7 100644 (file)
@@ -56,6 +56,10 @@ static const struct pakfire_fhs_check {
        { "/usr/*",       0, PAKFIRE_FHS_MUSTNOTEXIST, 0, NULL, NULL },
        { "/usr/src/**",  0, PAKFIRE_FHS_MUSTNOTEXIST, 0, NULL, NULL },
 
+       // There cannot be any subdirectories in /usr/bin & /usr/sbin
+       { "/usr/bin/*",   S_IFDIR, PAKFIRE_FHS_MUSTNOTEXIST, 0, NULL, NULL },
+       { "/usr/sbin/*",  S_IFDIR, PAKFIRE_FHS_MUSTNOTEXIST, 0, NULL, NULL },
+
        // /var
        { "/var",         S_IFDIR, 0, 0755, "root", "root" },
        { "/var/cache",   S_IFDIR, 0, 0755, "root", "root" },