summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipapython/platform/redhat.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ipapython/platform/redhat.py b/ipapython/platform/redhat.py
index 6d1d42368..6bf8bf348 100644
--- a/ipapython/platform/redhat.py
+++ b/ipapython/platform/redhat.py
@@ -123,10 +123,14 @@ knownservices = RedHatServices()
def restore_context(filepath):
"""
restore security context on the file path
- SE Linux equivalent is /sbin/restorecon <filepath>
- """
- ipautil.run(["/sbin/restorecon", filepath])
+ SELinux equivalent is /sbin/restorecon <filepath>
+
+ restorecon's return values are not reliable so we have to
+ ignore them (BZ #739604).
+ ipautil.run() will do the logging.
+ """
+ ipautil.run(["/sbin/restorecon", filepath], raiseonerr=False)
def backup_and_replace_hostname(fstore, statestore, hostname):
network_filename = "/etc/sysconfig/network"