Skip to content

Commit 8f9aaaa

Browse files
committed
Remove unused PROBE_OFFLINE_RPMDB mode
The env variable OSCAP_PROBE_RPMDB_PATH isn't set anywhere, therefore this mode isn't used anywhere.
1 parent dc98bc8 commit 8f9aaaa

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

src/OVAL/probes/probe/probe.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ struct probe_ctx {
8888
typedef enum {
8989
PROBE_OFFLINE_NONE = 0x00,
9090
PROBE_OFFLINE_CHROOT = 0x01,
91-
PROBE_OFFLINE_RPMDB = 0x02,
9291
PROBE_OFFLINE_OWN = 0x04,
9392
PROBE_OFFLINE_ALL = 0x0f
9493
} probe_offline_flags;

src/OVAL/probes/probe/worker.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,12 +1010,6 @@ SEXP_t *probe_worker(probe_t *probe, SEAP_msg_t *msg_in, int *ret)
10101010
probe->selected_offline_mode = PROBE_OFFLINE_CHROOT;
10111011
}
10121012
}
1013-
1014-
if (getenv("OSCAP_PROBE_RPMDB_PATH") != NULL) {
1015-
dI("Switching probe to PROBE_OFFLINE_RPMDB mode.");
1016-
probe->offline_mode = true;
1017-
probe->selected_offline_mode = PROBE_OFFLINE_RPMDB;
1018-
}
10191013
#endif
10201014

10211015
SEXP_t *probe_in, *probe_out, *set;

src/OVAL/probes/unix/linux/rpminfo_probe.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static int get_rpminfo(struct rpminfo_req *req, struct rpminfo_rep **rep, struct
272272

273273
int rpminfo_probe_offline_mode_supported()
274274
{
275-
return PROBE_OFFLINE_CHROOT | PROBE_OFFLINE_RPMDB;
275+
return PROBE_OFFLINE_CHROOT;
276276
}
277277

278278
void *rpminfo_probe_init(void)
@@ -290,11 +290,6 @@ void *rpminfo_probe_init(void)
290290
g_rpm->rpmts = rpmtsCreate();
291291
pthread_mutex_init (&(g_rpm->mutex), NULL);
292292

293-
char *dbpath = getenv("OSCAP_PROBE_RPMDB_PATH");
294-
if (dbpath) {
295-
addMacro(NULL, "_dbpath", NULL, dbpath, 0);
296-
}
297-
298293
return ((void *)g_rpm);
299294
}
300295

0 commit comments

Comments
 (0)