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:43 +0200 |
commit | 7a4295ef1ae1d4e7d51d4c7072102694243873e2 (patch) | |
tree | 203c43e452c7860e6787a1f10cf7b84be24d8685 | |
parent | f83c773a361e2ca7d1b2626879eb2feff975e15c (diff) | |
download | freeipa-7a4295ef1ae1d4e7d51d4c7072102694243873e2.tar.gz freeipa-7a4295ef1ae1d4e7d51d4c7072102694243873e2.tar.xz freeipa-7a4295ef1ae1d4e7d51d4c7072102694243873e2.zip |
The return value of restorecon is not reliable, ignore it.
https://fedorahosted.org/freeipa/ticket/1816
-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" |