mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 00:31:56 -06:00
The return value of restorecon is not reliable, ignore it.
https://fedorahosted.org/freeipa/ticket/1816
This commit is contained in:
parent
4167ad01d7
commit
1d8a891844
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user