Skip to content

eBPF-based security platform

bpm: refuse an upgrade whose old directives cannot all be listed

Daniel Borkmann13d05b5d7c8c
diff --git a/builtin-bpm.c b/builtin-bpm.c
index 98345aed..aafabf27 100644
--- a/builtin-bpm.c
+++ b/builtin-bpm.c
@@ -1352,6 +1352,8 @@ static int package_install(const struct bpm_source *s, const struct bpm_index_en
}
closedir(d);
}
+ if (ret)
+ goto out;
sort_old_pairs(old_unloads, old_loads, nold);
for (int old_i = 0; old_i < nold; old_i++) {
if (upatch_remove(old_unloads[old_i])) {