diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-09-19 16:31:57 -0400 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-09-20 08:54:05 +0200 |
commit | 1d8a891844ad8505e376c473f42055368ba00767 (patch) | |
tree | c31d18d7c980023fd13a46c2a1bc501da9d3aabc /ipapython | |
parent | 4167ad01d73b0c7c0912bf537730da5c9b46b2c3 (diff) | |
download | freeipa-1d8a891844ad8505e376c473f42055368ba00767.tar.gz freeipa-1d8a891844ad8505e376c473f42055368ba00767.tar.xz freeipa-1d8a891844ad8505e376c473f42055368ba00767.zip |
The return value of restorecon is not reliable, ignore it.
https://fedorahosted.org/freeipa/ticket/1816
Diffstat (limited to 'ipapython')
-rw-r--r-- | ipapython/platform/redhat.py | 10 |
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" |