Changeset d03b94113615c1751b8a074bbd4064d915c70ff9
- Timestamp:
- 03/06/10 16:56:25 (5 months ago)
- Parent:
- Files:
-
- libselinux/src/selinux.py (modified) (3 diffs)
- libselinux/src/selinuxswig_wrap.c (modified) (17 diffs)
- libsemanage/src/semanage.py (modified) (5 diffs)
- libsemanage/src/semanageswig_wrap.c (modified) (21 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libselinux/src/selinux.py
r94c51ba rd03b941 1 1 # This file was automatically generated by SWIG (http://www.swig.org). 2 # Version 1.3. 392 # Version 1.3.40 3 3 # 4 4 # Do not make changes to this file unless you know what you are doing--modify … … 22 22 finally: 23 23 fp.close() 24 return _mod24 return _mod 25 25 _selinux = swig_import_helper() 26 26 del swig_import_helper … … 2298 2298 selinux_lsetfilecon_default = _selinux.selinux_lsetfilecon_default 2299 2299 2300 2300 def selinux_reset_config(): 2301 return _selinux.selinux_reset_config() 2302 selinux_reset_config = _selinux.selinux_reset_config 2303 2304 libselinux/src/selinuxswig_wrap.c
r94c51ba rd03b941 1 1 /* ---------------------------------------------------------------------------- 2 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3. 393 * Version 1.3.40 4 4 * 5 5 * This file is not intended to be easily readable and contains a number of … … 726 726 727 727 728 /* Compatibility ma rcos for Python 3 */728 /* Compatibility macros for Python 3 */ 729 729 #if PY_VERSION_HEX >= 0x03000000 730 730 … … 759 759 char *cstr; 760 760 char *newstr; 761 int len;761 Py_ssize_t len; 762 762 str = PyUnicode_AsUTF8String(str); 763 763 PyBytes_AsStringAndSize(str, &cstr, &len); … … 1449 1449 { 1450 1450 const char *name = SWIG_TypePrettyName(v->ty); 1451 PyObject *hex = SwigPyObject_hex(v); 1452 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, hex); 1453 Py_DECREF(hex); 1451 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v); 1454 1452 if (v->next) { 1455 1453 #ifdef METH_NOARGS … … 1506 1504 } 1507 1505 1508 /* Added for Python 3.x, w hould it alsouseful for Python 2.x? */1506 /* Added for Python 3.x, would it also be useful for Python 2.x? */ 1509 1507 SWIGRUNTIME PyObject* 1510 1508 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) … … 1554 1552 PyObject *res; 1555 1553 if (data->delargs) { 1556 /* we need to create a tempora lobject to carry the destroy operation */1554 /* we need to create a temporary object to carry the destroy operation */ 1557 1555 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); 1558 1556 res = SWIG_Python_CallFunctor(destroy, tmp); … … 1755 1753 const PyTypeObject tmp 1756 1754 = { 1757 /* PyO jbect header changed in Python 3 */1755 /* PyObject header changed in Python 3 */ 1758 1756 #if PY_VERSION_HEX >= 0x03000000 1759 1757 PyVarObject_HEAD_INIT(&PyType_Type, 0) … … 1774 1772 (setattrfunc)0, /* tp_setattr */ 1775 1773 #if PY_VERSION_HEX >= 0x03000000 1776 0, /* tp_reserved in 3.0.1 */1774 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 1777 1775 #else 1778 1776 (cmpfunc)SwigPyObject_compare, /* tp_compare */ … … 1824 1822 }; 1825 1823 swigpyobject_type = tmp; 1826 /* for Python 3 we already assigned theob_type in PyVarObject_HEAD_INIT() */1824 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ 1827 1825 #if PY_VERSION_HEX < 0x03000000 1828 1826 swigpyobject_type.ob_type = &PyType_Type; … … 2231 2229 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 2232 2230 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; 2233 if (desc) {2231 if (desc) 2234 2232 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; 2235 if (!desc) return SWIG_ERROR;2236 }2233 if (!desc) 2234 return SWIG_ERROR; 2237 2235 if (ty) { 2238 2236 swig_cast_info *tc = SWIG_TypeCheck(desc,ty); … … 2272 2270 2273 2271 /* 2274 Create a new instance object, w hitout calling __init__, and set the2272 Create a new instance object, without calling __init__, and set the 2275 2273 'this' attribute. 2276 2274 */ … … 2720 2718 #define SWIG_name "_selinux" 2721 2719 2722 #define SWIGVERSION 0x0103 392720 #define SWIGVERSION 0x010340 2723 2721 #define SWIG_VERSION SWIGVERSION 2724 2722 … … 11882 11880 fail: 11883 11881 if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); 11882 return NULL; 11883 } 11884 11885 11886 SWIGINTERN PyObject *_wrap_selinux_reset_config(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 11887 PyObject *resultobj = 0; 11888 11889 if (!PyArg_ParseTuple(args,(char *)":selinux_reset_config")) SWIG_fail; 11890 selinux_reset_config(); 11891 resultobj = SWIG_Py_Void(); 11892 return resultobj; 11893 fail: 11884 11894 return NULL; 11885 11895 } … … 12187 12197 { (char *)"selinux_file_context_verify", _wrap_selinux_file_context_verify, METH_VARARGS, NULL}, 12188 12198 { (char *)"selinux_lsetfilecon_default", _wrap_selinux_lsetfilecon_default, METH_VARARGS, NULL}, 12199 { (char *)"selinux_reset_config", _wrap_selinux_reset_config, METH_VARARGS, NULL}, 12189 12200 { NULL, NULL, 0, NULL } 12190 12201 }; … … 12731 12742 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 12732 12743 0, /* Itemsize (tp_itemsize) */ 12733 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */12744 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ 12734 12745 (printfunc) swig_varlink_print, /* Print (tp_print) */ 12735 12746 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ … … 12742 12753 0, /* tp_hash */ 12743 12754 0, /* tp_call */ 12744 (reprfunc) swig_varlink_str, /* tp_str */12755 (reprfunc) swig_varlink_str, /* tp_str */ 12745 12756 0, /* tp_getattro */ 12746 12757 0, /* tp_setattro */ … … 12763 12774 }; 12764 12775 varlink_type = tmp; 12765 /* for Python 3 we already assigned theob_type in PyVarObject_HEAD_INIT() */12776 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ 12766 12777 #if PY_VERSION_HEX < 0x03000000 12767 12778 varlink_type.ob_type = &PyType_Type; libsemanage/src/semanage.py
r94c51ba rd03b941 1 1 # This file was automatically generated by SWIG (http://www.swig.org). 2 # Version 1.3. 392 # Version 1.3.40 3 3 # 4 4 # Do not make changes to this file unless you know what you are doing--modify … … 22 22 finally: 23 23 fp.close() 24 return _mod24 return _mod 25 25 _semanage = swig_import_helper() 26 26 del swig_import_helper … … 127 127 semanage_set_disable_dontaudit = _semanage.semanage_set_disable_dontaudit 128 128 129 def semanage_set_check_contexts(*args): 130 return _semanage.semanage_set_check_contexts(*args) 131 semanage_set_check_contexts = _semanage.semanage_set_check_contexts 132 129 133 def semanage_is_managed(*args): 130 134 return _semanage.semanage_is_managed(*args) … … 185 189 semanage_module_install_base_file = _semanage.semanage_module_install_base_file 186 190 191 def semanage_module_enable(*args): 192 return _semanage.semanage_module_enable(*args) 193 semanage_module_enable = _semanage.semanage_module_enable 194 195 def semanage_module_disable(*args): 196 return _semanage.semanage_module_disable(*args) 197 semanage_module_disable = _semanage.semanage_module_disable 198 187 199 def semanage_module_remove(*args): 188 200 return _semanage.semanage_module_remove(*args) … … 208 220 return _semanage.semanage_module_get_version(*args) 209 221 semanage_module_get_version = _semanage.semanage_module_get_version 222 223 def semanage_module_get_enabled(*args): 224 return _semanage.semanage_module_get_enabled(*args) 225 semanage_module_get_enabled = _semanage.semanage_module_get_enabled 210 226 211 227 def semanage_context_get_user(*args): libsemanage/src/semanageswig_wrap.c
r94c51ba rd03b941 1 1 /* ---------------------------------------------------------------------------- 2 2 * This file was automatically generated by SWIG (http://www.swig.org). 3 * Version 1.3. 393 * Version 1.3.40 4 4 * 5 5 * This file is not intended to be easily readable and contains a number of … … 726 726 727 727 728 /* Compatibility ma rcos for Python 3 */728 /* Compatibility macros for Python 3 */ 729 729 #if PY_VERSION_HEX >= 0x03000000 730 730 … … 759 759 char *cstr; 760 760 char *newstr; 761 int len;761 Py_ssize_t len; 762 762 str = PyUnicode_AsUTF8String(str); 763 763 PyBytes_AsStringAndSize(str, &cstr, &len); … … 1449 1449 { 1450 1450 const char *name = SWIG_TypePrettyName(v->ty); 1451 PyObject *hex = SwigPyObject_hex(v); 1452 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, hex); 1453 Py_DECREF(hex); 1451 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v); 1454 1452 if (v->next) { 1455 1453 #ifdef METH_NOARGS … … 1506 1504 } 1507 1505 1508 /* Added for Python 3.x, w hould it alsouseful for Python 2.x? */1506 /* Added for Python 3.x, would it also be useful for Python 2.x? */ 1509 1507 SWIGRUNTIME PyObject* 1510 1508 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op) … … 1554 1552 PyObject *res; 1555 1553 if (data->delargs) { 1556 /* we need to create a tempora lobject to carry the destroy operation */1554 /* we need to create a temporary object to carry the destroy operation */ 1557 1555 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0); 1558 1556 res = SWIG_Python_CallFunctor(destroy, tmp); … … 1755 1753 const PyTypeObject tmp 1756 1754 = { 1757 /* PyO jbect header changed in Python 3 */1755 /* PyObject header changed in Python 3 */ 1758 1756 #if PY_VERSION_HEX >= 0x03000000 1759 1757 PyVarObject_HEAD_INIT(&PyType_Type, 0) … … 1774 1772 (setattrfunc)0, /* tp_setattr */ 1775 1773 #if PY_VERSION_HEX >= 0x03000000 1776 0, /* tp_reserved in 3.0.1 */1774 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */ 1777 1775 #else 1778 1776 (cmpfunc)SwigPyObject_compare, /* tp_compare */ … … 1824 1822 }; 1825 1823 swigpyobject_type = tmp; 1826 /* for Python 3 we already assigned theob_type in PyVarObject_HEAD_INIT() */1824 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ 1827 1825 #if PY_VERSION_HEX < 0x03000000 1828 1826 swigpyobject_type.ob_type = &PyType_Type; … … 2231 2229 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 2232 2230 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; 2233 if (desc) {2231 if (desc) 2234 2232 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0; 2235 if (!desc) return SWIG_ERROR;2236 }2233 if (!desc) 2234 return SWIG_ERROR; 2237 2235 if (ty) { 2238 2236 swig_cast_info *tc = SWIG_TypeCheck(desc,ty); … … 2272 2270 2273 2271 /* 2274 Create a new instance object, w hitout calling __init__, and set the2272 Create a new instance object, without calling __init__, and set the 2275 2273 'this' attribute. 2276 2274 */ … … 2740 2738 #define SWIG_name "_semanage" 2741 2739 2742 #define SWIGVERSION 0x0103 392740 #define SWIGVERSION 0x010340 2743 2741 #define SWIG_VERSION SWIGVERSION 2744 2742 … … 3506 3504 3507 3505 3506 SWIGINTERN PyObject *_wrap_semanage_set_check_contexts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3507 PyObject *resultobj = 0; 3508 semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; 3509 int arg2 ; 3510 void *argp1 = 0 ; 3511 int res1 = 0 ; 3512 int val2 ; 3513 int ecode2 = 0 ; 3514 PyObject * obj0 = 0 ; 3515 PyObject * obj1 = 0 ; 3516 3517 if (!PyArg_ParseTuple(args,(char *)"OO:semanage_set_check_contexts",&obj0,&obj1)) SWIG_fail; 3518 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); 3519 if (!SWIG_IsOK(res1)) { 3520 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "semanage_set_check_contexts" "', argument " "1"" of type '" "semanage_handle_t *""'"); 3521 } 3522 arg1 = (semanage_handle_t *)(argp1); 3523 ecode2 = SWIG_AsVal_int(obj1, &val2); 3524 if (!SWIG_IsOK(ecode2)) { 3525 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "semanage_set_check_contexts" "', argument " "2"" of type '" "int""'"); 3526 } 3527 arg2 = (int)(val2); 3528 semanage_set_check_contexts(arg1,arg2); 3529 resultobj = SWIG_Py_Void(); 3530 return resultobj; 3531 fail: 3532 return NULL; 3533 } 3534 3535 3508 3536 SWIGINTERN PyObject *_wrap_semanage_is_managed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3509 3537 PyObject *resultobj = 0; … … 3904 3932 arg2 = (char *)(buf2); 3905 3933 result = (int)semanage_module_install_base_file(arg1,(char const *)arg2); 3934 resultobj = SWIG_From_int((int)(result)); 3935 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3936 return resultobj; 3937 fail: 3938 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3939 return NULL; 3940 } 3941 3942 3943 SWIGINTERN PyObject *_wrap_semanage_module_enable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3944 PyObject *resultobj = 0; 3945 semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; 3946 char *arg2 = (char *) 0 ; 3947 void *argp1 = 0 ; 3948 int res1 = 0 ; 3949 int res2 ; 3950 char *buf2 = 0 ; 3951 int alloc2 = 0 ; 3952 PyObject * obj0 = 0 ; 3953 PyObject * obj1 = 0 ; 3954 int result; 3955 3956 if (!PyArg_ParseTuple(args,(char *)"OO:semanage_module_enable",&obj0,&obj1)) SWIG_fail; 3957 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); 3958 if (!SWIG_IsOK(res1)) { 3959 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "semanage_module_enable" "', argument " "1"" of type '" "semanage_handle_t *""'"); 3960 } 3961 arg1 = (semanage_handle_t *)(argp1); 3962 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3963 if (!SWIG_IsOK(res2)) { 3964 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "semanage_module_enable" "', argument " "2"" of type '" "char *""'"); 3965 } 3966 arg2 = (char *)(buf2); 3967 result = (int)semanage_module_enable(arg1,arg2); 3968 resultobj = SWIG_From_int((int)(result)); 3969 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3970 return resultobj; 3971 fail: 3972 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); 3973 return NULL; 3974 } 3975 3976 3977 SWIGINTERN PyObject *_wrap_semanage_module_disable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 3978 PyObject *resultobj = 0; 3979 semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; 3980 char *arg2 = (char *) 0 ; 3981 void *argp1 = 0 ; 3982 int res1 = 0 ; 3983 int res2 ; 3984 char *buf2 = 0 ; 3985 int alloc2 = 0 ; 3986 PyObject * obj0 = 0 ; 3987 PyObject * obj1 = 0 ; 3988 int result; 3989 3990 if (!PyArg_ParseTuple(args,(char *)"OO:semanage_module_disable",&obj0,&obj1)) SWIG_fail; 3991 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); 3992 if (!SWIG_IsOK(res1)) { 3993 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "semanage_module_disable" "', argument " "1"" of type '" "semanage_handle_t *""'"); 3994 } 3995 arg1 = (semanage_handle_t *)(argp1); 3996 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2); 3997 if (!SWIG_IsOK(res2)) { 3998 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "semanage_module_disable" "', argument " "2"" of type '" "char *""'"); 3999 } 4000 arg2 = (char *)(buf2); 4001 result = (int)semanage_module_disable(arg1,arg2); 3906 4002 resultobj = SWIG_From_int((int)(result)); 3907 4003 if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); … … 4077 4173 result = (char *)semanage_module_get_version(arg1); 4078 4174 resultobj = SWIG_FromCharPtr((const char *)result); 4175 return resultobj; 4176 fail: 4177 return NULL; 4178 } 4179 4180 4181 SWIGINTERN PyObject *_wrap_semanage_module_get_enabled(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 4182 PyObject *resultobj = 0; 4183 semanage_module_info_t *arg1 = (semanage_module_info_t *) 0 ; 4184 void *argp1 = 0 ; 4185 int res1 = 0 ; 4186 PyObject * obj0 = 0 ; 4187 int result; 4188 4189 if (!PyArg_ParseTuple(args,(char *)"O:semanage_module_get_enabled",&obj0)) SWIG_fail; 4190 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_semanage_module_info, 0 | 0 ); 4191 if (!SWIG_IsOK(res1)) { 4192 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "semanage_module_get_enabled" "', argument " "1"" of type '" "semanage_module_info_t *""'"); 4193 } 4194 arg1 = (semanage_module_info_t *)(argp1); 4195 result = (int)semanage_module_get_enabled(arg1); 4196 resultobj = SWIG_From_int((int)(result)); 4079 4197 return resultobj; 4080 4198 fail: … … 11770 11888 { (char *)"semanage_get_disable_dontaudit", _wrap_semanage_get_disable_dontaudit, METH_VARARGS, NULL}, 11771 11889 { (char *)"semanage_set_disable_dontaudit", _wrap_semanage_set_disable_dontaudit, METH_VARARGS, NULL}, 11890 { (char *)"semanage_set_check_contexts", _wrap_semanage_set_check_contexts, METH_VARARGS, NULL}, 11772 11891 { (char *)"semanage_is_managed", _wrap_semanage_is_managed, METH_VARARGS, NULL}, 11773 11892 { (char *)"semanage_connect", _wrap_semanage_connect, METH_VARARGS, NULL}, … … 11784 11903 { (char *)"semanage_module_install_base", _wrap_semanage_module_install_base, METH_VARARGS, NULL}, 11785 11904 { (char *)"semanage_module_install_base_file", _wrap_semanage_module_install_base_file, METH_VARARGS, NULL}, 11905 { (char *)"semanage_module_enable", _wrap_semanage_module_enable, METH_VARARGS, NULL}, 11906 { (char *)"semanage_module_disable", _wrap_semanage_module_disable, METH_VARARGS, NULL}, 11786 11907 { (char *)"semanage_module_remove", _wrap_semanage_module_remove, METH_VARARGS, NULL}, 11787 11908 { (char *)"semanage_module_list", _wrap_semanage_module_list, METH_VARARGS, NULL}, … … 11790 11911 { (char *)"semanage_module_get_name", _wrap_semanage_module_get_name, METH_VARARGS, NULL}, 11791 11912 { (char *)"semanage_module_get_version", _wrap_semanage_module_get_version, METH_VARARGS, NULL}, 11913 { (char *)"semanage_module_get_enabled", _wrap_semanage_module_get_enabled, METH_VARARGS, NULL}, 11792 11914 { (char *)"semanage_context_get_user", _wrap_semanage_context_get_user, METH_VARARGS, NULL}, 11793 11915 { (char *)"semanage_context_set_user", _wrap_semanage_context_set_user, METH_VARARGS, NULL}, … … 12632 12754 sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */ 12633 12755 0, /* Itemsize (tp_itemsize) */ 12634 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */12756 (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */ 12635 12757 (printfunc) swig_varlink_print, /* Print (tp_print) */ 12636 12758 (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */ … … 12643 12765 0, /* tp_hash */ 12644 12766 0, /* tp_call */ 12645 (reprfunc) swig_varlink_str, /* tp_str */12767 (reprfunc) swig_varlink_str, /* tp_str */ 12646 12768 0, /* tp_getattro */ 12647 12769 0, /* tp_setattro */ … … 12664 12786 }; 12665 12787 varlink_type = tmp; 12666 /* for Python 3 we already assigned theob_type in PyVarObject_HEAD_INIT() */12788 /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */ 12667 12789 #if PY_VERSION_HEX < 0x03000000 12668 12790 varlink_type.ob_type = &PyType_Type;
