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

index 4b4d3203631bb73c8932377be421846576f9be8b..979bca7a5b56c4bf984839dca14b27eca7dae6de 100644 (file)
@@ -51,6 +51,10 @@ static const struct pakfire_fhs_check {
        { "/usr/share",   0, S_IFDIR|0755, "root", "root" },
        { "/usr/src",     0, S_IFDIR|0755, "root", "root" },
 
+       // Allow no further files in /usr & /usr/src
+       { "/usr/*",       PAKFIRE_FHS_MUSTNOTEXIST, 0, NULL, NULL },
+       { "/usr/src/**",  PAKFIRE_FHS_MUSTNOTEXIST, 0, NULL, NULL },
+
        // /var
        { "/var",         0, S_IFDIR|0755, "root", "root" },
        { "/var/cache",   0, S_IFDIR|0755, "root", "root" },