mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
The return value of restorecon is not reliable, ignore it.
https://fedorahosted.org/freeipa/ticket/1816
This commit is contained in:
committed by
Martin Kosek
parent
f83c773a36
commit
7a4295ef1a
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user