bdd5f9 libselinux-2.5-14

Authored and Committed by plautrba 2 years ago
    libselinux: Rewrite restorecon() python method
    When the restorecon method was added to the libselinux swig python
    bindings, there was no libselinux restorecon implementation and it
    he had to call matchpathcon() which is deprecated in favor of
    The new restorecon method uses selinux_restorecon method from libselinux
    and which is exported by the previous commit.
    >>> selinux.restorecon('/var/lib', recursive=True)
    Traceback (most recent call last):
      File "/usr/lib64/python3.5/site-packages/selinux/", line 114, in restorecon
        status, context = matchpathcon(path, mode)
    FileNotFoundError: [Errno 2] No such file or directory
file modified
+71 -0
file modified
+5 -2