From d3397b17e413856f3ca8e072cd789ee1bb7e778f Mon Sep 17 00:00:00 2001 From: David du Colombier Date: Fri, 17 Nov 2023 12:28:17 +0100 Subject: [PATCH] Fix parsing of Status in dpkginfo probe This change fixes a mistake made during a last-minute change in 557ddeed1e3e234a655ad77a691869554064b293. The parsing the Status was incorrect and all packages were considered as deinstalled. --- src/OVAL/probes/unix/linux/dpkginfo-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OVAL/probes/unix/linux/dpkginfo-helper.c b/src/OVAL/probes/unix/linux/dpkginfo-helper.c index 2ba9fb474c..fcbb8d150b 100644 --- a/src/OVAL/probes/unix/linux/dpkginfo-helper.c +++ b/src/OVAL/probes/unix/linux/dpkginfo-helper.c @@ -125,7 +125,7 @@ struct dpkginfo_reply_t* dpkginfo_get_by_name(const char *name, int *err) } } else if (reply != NULL) { if (strcmp(key, "Status") == 0) { - if (strcmp(value, "install") != 0) { + if (strncmp(value, "install", 7) != 0) { // Package deinstalled. dD("Package \"%s\" has been deinstalled.", name); dpkginfo_free_reply(reply);