Blame SOURCES/openscap-1.2.17-use-chroot-for-rpm-probes.patch

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