]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
FHS: Perform world writable check only for regular files
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 14:29:12 +0000 (14:29 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 17 Mar 2023 14:29:12 +0000 (14:29 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/fhs.c

index 63aa802cfb0ccbc66d699a1a38c53229576ede95..6daf8258b601f68f596e56c15278da68988ad4d1 100644 (file)
@@ -221,6 +221,15 @@ ERROR:
 
 static int pakfire_fhs_check_world_writable(
                struct pakfire* pakfire, struct pakfire_file* file) {
+       // Run this check only for regular files
+       switch (pakfire_file_get_type(file)) {
+               case S_IFREG:
+                       break;
+
+               default:
+                       return 0;
+       }
+
        // Fetch path
        const char* path = pakfire_file_get_path(file);