Skip to content

Commit

Permalink
Fix parsing of Status in dpkginfo probe
Browse files Browse the repository at this point in the history
This change fixes a mistake made during a last-minute
change in 557ddee.

The parsing the Status was incorrect and all
packages were considered as deinstalled.
  • Loading branch information
0intro committed Nov 17, 2023
1 parent 3f23bb8 commit d3397b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/OVAL/probes/unix/linux/dpkginfo-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d3397b1

Please sign in to comment.