Add decent constants for python for return of getenforce call.
This commit is contained in:
parent
22671378f1
commit
9639f5d9a8
1 changed files with 8 additions and 0 deletions
|
@ -10,6 +10,10 @@
|
||||||
|
|
||||||
import shutil, os, stat
|
import shutil, os, stat
|
||||||
|
|
||||||
|
DISABLED = -1
|
||||||
|
PERMISSIVE = 0
|
||||||
|
ENFORCING = 1
|
||||||
|
|
||||||
def restorecon(path, recursive=False):
|
def restorecon(path, recursive=False):
|
||||||
""" Restore SELinux context on a given path """
|
""" Restore SELinux context on a given path """
|
||||||
|
|
||||||
|
@ -74,6 +78,10 @@ def install(src, dest):
|
||||||
$1 = &temp;
|
$1 = &temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%typemap(in, numinputs=0) void *(char *temp=NULL) {
|
||||||
|
$1 = temp;
|
||||||
|
}
|
||||||
|
|
||||||
/* Makes security_compute_user() return a Python list of contexts */
|
/* Makes security_compute_user() return a Python list of contexts */
|
||||||
%typemap(argout) (security_context_t **con) {
|
%typemap(argout) (security_context_t **con) {
|
||||||
PyObject* plist;
|
PyObject* plist;
|
||||||
|
|
Loading…
Reference in a new issue