|
|
2e5fa3 |
From 2e15ace4f3fe4b7e5e5b3829ddcd2d13f2743544 Mon Sep 17 00:00:00 2001
|
|
|
2e5fa3 |
From: Martin Preisler <mpreisle@redhat.com>
|
|
|
2e5fa3 |
Date: Wed, 18 Apr 2018 11:55:40 -0400
|
|
|
2e5fa3 |
Subject: [PATCH] Force the CHROOT offline mode for RPM related probes
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
librpm doesn't fully support the rpmtsSetRootDir, we can't rely on it.
|
|
|
2e5fa3 |
---
|
|
|
2e5fa3 |
src/OVAL/probes/unix/linux/rpminfo.c | 2 +-
|
|
|
2e5fa3 |
src/OVAL/probes/unix/linux/rpmverify.c | 2 +-
|
|
|
2e5fa3 |
src/OVAL/probes/unix/linux/rpmverifyfile.c | 2 +-
|
|
|
2e5fa3 |
src/OVAL/probes/unix/linux/rpmverifypackage.c | 2 +-
|
|
|
2e5fa3 |
4 files changed, 4 insertions(+), 4 deletions(-)
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
diff --git a/src/OVAL/probes/unix/linux/rpminfo.c b/src/OVAL/probes/unix/linux/rpminfo.c
|
|
|
2e5fa3 |
index 77759b047..8f52f020c 100644
|
|
|
2e5fa3 |
--- a/src/OVAL/probes/unix/linux/rpminfo.c
|
|
|
2e5fa3 |
+++ b/src/OVAL/probes/unix/linux/rpminfo.c
|
|
|
2e5fa3 |
@@ -269,7 +269,7 @@ void probe_preload ()
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void probe_offline_mode ()
|
|
|
2e5fa3 |
{
|
|
|
2e5fa3 |
- probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_OWN|PROBE_OFFLINE_RPMDB);
|
|
|
2e5fa3 |
+ probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_CHROOT|PROBE_OFFLINE_RPMDB);
|
|
|
2e5fa3 |
}
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void *probe_init (void)
|
|
|
2e5fa3 |
diff --git a/src/OVAL/probes/unix/linux/rpmverify.c b/src/OVAL/probes/unix/linux/rpmverify.c
|
|
|
2e5fa3 |
index 1a9aca01a..b1a9eaf05 100644
|
|
|
2e5fa3 |
--- a/src/OVAL/probes/unix/linux/rpmverify.c
|
|
|
2e5fa3 |
+++ b/src/OVAL/probes/unix/linux/rpmverify.c
|
|
|
2e5fa3 |
@@ -226,7 +226,7 @@ void probe_preload ()
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void probe_offline_mode ()
|
|
|
2e5fa3 |
{
|
|
|
2e5fa3 |
- probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_OWN);
|
|
|
2e5fa3 |
+ probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_CHROOT);
|
|
|
2e5fa3 |
}
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void *probe_init (void)
|
|
|
2e5fa3 |
diff --git a/src/OVAL/probes/unix/linux/rpmverifyfile.c b/src/OVAL/probes/unix/linux/rpmverifyfile.c
|
|
|
2e5fa3 |
index 877653b84..cbcb85fc0 100644
|
|
|
2e5fa3 |
--- a/src/OVAL/probes/unix/linux/rpmverifyfile.c
|
|
|
2e5fa3 |
+++ b/src/OVAL/probes/unix/linux/rpmverifyfile.c
|
|
|
2e5fa3 |
@@ -311,7 +311,7 @@ void probe_preload ()
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void probe_offline_mode ()
|
|
|
2e5fa3 |
{
|
|
|
2e5fa3 |
- probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_OWN);
|
|
|
2e5fa3 |
+ probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_CHROOT);
|
|
|
2e5fa3 |
}
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void *probe_init (void)
|
|
|
2e5fa3 |
diff --git a/src/OVAL/probes/unix/linux/rpmverifypackage.c b/src/OVAL/probes/unix/linux/rpmverifypackage.c
|
|
|
2e5fa3 |
index 3c0dd5003..2a110ef5a 100644
|
|
|
2e5fa3 |
--- a/src/OVAL/probes/unix/linux/rpmverifypackage.c
|
|
|
2e5fa3 |
+++ b/src/OVAL/probes/unix/linux/rpmverifypackage.c
|
|
|
2e5fa3 |
@@ -312,7 +312,7 @@ ret:
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void probe_offline_mode ()
|
|
|
2e5fa3 |
{
|
|
|
2e5fa3 |
- probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_OWN);
|
|
|
2e5fa3 |
+ probe_setoption(PROBEOPT_OFFLINE_MODE_SUPPORTED, PROBE_OFFLINE_CHROOT);
|
|
|
2e5fa3 |
}
|
|
|
2e5fa3 |
|
|
|
2e5fa3 |
void *probe_init (void)
|
|
|
2e5fa3 |
--
|
|
|
2e5fa3 |
2.14.3
|
|
|
2e5fa3 |
|