Browse Source

More specific SELinux detection

master
Lauri Võsandi 1 year ago
parent
commit
9db70b1a01
  1. 2
      pinecrypt/client/cli.py

2
pinecrypt/client/cli.py

@ -28,7 +28,7 @@ def selinux_fixup(path): @@ -28,7 +28,7 @@ def selinux_fixup(path):
"""
Fix OpenVPN credential store security context on Fedora
"""
if os.path.exists("/usr/bin/chcon"):
if os.path.exists("/usr/bin/chcon") and os.path.exists("/sys/fs/selinux"):
cmd = "chcon", "--type=home_cert_t", path
subprocess.call(cmd)

Loading…
Cancel
Save