summaryrefslogtreecommitdiffstats
path: root/ipapython/sysrestore.py
diff options
context:
space:
mode:
Diffstat (limited to 'ipapython/sysrestore.py')
-rw-r--r--ipapython/sysrestore.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py
index 1025449c2..9b0e39fcb 100644
--- a/ipapython/sysrestore.py
+++ b/ipapython/sysrestore.py
@@ -32,6 +32,7 @@ import random
import string
from ipapython import ipautil
+from ipapython import services as ipaservices
SYSRESTORE_PATH = "/tmp"
SYSRESTORE_INDEXFILE = "sysrestore.index"
@@ -165,7 +166,7 @@ class FileStore:
os.chown(path, int(uid), int(gid))
os.chmod(path, int(mode))
- ipautil.run(["/sbin/restorecon", path])
+ ipaservices.restore_context(path)
del self.files[filename]
self.save()
@@ -196,7 +197,7 @@ class FileStore:
os.chown(path, int(uid), int(gid))
os.chmod(path, int(mode))
- ipautil.run(["/sbin/restorecon", path])
+ ipaservices.restore_context(path)
#force file to be deleted
self.files = {}