Merge pull request #21237 from bluca/analyze_skip

analyze: allow a custom policy to skip a check
This commit is contained in:
Luca Boccassi
2021-11-06 11:19:40 +00:00
committed by GitHub
3 changed files with 16 additions and 6 deletions
+5
View File
@@ -1764,6 +1764,11 @@ static int assess(const SecurityInfo *info,
d = strdup("Service runs in special boot phase, option is not appropriate");
if (!d)
return log_oom();
} else if (weight == 0) {
badness = UINT64_MAX;
d = strdup("Option excluded by policy, skipping");
if (!d)
return log_oom();
} else {
r = a->assess(a, info, data, &badness, &d);
if (r < 0)