Skip to content

Commit

Permalink
Remove unused PROBE_OFFLINE_RPMDB mode
Browse files Browse the repository at this point in the history
The env variable OSCAP_PROBE_RPMDB_PATH isn't set anywhere,
therefore this mode isn't used anywhere.
  • Loading branch information
jan-cerny committed Dec 10, 2019
1 parent dc98bc8 commit 8f9aaaa
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion src/OVAL/probes/probe/probe.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ struct probe_ctx {
typedef enum {
PROBE_OFFLINE_NONE = 0x00,
PROBE_OFFLINE_CHROOT = 0x01,
PROBE_OFFLINE_RPMDB = 0x02,
PROBE_OFFLINE_OWN = 0x04,
PROBE_OFFLINE_ALL = 0x0f
} probe_offline_flags;
Expand Down
6 changes: 0 additions & 6 deletions src/OVAL/probes/probe/worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -1010,12 +1010,6 @@ SEXP_t *probe_worker(probe_t *probe, SEAP_msg_t *msg_in, int *ret)
probe->selected_offline_mode = PROBE_OFFLINE_CHROOT;
}
}

if (getenv("OSCAP_PROBE_RPMDB_PATH") != NULL) {
dI("Switching probe to PROBE_OFFLINE_RPMDB mode.");
probe->offline_mode = true;
probe->selected_offline_mode = PROBE_OFFLINE_RPMDB;
}
#endif

SEXP_t *probe_in, *probe_out, *set;
Expand Down
7 changes: 1 addition & 6 deletions src/OVAL/probes/unix/linux/rpminfo_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ static int get_rpminfo(struct rpminfo_req *req, struct rpminfo_rep **rep, struct

int rpminfo_probe_offline_mode_supported()
{
return PROBE_OFFLINE_CHROOT | PROBE_OFFLINE_RPMDB;
return PROBE_OFFLINE_CHROOT;
}

void *rpminfo_probe_init(void)
Expand All @@ -290,11 +290,6 @@ void *rpminfo_probe_init(void)
g_rpm->rpmts = rpmtsCreate();
pthread_mutex_init (&(g_rpm->mutex), NULL);

char *dbpath = getenv("OSCAP_PROBE_RPMDB_PATH");
if (dbpath) {
addMacro(NULL, "_dbpath", NULL, dbpath, 0);
}

return ((void *)g_rpm);
}

Expand Down

0 comments on commit 8f9aaaa

Please sign in to comment.