analyze: badness if neither of RootImage and RootDirectory exists
authorTopi Miettinen <toiwoton@gmail.com>
Wed, 18 Dec 2019 18:25:03 +0000 (20:25 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 5 Feb 2020 13:14:45 +0000 (14:14 +0100)
Instead of requiring both RootImage and RootDirectory directives, give badness
points if neither is present. Fixes conversion in d737b451f.

(cherry picked from commit d909b40fda52d6822a0f7201f9c17818df2bd091)

src/analyze/analyze-security.c

index 79b099a4093a3a141e7c2a55c84f2f5bb464d901..20c140139006fe04e8b37abeca890f8f5ac7c392 100644 (file)
@@ -306,7 +306,7 @@ static int assess_root_directory(
         assert(ret_description);
 
         *ret_badness =
-                empty_or_root(info->root_directory) ||
+                empty_or_root(info->root_directory) &&
                 empty_or_root(info->root_image);
         *ret_description = NULL;