From 32b1322828d6560bce79e6250813faf9bf6a7ad4 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sep 07 2007 13:26:25 +0000 Subject: - fix swig binding for rpm_execcon --- diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 10dcee8..d93e565 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,1095 +1,6 @@ -diff -up libselinux-2.0.14/src/selinuxswig_wrap.c.rhat libselinux-2.0.14/src/selinuxswig_wrap.c ---- libselinux-2.0.14/src/selinuxswig_wrap.c.rhat 2007-04-24 10:36:20.000000000 -0400 -+++ libselinux-2.0.14/src/selinuxswig_wrap.c 2007-07-11 12:00:41.000000000 -0400 -@@ -2449,11 +2449,11 @@ SWIG_Python_MustGetPtr(PyObject *obj, sw - /* -------- TYPES TABLE (BEGIN) -------- */ - - #define SWIGTYPE_p_SELboolean swig_types[0] --#define SWIGTYPE_p_access_vector_t swig_types[1] --#define SWIGTYPE_p_char swig_types[2] --#define SWIGTYPE_p_int swig_types[3] --#define SWIGTYPE_p_p_char swig_types[4] --#define SWIGTYPE_p_p_p_char swig_types[5] -+#define SWIGTYPE_p_char swig_types[1] -+#define SWIGTYPE_p_int swig_types[2] -+#define SWIGTYPE_p_p_char swig_types[3] -+#define SWIGTYPE_p_p_p_char swig_types[4] -+#define SWIGTYPE_p_p_security_context_t swig_types[5] - #define SWIGTYPE_p_security_context_t swig_types[6] - #define SWIGTYPE_p_unsigned_int swig_types[7] - static swig_type_info *swig_types[9]; -@@ -2485,6 +2485,99 @@ static swig_module_info swig_module = {s - - - #include "selinux/selinux.h" -+ #include "selinux/get_context_list.h" -+ -+ -+SWIGINTERN swig_type_info* -+SWIG_pchar_descriptor(void) -+{ -+ static int init = 0; -+ static swig_type_info* info = 0; -+ if (!init) { -+ info = SWIG_TypeQuery("_p_char"); -+ init = 1; -+ } -+ return info; -+} -+ -+ -+SWIGINTERNINLINE PyObject * -+SWIG_FromCharPtrAndSize(const char* carray, size_t size) -+{ -+ if (carray) { -+ if (size > INT_MAX) { -+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); -+ return pchar_descriptor ? -+ SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); -+ } else { -+ return PyString_FromStringAndSize(carray, (int)(size)); -+ } -+ } else { -+ return SWIG_Py_Void(); -+ } -+} -+ -+ -+SWIGINTERNINLINE PyObject * -+SWIG_FromCharPtr(const char *cptr) -+{ -+ return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); -+} -+ -+ -+SWIGINTERN int -+SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) -+{ -+ if (PyString_Check(obj)) { -+ char *cstr; Py_ssize_t len; -+ PyString_AsStringAndSize(obj, &cstr, &len); -+ if (cptr) { -+ if (alloc) { -+ /* -+ In python the user should not be able to modify the inner -+ string representation. To warranty that, if you define -+ SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string -+ buffer is always returned. -+ -+ The default behavior is just to return the pointer value, -+ so, be careful. -+ */ -+#if defined(SWIG_PYTHON_SAFE_CSTRINGS) -+ if (*alloc != SWIG_OLDOBJ) -+#else -+ if (*alloc == SWIG_NEWOBJ) -+#endif -+ { -+ *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); -+ *alloc = SWIG_NEWOBJ; -+ } -+ else { -+ *cptr = cstr; -+ *alloc = SWIG_OLDOBJ; -+ } -+ } else { -+ *cptr = PyString_AsString(obj); -+ } -+ } -+ if (psize) *psize = len + 1; -+ return SWIG_OK; -+ } else { -+ swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); -+ if (pchar_descriptor) { -+ void* vptr = 0; -+ if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { -+ if (cptr) *cptr = (char *) vptr; -+ if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; -+ if (alloc) *alloc = SWIG_OLDOBJ; -+ return SWIG_OK; -+ } -+ } -+ } -+ return SWIG_TypeError; -+} -+ -+ -+ - - - #define SWIG_From_long PyInt_FromLong -@@ -2644,74 +2737,6 @@ SWIG_AsVal_int (PyObject * obj, int *val - } - - --SWIGINTERN swig_type_info* --SWIG_pchar_descriptor(void) --{ -- static int init = 0; -- static swig_type_info* info = 0; -- if (!init) { -- info = SWIG_TypeQuery("_p_char"); -- init = 1; -- } -- return info; --} -- -- --SWIGINTERN int --SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc) --{ -- if (PyString_Check(obj)) { -- char *cstr; Py_ssize_t len; -- PyString_AsStringAndSize(obj, &cstr, &len); -- if (cptr) { -- if (alloc) { -- /* -- In python the user should not be able to modify the inner -- string representation. To warranty that, if you define -- SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string -- buffer is always returned. -- -- The default behavior is just to return the pointer value, -- so, be careful. -- */ --#if defined(SWIG_PYTHON_SAFE_CSTRINGS) -- if (*alloc != SWIG_OLDOBJ) --#else -- if (*alloc == SWIG_NEWOBJ) --#endif -- { -- *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1)); -- *alloc = SWIG_NEWOBJ; -- } -- else { -- *cptr = cstr; -- *alloc = SWIG_OLDOBJ; -- } -- } else { -- *cptr = PyString_AsString(obj); -- } -- } -- if (psize) *psize = len + 1; -- return SWIG_OK; -- } else { -- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); -- if (pchar_descriptor) { -- void* vptr = 0; -- if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { -- if (cptr) *cptr = (char *) vptr; -- if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0; -- if (alloc) *alloc = SWIG_OLDOBJ; -- return SWIG_OK; -- } -- } -- } -- return SWIG_TypeError; --} -- -- -- -- -- - SWIGINTERN int - SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) - { -@@ -2781,33 +2806,396 @@ SWIG_AsVal_unsigned_SS_int (PyObject * o - return res; - } - -+#ifdef __cplusplus -+extern "C" { -+#endif -+SWIGINTERN PyObject *_wrap_get_ordered_context_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ security_context_t arg2 ; -+ security_context_t **arg3 = (security_context_t **) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ void *argp3 = 0 ; -+ int res3 = 0 ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)"OOO:get_ordered_context_list",&obj0,&obj1,&obj2)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_ordered_context_list" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ { -+ arg2 = (security_context_t)PyString_AsString(obj1); -+ } -+ res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_security_context_t, 0 | 0 ); -+ if (!SWIG_IsOK(res3)) { -+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_ordered_context_list" "', argument " "3"" of type '" "security_context_t **""'"); -+ } -+ arg3 = (security_context_t **)(argp3); -+ result = (int)get_ordered_context_list((char const *)arg1,arg2,arg3); -+ resultobj = SWIG_From_int((int)(result)); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_get_ordered_context_list_with_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ char *arg2 = (char *) 0 ; -+ security_context_t arg3 ; -+ security_context_t **arg4 = (security_context_t **) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ void *argp4 = 0 ; -+ int res4 = 0 ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ PyObject * obj3 = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)"OOOO:get_ordered_context_list_with_level",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_ordered_context_list_with_level" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_ordered_context_list_with_level" "', argument " "2"" of type '" "char const *""'"); -+ } -+ arg2 = (char *)(buf2); -+ { -+ arg3 = (security_context_t)PyString_AsString(obj2); -+ } -+ res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_security_context_t, 0 | 0 ); -+ if (!SWIG_IsOK(res4)) { -+ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "get_ordered_context_list_with_level" "', argument " "4"" of type '" "security_context_t **""'"); -+ } -+ arg4 = (security_context_t **)(argp4); -+ result = (int)get_ordered_context_list_with_level((char const *)arg1,(char const *)arg2,arg3,arg4); -+ resultobj = SWIG_From_int((int)(result)); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_get_default_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ security_context_t arg2 ; -+ security_context_t *arg3 = (security_context_t *) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ security_context_t temp3 = NULL ; -+ char *temp30 = NULL ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ -+ { -+ arg3 = &temp3; -+ } -+ if (!PyArg_ParseTuple(args,(char *)"OO:get_default_context",&obj0,&obj1)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ { -+ arg2 = (security_context_t)PyString_AsString(obj1); -+ } -+ result = (int)get_default_context((char const *)arg1,arg2,arg3); -+ resultobj = SWIG_From_int((int)(result)); -+ { -+ if (*arg3) -+ temp30 = *arg3; -+ else -+ temp30 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp30)); -+ } -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_get_default_context_with_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ char *arg2 = (char *) 0 ; -+ security_context_t arg3 ; -+ security_context_t *arg4 = (security_context_t *) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ security_context_t temp4 = NULL ; -+ char *temp40 = NULL ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ -+ { -+ arg4 = &temp4; -+ } -+ if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_level",&obj0,&obj1,&obj2)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_level" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_level" "', argument " "2"" of type '" "char const *""'"); -+ } -+ arg2 = (char *)(buf2); -+ { -+ arg3 = (security_context_t)PyString_AsString(obj2); -+ } -+ result = (int)get_default_context_with_level((char const *)arg1,(char const *)arg2,arg3,arg4); -+ resultobj = SWIG_From_int((int)(result)); -+ { -+ if (*arg4) -+ temp40 = *arg4; -+ else -+ temp40 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp40)); -+ } -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_get_default_context_with_role(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ char *arg2 = (char *) 0 ; -+ security_context_t arg3 ; -+ security_context_t *arg4 = (security_context_t *) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ security_context_t temp4 = NULL ; -+ char *temp40 = NULL ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ -+ { -+ arg4 = &temp4; -+ } -+ if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_role",&obj0,&obj1,&obj2)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_role" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_role" "', argument " "2"" of type '" "char const *""'"); -+ } -+ arg2 = (char *)(buf2); -+ { -+ arg3 = (security_context_t)PyString_AsString(obj2); -+ } -+ result = (int)get_default_context_with_role((char const *)arg1,(char const *)arg2,arg3,arg4); -+ resultobj = SWIG_From_int((int)(result)); -+ { -+ if (*arg4) -+ temp40 = *arg4; -+ else -+ temp40 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp40)); -+ } -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_get_default_context_with_rolelevel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ char *arg2 = (char *) 0 ; -+ char *arg3 = (char *) 0 ; -+ security_context_t arg4 ; -+ security_context_t *arg5 = (security_context_t *) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ int res3 ; -+ char *buf3 = 0 ; -+ int alloc3 = 0 ; -+ security_context_t temp5 = NULL ; -+ char *temp50 = NULL ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ PyObject * obj2 = 0 ; -+ PyObject * obj3 = 0 ; -+ -+ { -+ arg5 = &temp5; -+ } -+ if (!PyArg_ParseTuple(args,(char *)"OOOO:get_default_context_with_rolelevel",&obj0,&obj1,&obj2,&obj3)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_default_context_with_rolelevel" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "get_default_context_with_rolelevel" "', argument " "2"" of type '" "char const *""'"); -+ } -+ arg2 = (char *)(buf2); -+ res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3); -+ if (!SWIG_IsOK(res3)) { -+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "get_default_context_with_rolelevel" "', argument " "3"" of type '" "char const *""'"); -+ } -+ arg3 = (char *)(buf3); -+ { -+ arg4 = (security_context_t)PyString_AsString(obj3); -+ } -+ result = (int)get_default_context_with_rolelevel((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5); -+ resultobj = SWIG_From_int((int)(result)); -+ { -+ if (*arg5) -+ temp50 = *arg5; -+ else -+ temp50 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp50)); -+ } -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_query_user_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ security_context_t *arg1 = (security_context_t *) 0 ; -+ security_context_t *arg2 = (security_context_t *) 0 ; -+ int result; -+ security_context_t temp1 = NULL ; -+ security_context_t temp2 = NULL ; -+ char *temp10 = NULL ; -+ char *temp20 = NULL ; -+ -+ { -+ arg1 = &temp1; -+ } -+ { -+ arg2 = &temp2; -+ } -+ if (!PyArg_ParseTuple(args,(char *)":query_user_context")) SWIG_fail; -+ result = (int)query_user_context(arg1,arg2); -+ resultobj = SWIG_From_int((int)(result)); -+ { -+ if (*arg1) -+ temp10 = *arg1; -+ else -+ temp10 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp10)); -+ } -+ { -+ if (*arg2) -+ temp20 = *arg2; -+ else -+ temp20 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp20)); -+ } -+ return resultobj; -+fail: -+ return NULL; -+} -+ - --SWIGINTERNINLINE PyObject * --SWIG_FromCharPtrAndSize(const char* carray, size_t size) --{ -- if (carray) { -- if (size > INT_MAX) { -- swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); -- return pchar_descriptor ? -- SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void(); -- } else { -- return PyString_FromStringAndSize(carray, (int)(size)); -- } -- } else { -- return SWIG_Py_Void(); -+SWIGINTERN PyObject *_wrap_manual_user_enter_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ security_context_t *arg2 = (security_context_t *) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ security_context_t temp2 = NULL ; -+ char *temp20 = NULL ; -+ PyObject * obj0 = 0 ; -+ -+ { -+ arg2 = &temp2; -+ } -+ if (!PyArg_ParseTuple(args,(char *)"O:manual_user_enter_context",&obj0)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "manual_user_enter_context" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ result = (int)manual_user_enter_context((char const *)arg1,arg2); -+ resultobj = SWIG_From_int((int)(result)); -+ { -+ if (*arg2) -+ temp20 = *arg2; -+ else -+ temp20 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp20)); - } -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return NULL; - } - - --SWIGINTERNINLINE PyObject * --SWIG_FromCharPtr(const char *cptr) --{ -- return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); --} -- --#ifdef __cplusplus --extern "C" { --#endif - SWIGINTERN PyObject *_wrap_is_selinux_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - int result; -@@ -2834,6 +3222,48 @@ fail: - } - - -+SWIGINTERN PyObject *_wrap_freecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ security_context_t arg1 ; -+ PyObject * obj0 = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)"O:freecon",&obj0)) SWIG_fail; -+ { -+ arg1 = (security_context_t)PyString_AsString(obj0); -+ } -+ freecon(arg1); -+ resultobj = SWIG_Py_Void(); -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_freeconary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ security_context_t *arg1 = (security_context_t *) 0 ; -+ security_context_t temp1 = NULL ; -+ char *temp10 = NULL ; -+ -+ { -+ arg1 = &temp1; -+ } -+ if (!PyArg_ParseTuple(args,(char *)":freeconary")) SWIG_fail; -+ freeconary(arg1); -+ resultobj = SWIG_Py_Void(); -+ { -+ if (*arg1) -+ temp10 = *arg1; -+ else -+ temp10 = ""; -+ resultobj = SWIG_Python_AppendOutput(resultobj, PyString_FromString(temp10)); -+ } -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ - SWIGINTERN PyObject *_wrap_getcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - security_context_t *arg1 = (security_context_t *) 0 ; -@@ -3777,6 +4207,55 @@ fail: - } - - -+SWIGINTERN PyObject *_wrap_matchpathcon_init_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ char *arg2 = (char *) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ int res2 ; -+ char *buf2 = 0 ; -+ int alloc2 = 0 ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_init_prefix",&obj0,&obj1)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "matchpathcon_init_prefix" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); -+ if (!SWIG_IsOK(res2)) { -+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "matchpathcon_init_prefix" "', argument " "2"" of type '" "char const *""'"); -+ } -+ arg2 = (char *)(buf2); -+ result = (int)matchpathcon_init_prefix((char const *)arg1,(char const *)arg2); -+ resultobj = SWIG_From_int((int)(result)); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_matchpathcon_fini(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ -+ if (!PyArg_ParseTuple(args,(char *)":matchpathcon_fini")) SWIG_fail; -+ matchpathcon_fini(); -+ resultobj = SWIG_Py_Void(); -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ - SWIGINTERN PyObject *_wrap_matchmediacon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *arg1 = (char *) 0 ; -@@ -3994,6 +4473,19 @@ fail: - } - - -+SWIGINTERN PyObject *_wrap_selinux_securetty_types_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *result = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)":selinux_securetty_types_path")) SWIG_fail; -+ result = (char *)selinux_securetty_types_path(); -+ resultobj = SWIG_FromCharPtr((const char *)result); -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ - SWIGINTERN PyObject *_wrap_selinux_booleans_path(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; - char *result = 0 ; -@@ -4085,27 +4577,17 @@ fail: - } - - --SWIGINTERN PyObject *_wrap_selinux_check_passwd_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_selinux_check_securetty_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- access_vector_t arg1 ; -+ security_context_t arg1 ; - int result; -- void *argp1 ; -- int res1 = 0 ; - PyObject * obj0 = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_passwd_access",&obj0)) SWIG_fail; -+ if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_securetty_context",&obj0)) SWIG_fail; - { -- res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_access_vector_t, 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_check_passwd_access" "', argument " "1"" of type '" "access_vector_t""'"); -- } -- if (!argp1) { -- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "selinux_check_passwd_access" "', argument " "1"" of type '" "access_vector_t""'"); -- } else { -- arg1 = *((access_vector_t *)(argp1)); -- } -+ arg1 = (security_context_t)PyString_AsString(obj0); - } -- result = (int)selinux_check_passwd_access(arg1); -+ result = (int)selinux_check_securetty_context(arg1); - resultobj = SWIG_From_int((int)(result)); - return resultobj; - fail: -@@ -4113,30 +4595,26 @@ fail: - } - - --SWIGINTERN PyObject *_wrap_checkPasswdAccess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+SWIGINTERN PyObject *_wrap_set_selinuxmnt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { - PyObject *resultobj = 0; -- access_vector_t arg1 ; -- int result; -- void *argp1 ; -- int res1 = 0 ; -+ char *arg1 = (char *) 0 ; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; - PyObject * obj0 = 0 ; - -- if (!PyArg_ParseTuple(args,(char *)"O:checkPasswdAccess",&obj0)) SWIG_fail; -- { -- res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_access_vector_t, 0 ); -- if (!SWIG_IsOK(res1)) { -- SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "checkPasswdAccess" "', argument " "1"" of type '" "access_vector_t""'"); -- } -- if (!argp1) { -- SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "checkPasswdAccess" "', argument " "1"" of type '" "access_vector_t""'"); -- } else { -- arg1 = *((access_vector_t *)(argp1)); -- } -+ if (!PyArg_ParseTuple(args,(char *)"O:set_selinuxmnt",&obj0)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_selinuxmnt" "', argument " "1"" of type '" "char *""'"); - } -- result = (int)checkPasswdAccess(arg1); -- resultobj = SWIG_From_int((int)(result)); -+ arg1 = (char *)(buf1); -+ set_selinuxmnt(arg1); -+ resultobj = SWIG_Py_Void(); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return resultobj; - fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); - return NULL; - } - -@@ -4153,6 +4631,10 @@ SWIGINTERN PyObject *_wrap_rpm_execcon(P - int res2 ; - char *buf2 = 0 ; - int alloc2 = 0 ; -+ void *argp3 = 0 ; -+ int res3 = 0 ; -+ void *argp4 = 0 ; -+ int res4 = 0 ; - PyObject * obj0 = 0 ; - PyObject * obj1 = 0 ; - PyObject * obj2 = 0 ; -@@ -4169,58 +4651,16 @@ SWIGINTERN PyObject *_wrap_rpm_execcon(P - SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rpm_execcon" "', argument " "2"" of type '" "char const *""'"); - } - arg2 = (char *)(buf2); -- { -- /* Check if is a list */ -- if (PyList_Check(obj2)) { -- int size = PyList_Size(obj2); -- int i = 0; -- arg3 = (char **) malloc((size+1)*sizeof(char *)); -- if (arg3 == NULL) { -- PyErr_SetString(PyExc_MemoryError,"Out of memory"); -- return NULL; -- } -- for (i = 0; i < size; i++) { -- PyObject *o = PyList_GetItem(obj2,i); -- if (PyString_Check(o)) -- arg3[i] = PyString_AsString(PyList_GetItem(obj2,i)); -- else { -- PyErr_SetString(PyExc_TypeError,"list must contain strings"); -- free(arg3); -- return NULL; -- } -- } -- arg3[i] = 0; -- } else { -- PyErr_SetString(PyExc_TypeError,"not a list"); -- return NULL; -- } -- } -- { -- /* Check if is a list */ -- if (PyList_Check(obj3)) { -- int size = PyList_Size(obj3); -- int i = 0; -- arg4 = (char **) malloc((size+1)*sizeof(char *)); -- if (arg4 == NULL) { -- PyErr_SetString(PyExc_MemoryError,"Out of memory"); -- return NULL; -- } -- for (i = 0; i < size; i++) { -- PyObject *o = PyList_GetItem(obj3,i); -- if (PyString_Check(o)) -- arg4[i] = PyString_AsString(PyList_GetItem(obj3,i)); -- else { -- PyErr_SetString(PyExc_TypeError,"list must contain strings"); -- free(arg4); -- return NULL; -- } -- } -- arg4[i] = 0; -- } else { -- PyErr_SetString(PyExc_TypeError,"not a list"); -- return NULL; -- } -+ res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_char, 0 | 0 ); -+ if (!SWIG_IsOK(res3)) { -+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rpm_execcon" "', argument " "3"" of type '" "char **""'"); -+ } -+ arg3 = (char **)(argp3); -+ res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_char, 0 | 0 ); -+ if (!SWIG_IsOK(res4)) { -+ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rpm_execcon" "', argument " "4"" of type '" "char **""'"); - } -+ arg4 = (char **)(argp4); - result = (int)rpm_execcon(arg1,(char const *)arg2,arg3,arg4); - resultobj = SWIG_From_int((int)(result)); - if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); -@@ -4387,9 +4827,101 @@ fail: - } - - -+SWIGINTERN PyObject *_wrap_selinux_file_context_cmp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ security_context_t arg1 ; -+ security_context_t arg2 ; -+ int result; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_cmp",&obj0,&obj1)) SWIG_fail; -+ { -+ arg1 = (security_context_t)PyString_AsString(obj0); -+ } -+ { -+ arg2 = (security_context_t)PyString_AsString(obj1); -+ } -+ result = (int)selinux_file_context_cmp(arg1,arg2); -+ resultobj = SWIG_From_int((int)(result)); -+ return resultobj; -+fail: -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_selinux_file_context_verify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ mode_t arg2 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ unsigned int val2 ; -+ int ecode2 = 0 ; -+ PyObject * obj0 = 0 ; -+ PyObject * obj1 = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_verify",&obj0,&obj1)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_file_context_verify" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2); -+ if (!SWIG_IsOK(ecode2)) { -+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "selinux_file_context_verify" "', argument " "2"" of type '" "mode_t""'"); -+ } -+ arg2 = (mode_t)(val2); -+ result = (int)selinux_file_context_verify((char const *)arg1,arg2); -+ resultobj = SWIG_From_int((int)(result)); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return NULL; -+} -+ -+ -+SWIGINTERN PyObject *_wrap_selinux_lsetfilecon_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { -+ PyObject *resultobj = 0; -+ char *arg1 = (char *) 0 ; -+ int result; -+ int res1 ; -+ char *buf1 = 0 ; -+ int alloc1 = 0 ; -+ PyObject * obj0 = 0 ; -+ -+ if (!PyArg_ParseTuple(args,(char *)"O:selinux_lsetfilecon_default",&obj0)) SWIG_fail; -+ res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1); -+ if (!SWIG_IsOK(res1)) { -+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "selinux_lsetfilecon_default" "', argument " "1"" of type '" "char const *""'"); -+ } -+ arg1 = (char *)(buf1); -+ result = (int)selinux_lsetfilecon_default((char const *)arg1); -+ resultobj = SWIG_From_int((int)(result)); -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return resultobj; -+fail: -+ if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); -+ return NULL; -+} -+ -+ - static PyMethodDef SwigMethods[] = { -+ { (char *)"get_ordered_context_list", _wrap_get_ordered_context_list, METH_VARARGS, NULL}, -+ { (char *)"get_ordered_context_list_with_level", _wrap_get_ordered_context_list_with_level, METH_VARARGS, NULL}, -+ { (char *)"get_default_context", _wrap_get_default_context, METH_VARARGS, NULL}, -+ { (char *)"get_default_context_with_level", _wrap_get_default_context_with_level, METH_VARARGS, NULL}, -+ { (char *)"get_default_context_with_role", _wrap_get_default_context_with_role, METH_VARARGS, NULL}, -+ { (char *)"get_default_context_with_rolelevel", _wrap_get_default_context_with_rolelevel, METH_VARARGS, NULL}, -+ { (char *)"query_user_context", _wrap_query_user_context, METH_VARARGS, NULL}, -+ { (char *)"manual_user_enter_context", _wrap_manual_user_enter_context, METH_VARARGS, NULL}, - { (char *)"is_selinux_enabled", _wrap_is_selinux_enabled, METH_VARARGS, NULL}, - { (char *)"is_selinux_mls_enabled", _wrap_is_selinux_mls_enabled, METH_VARARGS, NULL}, -+ { (char *)"freecon", _wrap_freecon, METH_VARARGS, NULL}, -+ { (char *)"freeconary", _wrap_freeconary, METH_VARARGS, NULL}, - { (char *)"getcon", _wrap_getcon, METH_VARARGS, NULL}, - { (char *)"setcon", _wrap_setcon, METH_VARARGS, NULL}, - { (char *)"getpidcon", _wrap_getpidcon, METH_VARARGS, NULL}, -@@ -4426,6 +4958,8 @@ static PyMethodDef SwigMethods[] = { - { (char *)"set_matchpathcon_flags", _wrap_set_matchpathcon_flags, METH_VARARGS, NULL}, - { (char *)"matchpathcon_init", _wrap_matchpathcon_init, METH_VARARGS, NULL}, - { (char *)"matchpathcon", _wrap_matchpathcon, METH_VARARGS, NULL}, -+ { (char *)"matchpathcon_init_prefix", _wrap_matchpathcon_init_prefix, METH_VARARGS, NULL}, -+ { (char *)"matchpathcon_fini", _wrap_matchpathcon_fini, METH_VARARGS, NULL}, - { (char *)"matchmediacon", _wrap_matchmediacon, METH_VARARGS, NULL}, - { (char *)"selinux_getenforcemode", _wrap_selinux_getenforcemode, METH_VARARGS, NULL}, - { (char *)"selinux_policy_root", _wrap_selinux_policy_root, METH_VARARGS, NULL}, -@@ -4440,6 +4974,7 @@ static PyMethodDef SwigMethods[] = { - { (char *)"selinux_homedir_context_path", _wrap_selinux_homedir_context_path, METH_VARARGS, NULL}, - { (char *)"selinux_media_context_path", _wrap_selinux_media_context_path, METH_VARARGS, NULL}, - { (char *)"selinux_contexts_path", _wrap_selinux_contexts_path, METH_VARARGS, NULL}, -+ { (char *)"selinux_securetty_types_path", _wrap_selinux_securetty_types_path, METH_VARARGS, NULL}, - { (char *)"selinux_booleans_path", _wrap_selinux_booleans_path, METH_VARARGS, NULL}, - { (char *)"selinux_customizable_types_path", _wrap_selinux_customizable_types_path, METH_VARARGS, NULL}, - { (char *)"selinux_users_path", _wrap_selinux_users_path, METH_VARARGS, NULL}, -@@ -4447,14 +4982,17 @@ static PyMethodDef SwigMethods[] = { - { (char *)"selinux_translations_path", _wrap_selinux_translations_path, METH_VARARGS, NULL}, - { (char *)"selinux_netfilter_context_path", _wrap_selinux_netfilter_context_path, METH_VARARGS, NULL}, - { (char *)"selinux_path", _wrap_selinux_path, METH_VARARGS, NULL}, -- { (char *)"selinux_check_passwd_access", _wrap_selinux_check_passwd_access, METH_VARARGS, NULL}, -- { (char *)"checkPasswdAccess", _wrap_checkPasswdAccess, METH_VARARGS, NULL}, -+ { (char *)"selinux_check_securetty_context", _wrap_selinux_check_securetty_context, METH_VARARGS, NULL}, -+ { (char *)"set_selinuxmnt", _wrap_set_selinuxmnt, METH_VARARGS, NULL}, - { (char *)"rpm_execcon", _wrap_rpm_execcon, METH_VARARGS, NULL}, - { (char *)"is_context_customizable", _wrap_is_context_customizable, METH_VARARGS, NULL}, - { (char *)"selinux_trans_to_raw_context", _wrap_selinux_trans_to_raw_context, METH_VARARGS, NULL}, - { (char *)"selinux_raw_to_trans_context", _wrap_selinux_raw_to_trans_context, METH_VARARGS, NULL}, - { (char *)"selinux_getpolicytype", _wrap_selinux_getpolicytype, METH_VARARGS, NULL}, - { (char *)"getseuserbyname", _wrap_getseuserbyname, METH_VARARGS, NULL}, -+ { (char *)"selinux_file_context_cmp", _wrap_selinux_file_context_cmp, METH_VARARGS, NULL}, -+ { (char *)"selinux_file_context_verify", _wrap_selinux_file_context_verify, METH_VARARGS, NULL}, -+ { (char *)"selinux_lsetfilecon_default", _wrap_selinux_lsetfilecon_default, METH_VARARGS, NULL}, - { NULL, NULL, 0, NULL } - }; - -@@ -4462,41 +5000,41 @@ static PyMethodDef SwigMethods[] = { - /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ - - static swig_type_info _swigt__p_SELboolean = {"_p_SELboolean", "SELboolean *", 0, 0, (void*)0, 0}; --static swig_type_info _swigt__p_access_vector_t = {"_p_access_vector_t", "access_vector_t *", 0, 0, (void*)0, 0}; - static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; - static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; - static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; - static swig_type_info _swigt__p_p_p_char = {"_p_p_p_char", "char ***", 0, 0, (void*)0, 0}; -+static swig_type_info _swigt__p_p_security_context_t = {"_p_p_security_context_t", "security_context_t **", 0, 0, (void*)0, 0}; - static swig_type_info _swigt__p_security_context_t = {"_p_security_context_t", "security_context_t *", 0, 0, (void*)0, 0}; - static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|mode_t *", 0, 0, (void*)0, 0}; - - static swig_type_info *swig_type_initial[] = { - &_swigt__p_SELboolean, -- &_swigt__p_access_vector_t, - &_swigt__p_char, - &_swigt__p_int, - &_swigt__p_p_char, - &_swigt__p_p_p_char, -+ &_swigt__p_p_security_context_t, - &_swigt__p_security_context_t, - &_swigt__p_unsigned_int, - }; - - static swig_cast_info _swigc__p_SELboolean[] = { {&_swigt__p_SELboolean, 0, 0, 0},{0, 0, 0, 0}}; --static swig_cast_info _swigc__p_access_vector_t[] = { {&_swigt__p_access_vector_t, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info _swigc__p_p_p_char[] = { {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}}; -+static swig_cast_info _swigc__p_p_security_context_t[] = { {&_swigt__p_p_security_context_t, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info _swigc__p_security_context_t[] = { {&_swigt__p_security_context_t, 0, 0, 0},{0, 0, 0, 0}}; - static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; - - static swig_cast_info *swig_cast_initial[] = { - _swigc__p_SELboolean, -- _swigc__p_access_vector_t, - _swigc__p_char, - _swigc__p_int, - _swigc__p_p_char, - _swigc__p_p_p_char, -+ _swigc__p_p_security_context_t, - _swigc__p_security_context_t, - _swigc__p_unsigned_int, - }; -@@ -5019,6 +5557,7 @@ SWIGEXPORT void SWIG_init(void) { - SWIG_InstallConstants(d,swig_const_table); - - -+ SWIG_Python_SetConstant(d, "SELINUX_DEFAULTUSER",SWIG_FromCharPtr("user_u")); - SWIG_Python_SetConstant(d, "MATCHPATHCON_BASEONLY",SWIG_From_int((int)(1))); - SWIG_Python_SetConstant(d, "MATCHPATHCON_NOTRANS",SWIG_From_int((int)(2))); - } diff -up libselinux-2.0.14/src/selinuxswig.i.rhat libselinux-2.0.14/src/selinuxswig.i --- libselinux-2.0.14/src/selinuxswig.i.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/src/selinuxswig.i 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/src/selinuxswig.i 2007-09-07 09:21:26.000000000 -0400 @@ -21,6 +21,7 @@ %module selinux %{ @@ -1139,10 +50,10 @@ diff -up libselinux-2.0.14/src/selinuxswig.i.rhat libselinux-2.0.14/src/selinuxs -extern int checkPasswdAccess(access_vector_t requested); +#extern int selinux_check_passwd_access(access_vector_t requested); +#extern int checkPasswdAccess(access_vector_t requested); - ++ +extern int selinux_check_securetty_context(security_context_t tty_context); +void set_selinuxmnt(char *mnt); -+ + +#ifdef SWIGpython // This tells SWIG to treat char ** as a special case -%typemap(python,in) char ** { @@ -1150,15 +61,59 @@ diff -up libselinux-2.0.14/src/selinuxswig.i.rhat libselinux-2.0.14/src/selinuxs /* Check if is a list */ if (PyList_Check($input)) { int size = PyList_Size($input); -@@ -143,6 +158,7 @@ extern int checkPasswdAccess(access_vect +@@ -143,10 +158,48 @@ extern int checkPasswdAccess(access_vect return NULL; } } +#endif - extern int rpm_execcon(unsigned int verified, - const char *filename, -@@ -164,3 +180,7 @@ extern int selinux_raw_to_trans_context( +-extern int rpm_execcon(unsigned int verified, +- const char *filename, +- char **, char **); ++%typemap(in) char * const [] { ++ int i, size; ++ PyObject * s; ++ ++ if (!PySequence_Check($input)) { ++ PyErr_SetString(PyExc_ValueError, "Expected a sequence"); ++ return NULL; ++ } ++ ++ size = PySequence_Size($input); ++ ++ $1 = (char**) malloc(size + 1); ++ ++ for(i = 0; i < size; i++) { ++ if (!PyString_Check(PySequence_GetItem($input, i))) { ++ PyErr_SetString(PyExc_ValueError, "Sequence must contain only strings"); ++ return NULL; ++ } ++ } ++ ++ for(i = 0; i < size; i++) { ++ s = PySequence_GetItem($input, i); ++ $1[i] = (char*) malloc(PyString_Size(s) + 1); ++ strcpy($1[i], PyString_AsString(s)); ++ } ++ $1[size] = NULL; ++} ++ ++%typemap(freearg,match="in") char * const [] { ++ int i = 0; ++ while($1[i]) { ++ free($1[i]); ++ i++; ++ } ++ free($1); ++} ++ ++extern int rpm_execcon(unsigned int verified, ++ const char *filename, ++ char *const argv[], char *const envp[]); + + extern int is_context_customizable (security_context_t scontext); + +@@ -164,3 +217,7 @@ extern int selinux_raw_to_trans_context( } extern int selinux_getpolicytype(char **enforce); extern int getseuserbyname(const char *linuxuser, char **seuser, char **level); @@ -1168,7 +123,7 @@ diff -up libselinux-2.0.14/src/selinuxswig.i.rhat libselinux-2.0.14/src/selinuxs +int selinux_lsetfilecon_default(const char *path); diff -up libselinux-2.0.14/src/selinux.py.rhat libselinux-2.0.14/src/selinux.py --- libselinux-2.0.14/src/selinux.py.rhat 2007-04-24 10:36:20.000000000 -0400 -+++ libselinux-2.0.14/src/selinux.py 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/src/selinux.py 2007-09-07 09:17:52.000000000 -0400 @@ -48,8 +48,19 @@ except AttributeError: del types @@ -1226,8 +181,8 @@ diff -up libselinux-2.0.14/src/selinux.py.rhat libselinux-2.0.14/src/selinux.py diff -up libselinux-2.0.14/include/selinux/flask.h.rhat libselinux-2.0.14/include/selinux/flask.h ---- libselinux-2.0.14/include/selinux/flask.h.rhat 2007-07-11 12:02:16.000000000 -0400 -+++ libselinux-2.0.14/include/selinux/flask.h 2007-07-11 12:02:23.000000000 -0400 +--- libselinux-2.0.14/include/selinux/flask.h.rhat 2007-04-24 10:36:21.000000000 -0400 ++++ libselinux-2.0.14/include/selinux/flask.h 2007-09-07 09:17:52.000000000 -0400 @@ -64,6 +64,8 @@ #define SECCLASS_PACKET 57 #define SECCLASS_KEY 58 @@ -1238,8 +193,8 @@ diff -up libselinux-2.0.14/include/selinux/flask.h.rhat libselinux-2.0.14/includ /* * Security identifier indices for initial entities diff -up libselinux-2.0.14/include/selinux/av_permissions.h.rhat libselinux-2.0.14/include/selinux/av_permissions.h ---- libselinux-2.0.14/include/selinux/av_permissions.h.rhat 2007-07-11 12:02:07.000000000 -0400 -+++ libselinux-2.0.14/include/selinux/av_permissions.h 2007-07-11 12:02:09.000000000 -0400 +--- libselinux-2.0.14/include/selinux/av_permissions.h.rhat 2007-04-24 10:36:21.000000000 -0400 ++++ libselinux-2.0.14/include/selinux/av_permissions.h 2007-09-07 09:17:52.000000000 -0400 @@ -290,12 +290,16 @@ #define NODE__RAWIP_RECV 0x00000010UL #define NODE__RAWIP_SEND 0x00000020UL @@ -1297,7 +252,7 @@ diff -up libselinux-2.0.14/include/selinux/av_permissions.h.rhat libselinux-2.0. +#define MEMPROTECT__MMAP_ZERO 0x00000001UL diff -up libselinux-2.0.14/man/man8/selinux.8.rhat libselinux-2.0.14/man/man8/selinux.8 --- libselinux-2.0.14/man/man8/selinux.8.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man8/selinux.8 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man8/selinux.8 2007-09-07 09:17:52.000000000 -0400 @@ -62,14 +62,13 @@ compile-time tunable options and a set o .B system-config-securitylevel allows customization of these booleans and tunables. @@ -1316,7 +271,7 @@ diff -up libselinux-2.0.14/man/man8/selinux.8.rhat libselinux-2.0.14/man/man8/se .SH AUTHOR diff -up libselinux-2.0.14/man/man8/matchpathcon.8.rhat libselinux-2.0.14/man/man8/matchpathcon.8 --- libselinux-2.0.14/man/man8/matchpathcon.8.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man8/matchpathcon.8 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man8/matchpathcon.8 2007-09-07 09:17:52.000000000 -0400 @@ -10,16 +10,16 @@ Prints the file path and the default sec .SH OPTIONS .B \-n @@ -1340,7 +295,7 @@ diff -up libselinux-2.0.14/man/man8/matchpathcon.8.rhat libselinux-2.0.14/man/ma diff -up libselinux-2.0.14/man/man3/avc_compute_create.3.rhat libselinux-2.0.14/man/man3/avc_compute_create.3 --- libselinux-2.0.14/man/man3/avc_compute_create.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/avc_compute_create.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/avc_compute_create.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,7 +6,7 @@ avc_compute_create \- obtain SELinux label for new object. .SH "SYNOPSIS" @@ -1352,7 +307,7 @@ diff -up libselinux-2.0.14/man/man3/avc_compute_create.3.rhat libselinux-2.0.14/ .BI "int avc_compute_create(security_id_t " ssid ", security_id_t " tsid , diff -up libselinux-2.0.14/man/man3/getexeccon.3.rhat libselinux-2.0.14/man/man3/getexeccon.3 --- libselinux-2.0.14/man/man3/getexeccon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/getexeccon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/getexeccon.3 2007-09-07 09:17:52.000000000 -0400 @@ -1,16 +1,16 @@ .TH "getexeccon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -1395,7 +350,7 @@ diff -up libselinux-2.0.14/man/man3/getexeccon.3.rhat libselinux-2.0.14/man/man3 runs a helper for rpm in an appropriate security context. The diff -up libselinux-2.0.14/man/man3/getfilecon.3.rhat libselinux-2.0.14/man/man3/getfilecon.3 --- libselinux-2.0.14/man/man3/getfilecon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/getfilecon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/getfilecon.3 2007-09-07 09:17:52.000000000 -0400 @@ -5,9 +5,9 @@ getfilecon, fgetfilecon, lgetfilecon \- .B #include .sp @@ -1418,7 +373,7 @@ diff -up libselinux-2.0.14/man/man3/getfilecon.3.rhat libselinux-2.0.14/man/man3 .SH "RETURN VALUE" diff -up libselinux-2.0.14/man/man3/selinux_binary_policy_path.3.rhat libselinux-2.0.14/man/man3/selinux_binary_policy_path.3 --- libselinux-2.0.14/man/man3/selinux_binary_policy_path.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/selinux_binary_policy_path.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/selinux_binary_policy_path.3 2007-09-07 09:17:52.000000000 -0400 @@ -10,27 +10,27 @@ directories and files. .SH "SYNOPSIS" .B #include @@ -1460,7 +415,7 @@ diff -up libselinux-2.0.14/man/man3/selinux_binary_policy_path.3.rhat libselinux diff -up libselinux-2.0.14/man/man3/security_class_to_string.3.rhat libselinux-2.0.14/man/man3/security_class_to_string.3 --- libselinux-2.0.14/man/man3/security_class_to_string.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/security_class_to_string.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/security_class_to_string.3 2007-09-07 09:17:52.000000000 -0400 @@ -8,7 +8,7 @@ between SELinux class and permission val .SH "SYNOPSIS" @@ -1472,7 +427,7 @@ diff -up libselinux-2.0.14/man/man3/security_class_to_string.3.rhat libselinux-2 .BI "const char * security_class_to_string(security_class_t " tclass ");" diff -up libselinux-2.0.14/man/man3/getfscreatecon.3.rhat libselinux-2.0.14/man/man3/getfscreatecon.3 --- libselinux-2.0.14/man/man3/getfscreatecon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/getfscreatecon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/getfscreatecon.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,7 +6,7 @@ getfscreatecon, setfscreatecon \- get or .B #include .sp @@ -1498,7 +453,7 @@ diff -up libselinux-2.0.14/man/man3/getfscreatecon.3.rhat libselinux-2.0.14/man/ save, reset, and restore the fscreate context to avoid unexpected behaviors. diff -up libselinux-2.0.14/man/man3/freecon.3.rhat libselinux-2.0.14/man/man3/freecon.3 --- libselinux-2.0.14/man/man3/freecon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/freecon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/freecon.3 2007-09-07 09:17:52.000000000 -0400 @@ -5,7 +5,7 @@ freecon, freeconary \- free memory assoc .B #include .sp @@ -1510,7 +465,7 @@ diff -up libselinux-2.0.14/man/man3/freecon.3.rhat libselinux-2.0.14/man/man3/fr .SH "DESCRIPTION" diff -up libselinux-2.0.14/man/man3/security_getenforce.3.rhat libselinux-2.0.14/man/man3/security_getenforce.3 --- libselinux-2.0.14/man/man3/security_getenforce.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/security_getenforce.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/security_getenforce.3 2007-09-07 09:17:52.000000000 -0400 @@ -5,7 +5,7 @@ security_getenforce, security_setenforce .B #include .sp @@ -1522,7 +477,7 @@ diff -up libselinux-2.0.14/man/man3/security_getenforce.3.rhat libselinux-2.0.14 .SH "DESCRIPTION" diff -up libselinux-2.0.14/man/man3/selinux_getenforcemode.3.rhat libselinux-2.0.14/man/man3/selinux_getenforcemode.3 --- libselinux-2.0.14/man/man3/selinux_getenforcemode.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/selinux_getenforcemode.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/selinux_getenforcemode.3 2007-09-07 09:17:52.000000000 -0400 @@ -5,13 +5,13 @@ selinux_getenforcemode \- get the enforc .B #include .sp @@ -1541,7 +496,7 @@ diff -up libselinux-2.0.14/man/man3/selinux_getenforcemode.3.rhat libselinux-2.0 Sets the value of enforce to -1 if SELinux should be disabled. diff -up libselinux-2.0.14/man/man3/matchmediacon.3.rhat libselinux-2.0.14/man/man3/matchmediacon.3 --- libselinux-2.0.14/man/man3/matchmediacon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/matchmediacon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/matchmediacon.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,14 +6,14 @@ matchmediacon \- get the default SELinux .B #include .sp @@ -1562,7 +517,7 @@ diff -up libselinux-2.0.14/man/man3/matchmediacon.3.rhat libselinux-2.0.14/man/m .SH "RETURN VALUE" diff -up libselinux-2.0.14/man/man3/getseuserbyname.3.rhat libselinux-2.0.14/man/man3/getseuserbyname.3 --- libselinux-2.0.14/man/man3/getseuserbyname.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/getseuserbyname.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/getseuserbyname.3 2007-09-07 09:17:52.000000000 -0400 @@ -12,7 +12,7 @@ a given Linux username. The SELinux use then be passed to other libselinux functions such as get_ordered_context_list_with_level and get_default_context_with_level. @@ -1574,7 +529,7 @@ diff -up libselinux-2.0.14/man/man3/getseuserbyname.3.rhat libselinux-2.0.14/man using free. diff -up libselinux-2.0.14/man/man3/is_context_customizable.3.rhat libselinux-2.0.14/man/man3/is_context_customizable.3 --- libselinux-2.0.14/man/man3/is_context_customizable.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/is_context_customizable.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/is_context_customizable.3 2007-09-07 09:17:52.000000000 -0400 @@ -8,7 +8,7 @@ is_context_customizable \- check whether .SH "DESCRIPTION" @@ -1586,7 +541,7 @@ diff -up libselinux-2.0.14/man/man3/is_context_customizable.3.rhat libselinux-2. diff -up libselinux-2.0.14/man/man3/security_compute_av.3.rhat libselinux-2.0.14/man/man3/security_compute_av.3 --- libselinux-2.0.14/man/man3/security_compute_av.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/security_compute_av.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/security_compute_av.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,7 +6,7 @@ the SELinux policy database in the kerne .SH "SYNOPSIS" @@ -1598,7 +553,7 @@ diff -up libselinux-2.0.14/man/man3/security_compute_av.3.rhat libselinux-2.0.14 .BI "int security_compute_av(security_context_t "scon ", security_context_t "tcon ", security_class_t "tclass ", access_vector_t "requested ", struct av_decision *" avd ); diff -up libselinux-2.0.14/man/man3/setfilecon.3.rhat libselinux-2.0.14/man/man3/setfilecon.3 --- libselinux-2.0.14/man/man3/setfilecon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/setfilecon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/setfilecon.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,9 +6,9 @@ setfilecon, fsetfilecon, lsetfilecon \- .B #include .sp @@ -1613,7 +568,7 @@ diff -up libselinux-2.0.14/man/man3/setfilecon.3.rhat libselinux-2.0.14/man/man3 .SH "DESCRIPTION" diff -up libselinux-2.0.14/man/man3/matchpathcon.3.rhat libselinux-2.0.14/man/man3/matchpathcon.3 --- libselinux-2.0.14/man/man3/matchpathcon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/matchpathcon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/matchpathcon.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,18 +6,18 @@ matchpathcon \- get the default SELinux .B #include .sp @@ -1694,7 +649,7 @@ diff -up libselinux-2.0.14/man/man3/matchpathcon.3.rhat libselinux-2.0.14/man/ma Returns 0 on success or -1 otherwise. diff -up libselinux-2.0.14/man/man3/avc_init.3.rhat libselinux-2.0.14/man/man3/avc_init.3 --- libselinux-2.0.14/man/man3/avc_init.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/avc_init.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/avc_init.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,17 +6,17 @@ avc_init, avc_destroy, avc_reset, avc_cleanup \- userspace SELinux AVC setup and teardown. .SH "SYNOPSIS" @@ -1719,7 +674,7 @@ diff -up libselinux-2.0.14/man/man3/avc_init.3.rhat libselinux-2.0.14/man/man3/a .sp diff -up libselinux-2.0.14/man/man3/security_load_booleans.3.rhat libselinux-2.0.14/man/man3/security_load_booleans.3 --- libselinux-2.0.14/man/man3/security_load_booleans.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/security_load_booleans.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/security_load_booleans.3 2007-09-07 09:17:52.000000000 -0400 @@ -7,15 +7,15 @@ security_get_boolean_pending \- routines .B #include .sp @@ -1777,7 +732,7 @@ diff -up libselinux-2.0.14/man/man3/security_load_booleans.3.rhat libselinux-2.0 .SH AUTHOR diff -up libselinux-2.0.14/man/man3/avc_add_callback.3.rhat libselinux-2.0.14/man/man3/avc_add_callback.3 --- libselinux-2.0.14/man/man3/avc_add_callback.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/avc_add_callback.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/avc_add_callback.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,26 +6,26 @@ avc_add_callback \- additional event notification for SELinux userspace object managers. .SH "SYNOPSIS" @@ -1814,7 +769,7 @@ diff -up libselinux-2.0.14/man/man3/avc_add_callback.3.rhat libselinux-2.0.14/ma .SH "DESCRIPTION" diff -up libselinux-2.0.14/man/man3/avc_has_perm.3.rhat libselinux-2.0.14/man/man3/avc_has_perm.3 --- libselinux-2.0.14/man/man3/avc_has_perm.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/avc_has_perm.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/avc_has_perm.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,7 +6,7 @@ avc_has_perm, avc_has_perm_noaudit, avc_audit, avc_entry_ref_init \- obtain and audit SELinux access decisions. .SH "SYNOPSIS" @@ -1851,7 +806,7 @@ diff -up libselinux-2.0.14/man/man3/avc_has_perm.3.rhat libselinux-2.0.14/man/ma .SH "DESCRIPTION" diff -up libselinux-2.0.14/man/man3/get_ordered_context_list.3.rhat libselinux-2.0.14/man/man3/get_ordered_context_list.3 --- libselinux-2.0.14/man/man3/get_ordered_context_list.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/get_ordered_context_list.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/get_ordered_context_list.3 2007-09-07 09:17:52.000000000 -0400 @@ -4,7 +4,7 @@ get_ordered_context_list, get_ordered_co .SH "SYNOPSIS" @@ -1863,7 +818,7 @@ diff -up libselinux-2.0.14/man/man3/get_ordered_context_list.3.rhat libselinux-2 .BI "int get_ordered_context_list(const char *" user ", security_context_t "fromcon ", security_context_t **" list ); diff -up libselinux-2.0.14/man/man3/getcon.3.rhat libselinux-2.0.14/man/man3/getcon.3 --- libselinux-2.0.14/man/man3/getcon.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/getcon.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/getcon.3 2007-09-07 09:17:52.000000000 -0400 @@ -1,21 +1,21 @@ .TH "getcon" "3" "1 January 2004" "russell@coker.com.au" "SE Linux API documentation" .SH "NAME" @@ -1894,7 +849,7 @@ diff -up libselinux-2.0.14/man/man3/getcon.3.rhat libselinux-2.0.14/man/man3/get .SH "DESCRIPTION" diff -up libselinux-2.0.14/man/man3/avc_cache_stats.3.rhat libselinux-2.0.14/man/man3/avc_cache_stats.3 --- libselinux-2.0.14/man/man3/avc_cache_stats.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/avc_cache_stats.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/avc_cache_stats.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,7 +6,7 @@ avc_cache_stats, avc_av_stats, avc_sid_stats \- obtain userspace SELinux AVC statistics. .SH "SYNOPSIS" @@ -1906,7 +861,7 @@ diff -up libselinux-2.0.14/man/man3/avc_cache_stats.3.rhat libselinux-2.0.14/man .BI "void avc_av_stats(void);" diff -up libselinux-2.0.14/man/man3/avc_context_to_sid.3.rhat libselinux-2.0.14/man/man3/avc_context_to_sid.3 --- libselinux-2.0.14/man/man3/avc_context_to_sid.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/avc_context_to_sid.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/avc_context_to_sid.3 2007-09-07 09:17:52.000000000 -0400 @@ -6,7 +6,7 @@ avc_context_to_sid, avc_sid_to_context, sidput, sidget, avc_get_initial_sid \- obtain and manipulate SELinux security ID's. .SH "SYNOPSIS" @@ -1918,7 +873,7 @@ diff -up libselinux-2.0.14/man/man3/avc_context_to_sid.3.rhat libselinux-2.0.14/ .BI "int avc_context_to_sid(security_context_t " ctx ", security_id_t *" sid ");" diff -up libselinux-2.0.14/man/man3/selinux_policy_root.3.rhat libselinux-2.0.14/man/man3/selinux_policy_root.3 --- libselinux-2.0.14/man/man3/selinux_policy_root.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/selinux_policy_root.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/selinux_policy_root.3 2007-09-07 09:17:52.000000000 -0400 @@ -5,7 +5,7 @@ selinux_policy_root \- return the path o .B #include .sp @@ -1930,7 +885,7 @@ diff -up libselinux-2.0.14/man/man3/selinux_policy_root.3.rhat libselinux-2.0.14 .B selinux_policy_root diff -up libselinux-2.0.14/man/man3/context_new.3.rhat libselinux-2.0.14/man/man3/context_new.3 --- libselinux-2.0.14/man/man3/context_new.3.rhat 2007-04-24 10:36:21.000000000 -0400 -+++ libselinux-2.0.14/man/man3/context_new.3 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/man/man3/context_new.3 2007-09-07 09:17:52.000000000 -0400 @@ -4,27 +4,27 @@ context_new, context_str, context_free, .SH "SYNOPSIS" @@ -1972,7 +927,7 @@ diff -up libselinux-2.0.14/man/man3/context_new.3.rhat libselinux-2.0.14/man/man .SH "DESCRIPTION" diff -up libselinux-2.0.14/Makefile.rhat libselinux-2.0.14/Makefile --- libselinux-2.0.14/Makefile.rhat 2007-04-24 10:36:19.000000000 -0400 -+++ libselinux-2.0.14/Makefile 2007-07-11 12:00:41.000000000 -0400 ++++ libselinux-2.0.14/Makefile 2007-09-07 09:17:52.000000000 -0400 @@ -2,6 +2,9 @@ all: $(MAKE) -C src $(MAKE) -C utils diff --git a/libselinux.spec b/libselinux.spec index 3c003d6..9f21102 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -2,7 +2,7 @@ Summary: SELinux library and simple utilities Name: libselinux Version: 2.0.14 -Release: 5%{?dist} +Release: 6%{?dist} License: Public domain (uncopyrighted) Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz @@ -122,6 +122,9 @@ exit 0 %{_libdir}/python*/site-packages/selinux.py* %changelog +* Thu Sep 6 2007 Dan Walsh - 2.0.14-6 +- fix swig binding for rpm_execcon + * Fri Aug 10 2007 Dan Walsh - 2.0.14-5 - Move libselinux.so to devel package