Blame SOURCES/bz1719684-dhcpd-keep-SELinux-context-chroot.patch

914f09
From c8c073ed81884128b0b3955fb0b0bd23661044a2 Mon Sep 17 00:00:00 2001
914f09
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
914f09
Date: Wed, 12 Jun 2019 12:45:08 +0200
914f09
Subject: [PATCH] dhcpd: keep SELinux context
914f09
914f09
---
914f09
 heartbeat/dhcpd | 4 ++--
914f09
 1 file changed, 2 insertions(+), 2 deletions(-)
914f09
914f09
diff --git a/heartbeat/dhcpd b/heartbeat/dhcpd
914f09
index 8b2d8b695..46027b39b 100755
914f09
--- a/heartbeat/dhcpd
914f09
+++ b/heartbeat/dhcpd
914f09
@@ -337,12 +337,12 @@ dhcpd_initialize_chroot() {
914f09
     done | sort -u`
914f09
     for i in $cplibs ; do
914f09
 	if [ -s "$i" ]; then
914f09
-	    cp -pL "$i" "${OCF_RESKEY_chrooted_path}/$libdir/" ||
914f09
+	    cp -aL "$i" "${OCF_RESKEY_chrooted_path}/$libdir/" ||
914f09
 		{ ocf_exit_reason "could not copy $i to chroot jail"; return $OCF_ERR_GENERIC; }
914f09
 	fi
914f09
     done
914f09
 
914f09
-   return $OCF_SUCCESS
914f09
+    return $OCF_SUCCESS
914f09
 }
914f09
 
914f09
 # Initialize a non-chroot environment