rpms/libselinux/devel libselinux-rhat.patch, 1.131, 1.132 libselinux.spec, 1.289, 1.290
Daniel J Walsh (dwalsh)
fedora-extras-commits at redhat.com
Thu Sep 27 17:55:49 UTC 2007
Author: dwalsh
Update of /cvs/extras/rpms/libselinux/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv6662
Modified Files:
libselinux-rhat.patch libselinux.spec
Log Message:
* Thu Sep 27 2007 Dan Walsh <dwalsh at redhat.com> - 2.0.35-2
- Fix segfault on missing file_context file
libselinux-rhat.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.131 -r 1.132 libselinux-rhat.patch
Index: libselinux-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/libselinux/devel/libselinux-rhat.patch,v
retrieving revision 1.131
retrieving revision 1.132
diff -u -r1.131 -r1.132
--- libselinux-rhat.patch 27 Sep 2007 14:54:10 -0000 1.131
+++ libselinux-rhat.patch 27 Sep 2007 17:55:13 -0000 1.132
@@ -1,6 +1,6 @@
-diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.34/src/matchpathcon.c
+diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.35/src/matchpathcon.c
--- nsalibselinux/src/matchpathcon.c 2007-09-18 16:27:25.000000000 -0400
-+++ libselinux-2.0.34/src/matchpathcon.c 2007-09-18 16:32:31.000000000 -0400
++++ libselinux-2.0.35/src/matchpathcon.c 2007-09-27 13:50:55.000000000 -0400
@@ -2,6 +2,7 @@
#include <string.h>
#include <errno.h>
@@ -18,9 +18,9074 @@
va_end(ap);
}
-diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.34/utils/matchpathcon.c
+@@ -305,8 +306,10 @@
+
+ void matchpathcon_fini(void)
+ {
+- selabel_close(hnd);
+- hnd = NULL;
++ if (hnd) {
++ selabel_close(hnd);
++ hnd = NULL;
++ }
+ }
+
+ int matchpathcon(const char *name, mode_t mode, security_context_t * con)
+diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.35/src/selinux.py
+--- nsalibselinux/src/selinux.py 2007-09-13 08:21:12.000000000 -0400
++++ libselinux-2.0.35/src/selinux.py 1969-12-31 19:00:00.000000000 -0500
+@@ -1,314 +0,0 @@
+-# This file was automatically generated by SWIG (http://www.swig.org).
+-# Version 1.3.31
+-#
+-# Don't modify this file, modify the SWIG interface instead.
+-# This file is compatible with both classic and new-style classes.
+-
+-import _selinux
+-import new
+-new_instancemethod = new.instancemethod
+-try:
+- _swig_property = property
+-except NameError:
+- pass # Python < 2.2 doesn't have 'property'.
+-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
+- if (name == "thisown"): return self.this.own(value)
+- if (name == "this"):
+- if type(value).__name__ == 'PySwigObject':
+- self.__dict__[name] = value
+- return
+- method = class_type.__swig_setmethods__.get(name,None)
+- if method: return method(self,value)
+- if (not static) or hasattr(self,name):
+- self.__dict__[name] = value
+- else:
+- raise AttributeError("You cannot add attributes to %s" % self)
+-
+-def _swig_setattr(self,class_type,name,value):
+- return _swig_setattr_nondynamic(self,class_type,name,value,0)
+-
+-def _swig_getattr(self,class_type,name):
+- if (name == "thisown"): return self.this.own()
+- method = class_type.__swig_getmethods__.get(name,None)
+- if method: return method(self)
+- raise AttributeError,name
+-
+-def _swig_repr(self):
+- try: strthis = "proxy of " + self.this.__repr__()
+- except: strthis = ""
+- return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+-
+-import types
+-try:
+- _object = types.ObjectType
+- _newclass = 1
+-except AttributeError:
+- class _object : pass
+- _newclass = 0
+-del types
+-
+-
+-is_selinux_enabled = _selinux.is_selinux_enabled
+-is_selinux_mls_enabled = _selinux.is_selinux_mls_enabled
+-getcon = _selinux.getcon
+-getcon_raw = _selinux.getcon_raw
+-setcon = _selinux.setcon
+-setcon_raw = _selinux.setcon_raw
+-getpidcon = _selinux.getpidcon
+-getpidcon_raw = _selinux.getpidcon_raw
+-getprevcon = _selinux.getprevcon
+-getprevcon_raw = _selinux.getprevcon_raw
+-getexeccon = _selinux.getexeccon
+-getexeccon_raw = _selinux.getexeccon_raw
+-setexeccon = _selinux.setexeccon
+-setexeccon_raw = _selinux.setexeccon_raw
+-getfscreatecon = _selinux.getfscreatecon
+-getfscreatecon_raw = _selinux.getfscreatecon_raw
+-setfscreatecon = _selinux.setfscreatecon
+-setfscreatecon_raw = _selinux.setfscreatecon_raw
+-getkeycreatecon = _selinux.getkeycreatecon
+-getkeycreatecon_raw = _selinux.getkeycreatecon_raw
+-setkeycreatecon = _selinux.setkeycreatecon
+-setkeycreatecon_raw = _selinux.setkeycreatecon_raw
+-getsockcreatecon = _selinux.getsockcreatecon
+-getsockcreatecon_raw = _selinux.getsockcreatecon_raw
+-setsockcreatecon = _selinux.setsockcreatecon
+-setsockcreatecon_raw = _selinux.setsockcreatecon_raw
+-getfilecon = _selinux.getfilecon
+-getfilecon_raw = _selinux.getfilecon_raw
+-lgetfilecon = _selinux.lgetfilecon
+-lgetfilecon_raw = _selinux.lgetfilecon_raw
+-fgetfilecon = _selinux.fgetfilecon
+-fgetfilecon_raw = _selinux.fgetfilecon_raw
+-setfilecon = _selinux.setfilecon
+-setfilecon_raw = _selinux.setfilecon_raw
+-lsetfilecon = _selinux.lsetfilecon
+-lsetfilecon_raw = _selinux.lsetfilecon_raw
+-fsetfilecon = _selinux.fsetfilecon
+-fsetfilecon_raw = _selinux.fsetfilecon_raw
+-getpeercon = _selinux.getpeercon
+-getpeercon_raw = _selinux.getpeercon_raw
+-class av_decision(_object):
+- __swig_setmethods__ = {}
+- __setattr__ = lambda self, name, value: _swig_setattr(self, av_decision, name, value)
+- __swig_getmethods__ = {}
+- __getattr__ = lambda self, name: _swig_getattr(self, av_decision, name)
+- __repr__ = _swig_repr
+- __swig_setmethods__["allowed"] = _selinux.av_decision_allowed_set
+- __swig_getmethods__["allowed"] = _selinux.av_decision_allowed_get
+- if _newclass:allowed = _swig_property(_selinux.av_decision_allowed_get, _selinux.av_decision_allowed_set)
+- __swig_setmethods__["decided"] = _selinux.av_decision_decided_set
+- __swig_getmethods__["decided"] = _selinux.av_decision_decided_get
+- if _newclass:decided = _swig_property(_selinux.av_decision_decided_get, _selinux.av_decision_decided_set)
+- __swig_setmethods__["auditallow"] = _selinux.av_decision_auditallow_set
+- __swig_getmethods__["auditallow"] = _selinux.av_decision_auditallow_get
+- if _newclass:auditallow = _swig_property(_selinux.av_decision_auditallow_get, _selinux.av_decision_auditallow_set)
+- __swig_setmethods__["auditdeny"] = _selinux.av_decision_auditdeny_set
+- __swig_getmethods__["auditdeny"] = _selinux.av_decision_auditdeny_get
+- if _newclass:auditdeny = _swig_property(_selinux.av_decision_auditdeny_get, _selinux.av_decision_auditdeny_set)
+- __swig_setmethods__["seqno"] = _selinux.av_decision_seqno_set
+- __swig_getmethods__["seqno"] = _selinux.av_decision_seqno_get
+- if _newclass:seqno = _swig_property(_selinux.av_decision_seqno_get, _selinux.av_decision_seqno_set)
+- def __init__(self, *args):
+- this = _selinux.new_av_decision(*args)
+- try: self.this.append(this)
+- except: self.this = this
+- __swig_destroy__ = _selinux.delete_av_decision
+- __del__ = lambda self : None;
+-av_decision_swigregister = _selinux.av_decision_swigregister
+-av_decision_swigregister(av_decision)
+-
+-class selinux_opt(_object):
+- __swig_setmethods__ = {}
+- __setattr__ = lambda self, name, value: _swig_setattr(self, selinux_opt, name, value)
+- __swig_getmethods__ = {}
+- __getattr__ = lambda self, name: _swig_getattr(self, selinux_opt, name)
+- __repr__ = _swig_repr
+- __swig_setmethods__["type"] = _selinux.selinux_opt_type_set
+- __swig_getmethods__["type"] = _selinux.selinux_opt_type_get
+- if _newclass:type = _swig_property(_selinux.selinux_opt_type_get, _selinux.selinux_opt_type_set)
+- __swig_setmethods__["value"] = _selinux.selinux_opt_value_set
+- __swig_getmethods__["value"] = _selinux.selinux_opt_value_get
+- if _newclass:value = _swig_property(_selinux.selinux_opt_value_get, _selinux.selinux_opt_value_set)
+- def __init__(self, *args):
+- this = _selinux.new_selinux_opt(*args)
+- try: self.this.append(this)
+- except: self.this = this
+- __swig_destroy__ = _selinux.delete_selinux_opt
+- __del__ = lambda self : None;
+-selinux_opt_swigregister = _selinux.selinux_opt_swigregister
+-selinux_opt_swigregister(selinux_opt)
+-
+-class selinux_callback(_object):
+- __swig_setmethods__ = {}
+- __setattr__ = lambda self, name, value: _swig_setattr(self, selinux_callback, name, value)
+- __swig_getmethods__ = {}
+- __getattr__ = lambda self, name: _swig_getattr(self, selinux_callback, name)
+- __repr__ = _swig_repr
+- __swig_setmethods__["func_log"] = _selinux.selinux_callback_func_log_set
+- __swig_getmethods__["func_log"] = _selinux.selinux_callback_func_log_get
+- if _newclass:func_log = _swig_property(_selinux.selinux_callback_func_log_get, _selinux.selinux_callback_func_log_set)
+- __swig_setmethods__["func_audit"] = _selinux.selinux_callback_func_audit_set
+- __swig_getmethods__["func_audit"] = _selinux.selinux_callback_func_audit_get
+- if _newclass:func_audit = _swig_property(_selinux.selinux_callback_func_audit_get, _selinux.selinux_callback_func_audit_set)
+- __swig_setmethods__["func_validate"] = _selinux.selinux_callback_func_validate_set
+- __swig_getmethods__["func_validate"] = _selinux.selinux_callback_func_validate_get
+- if _newclass:func_validate = _swig_property(_selinux.selinux_callback_func_validate_get, _selinux.selinux_callback_func_validate_set)
+- def __init__(self, *args):
+- this = _selinux.new_selinux_callback(*args)
+- try: self.this.append(this)
+- except: self.this = this
+- __swig_destroy__ = _selinux.delete_selinux_callback
[...8694 lines suppressed...]
+- static PyTypeObject varlink_type;
+- static int type_init = 0;
+- if (!type_init) {
+- const PyTypeObject tmp
+- = {
+- PyObject_HEAD_INIT(NULL)
+- 0, /* Number of items in variable part (ob_size) */
+- (char *)"swigvarlink", /* Type name (tp_name) */
+- sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
+- 0, /* Itemsize (tp_itemsize) */
+- (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
+- (printfunc) swig_varlink_print, /* Print (tp_print) */
+- (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
+- (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
+- 0, /* tp_compare */
+- (reprfunc) swig_varlink_repr, /* tp_repr */
+- 0, /* tp_as_number */
+- 0, /* tp_as_sequence */
+- 0, /* tp_as_mapping */
+- 0, /* tp_hash */
+- 0, /* tp_call */
+- (reprfunc)swig_varlink_str, /* tp_str */
+- 0, /* tp_getattro */
+- 0, /* tp_setattro */
+- 0, /* tp_as_buffer */
+- 0, /* tp_flags */
+- varlink__doc__, /* tp_doc */
+- 0, /* tp_traverse */
+- 0, /* tp_clear */
+- 0, /* tp_richcompare */
+- 0, /* tp_weaklistoffset */
+-#if PY_VERSION_HEX >= 0x02020000
+- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
+-#endif
+-#if PY_VERSION_HEX >= 0x02030000
+- 0, /* tp_del */
+-#endif
+-#ifdef COUNT_ALLOCS
+- 0,0,0,0 /* tp_alloc -> tp_next */
+-#endif
+- };
+- varlink_type = tmp;
+- varlink_type.ob_type = &PyType_Type;
+- type_init = 1;
+- }
+- return &varlink_type;
+- }
+-
+- /* Create a variable linking object for use later */
+- SWIGINTERN PyObject *
+- SWIG_Python_newvarlink(void) {
+- swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
+- if (result) {
+- result->vars = 0;
+- }
+- return ((PyObject*) result);
+- }
+-
+- SWIGINTERN void
+- SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
+- swig_varlinkobject *v = (swig_varlinkobject *) p;
+- swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
+- if (gv) {
+- size_t size = strlen(name)+1;
+- gv->name = (char *)malloc(size);
+- if (gv->name) {
+- strncpy(gv->name,name,size);
+- gv->get_attr = get_attr;
+- gv->set_attr = set_attr;
+- gv->next = v->vars;
+- }
+- }
+- v->vars = gv;
+- }
+-
+- SWIGINTERN PyObject *
+- SWIG_globals(void) {
+- static PyObject *_SWIG_globals = 0;
+- if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
+- return _SWIG_globals;
+- }
+-
+- /* -----------------------------------------------------------------------------
+- * constants/methods manipulation
+- * ----------------------------------------------------------------------------- */
+-
+- /* Install Constants */
+- SWIGINTERN void
+- SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
+- PyObject *obj = 0;
+- size_t i;
+- for (i = 0; constants[i].type; ++i) {
+- switch(constants[i].type) {
+- case SWIG_PY_POINTER:
+- obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
+- break;
+- case SWIG_PY_BINARY:
+- obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
+- break;
+- default:
+- obj = 0;
+- break;
+- }
+- if (obj) {
+- PyDict_SetItemString(d, constants[i].name, obj);
+- Py_DECREF(obj);
+- }
+- }
+- }
+-
+- /* -----------------------------------------------------------------------------*/
+- /* Fix SwigMethods to carry the callback ptrs when needed */
+- /* -----------------------------------------------------------------------------*/
+-
+- SWIGINTERN void
+- SWIG_Python_FixMethods(PyMethodDef *methods,
+- swig_const_info *const_table,
+- swig_type_info **types,
+- swig_type_info **types_initial) {
+- size_t i;
+- for (i = 0; methods[i].ml_name; ++i) {
+- const char *c = methods[i].ml_doc;
+- if (c && (c = strstr(c, "swig_ptr: "))) {
+- int j;
+- swig_const_info *ci = 0;
+- const char *name = c + 10;
+- for (j = 0; const_table[j].type; ++j) {
+- if (strncmp(const_table[j].name, name,
+- strlen(const_table[j].name)) == 0) {
+- ci = &(const_table[j]);
+- break;
+- }
+- }
+- if (ci) {
+- size_t shift = (ci->ptype) - types;
+- swig_type_info *ty = types_initial[shift];
+- size_t ldoc = (c - methods[i].ml_doc);
+- size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
+- char *ndoc = (char*)malloc(ldoc + lptr + 10);
+- if (ndoc) {
+- char *buff = ndoc;
+- void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
+- if (ptr) {
+- strncpy(buff, methods[i].ml_doc, ldoc);
+- buff += ldoc;
+- strncpy(buff, "swig_ptr: ", 10);
+- buff += 10;
+- SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
+- methods[i].ml_doc = ndoc;
+- }
+- }
+- }
+- }
+- }
+- }
+-
+-#ifdef __cplusplus
+-}
+-#endif
+-
+-/* -----------------------------------------------------------------------------*
+- * Partial Init method
+- * -----------------------------------------------------------------------------*/
+-
+-#ifdef __cplusplus
+-extern "C"
+-#endif
+-SWIGEXPORT void SWIG_init(void) {
+- PyObject *m, *d;
+-
+- /* Fix SwigMethods to carry the callback ptrs when needed */
+- SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
+-
+- m = Py_InitModule((char *) SWIG_name, SwigMethods);
+- d = PyModule_GetDict(m);
+-
+- SWIG_InitializeModule(0);
+- SWIG_InstallConstants(d,swig_const_table);
+-
+-
+- SWIG_Python_SetConstant(d, "SELINUX_CB_LOG",SWIG_From_int((int)(0)));
+- SWIG_Python_SetConstant(d, "SELINUX_CB_AUDIT",SWIG_From_int((int)(1)));
+- SWIG_Python_SetConstant(d, "SELINUX_CB_VALIDATE",SWIG_From_int((int)(2)));
+- SWIG_Python_SetConstant(d, "SELINUX_ERROR",SWIG_From_int((int)(0)));
+- SWIG_Python_SetConstant(d, "SELINUX_WARNING",SWIG_From_int((int)(1)));
+- SWIG_Python_SetConstant(d, "SELINUX_INFO",SWIG_From_int((int)(2)));
+- SWIG_Python_SetConstant(d, "SELINUX_AVC",SWIG_From_int((int)(3)));
+- SWIG_Python_SetConstant(d, "MATCHPATHCON_BASEONLY",SWIG_From_int((int)(1)));
+- SWIG_Python_SetConstant(d, "MATCHPATHCON_NOTRANS",SWIG_From_int((int)(2)));
+- SWIG_Python_SetConstant(d, "MATCHPATHCON_VALIDATE",SWIG_From_int((int)(4)));
+- SWIG_Python_SetConstant(d, "SELINUX_DEFAULTUSER",SWIG_FromCharPtr("user_u"));
+-}
+-
+diff --exclude-from=exclude -N -u -r nsalibselinux/utils/matchpathcon.c libselinux-2.0.35/utils/matchpathcon.c
--- nsalibselinux/utils/matchpathcon.c 2007-07-16 14:20:45.000000000 -0400
-+++ libselinux-2.0.34/utils/matchpathcon.c 2007-09-18 16:32:31.000000000 -0400
++++ libselinux-2.0.35/utils/matchpathcon.c 2007-09-27 10:22:29.000000000 -0400
@@ -17,10 +17,24 @@
exit(1);
}
Index: libselinux.spec
===================================================================
RCS file: /cvs/extras/rpms/libselinux/devel/libselinux.spec,v
retrieving revision 1.289
retrieving revision 1.290
diff -u -r1.289 -r1.290
--- libselinux.spec 27 Sep 2007 14:54:10 -0000 1.289
+++ libselinux.spec 27 Sep 2007 17:55:13 -0000 1.290
@@ -2,7 +2,7 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.0.35
-Release: 1%{?dist}
+Release: 2%{?dist}
License: Public domain (uncopyrighted)
Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
@@ -123,6 +123,9 @@
%{_libdir}/python*/site-packages/selinux.py*
%changelog
+* Thu Sep 27 2007 Dan Walsh <dwalsh at redhat.com> - 2.0.35-2
+- Fix segfault on missing file_context file
+
* Wed Sep 26 2007 Dan Walsh <dwalsh at redhat.com> - 2.0.35-1
- Upgrade to upstream
* Make netlink socket close-on-exec to avoid descriptor leakage from Dan Walsh.
More information about the fedora-extras-commits
mailing list