diff --git a/.cvsignore b/.cvsignore index e458a4f..618b7b4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -137,3 +137,4 @@ libselinux-2.0.42.tgz libselinux-2.0.43.tgz libselinux-2.0.45.tgz libselinux-2.0.46.tgz +libselinux-2.0.47.tgz diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index 4452058..ef1bdc9 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,6 +1,6 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/av_permissions.h libselinux-2.0.46/include/selinux/av_permissions.h --- nsalibselinux/include/selinux/av_permissions.h 2007-11-15 15:52:46.000000000 -0500 -+++ libselinux-2.0.46/include/selinux/av_permissions.h 2008-01-10 13:25:57.000000000 -0500 ++++ libselinux-2.0.46/include/selinux/av_permissions.h 2008-01-11 10:51:06.000000000 -0500 @@ -900,6 +900,8 @@ #define PACKET__SEND 0x00000001UL #define PACKET__RECV 0x00000002UL @@ -12,8 +12,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/av_permission #define KEY__WRITE 0x00000004UL diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2.0.46/src/audit2why.c --- nsalibselinux/src/audit2why.c 1969-12-31 19:00:00.000000000 -0500 -+++ libselinux-2.0.46/src/audit2why.c 2008-01-10 15:45:51.000000000 -0500 -@@ -0,0 +1,463 @@ ++++ libselinux-2.0.46/src/audit2why.c 2008-01-11 10:51:10.000000000 -0500 +@@ -0,0 +1,460 @@ +#include +#include +#include @@ -326,7 +326,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2. +} + +#define RETURN(X) \ -+ PyList_SetItem(result, 0, Py_BuildValue("i", X)); \ ++ PyTuple_SetItem(result, 0, Py_BuildValue("i", X)); \ + return result; + +static PyObject *analyze(PyObject *self __attribute__((unused)) , PyObject *args) { @@ -344,11 +344,10 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2. + struct sepol_av_decision avd; + int rc; + int i=0; -+ PyObject *result = PyList_New(2); ++ PyObject *result = PyTuple_New(2); + if (!result) return NULL; -+ Py_INCREF(result); + Py_INCREF(Py_None); -+ PyList_SetItem(result, 1, Py_None); ++ PyTuple_SetItem(result, 1, Py_None); + + if (!PyArg_ParseTuple(args,(char *)"sssO!:audit2why",&scon,&tcon,&tclassstr,&PyList_Type, &listObj)) + return NULL; @@ -417,24 +416,22 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2. + RETURN(TERULE) + } + } else { -+ PyList_SetItem(result, 0, Py_BuildValue("i", BOOLEAN)); ++ PyTuple_SetItem(result, 0, Py_BuildValue("i", BOOLEAN)); + struct boolean_t *b=(struct boolean_t *) bools; + int len=0; + while (b->name) { + len++; b++; + } + b = (struct boolean_t *) bools; -+ PyObject *boollist = PyList_New(len); ++ PyObject *boollist = PyTuple_New(len); + len=0; + while(b->name) { -+ PyObject *bool = PyList_New(2); -+ PyList_SetItem(bool, 0, PyString_FromString(b->name)); -+ PyList_SetItem(bool, 1, Py_BuildValue("i", b->active)); -+ PyList_SetItem(boollist, len++, bool); ++ PyObject *bool = Py_BuildValue("(si)", b->name, b->active); ++ PyTuple_SetItem(boollist, len++, bool); + b++; + } + free(bools); -+ PyList_SetItem(result, 1, boollist); ++ PyTuple_SetItem(result, 1, boollist); + return result; + } + } @@ -479,7 +476,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2. +} diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-2.0.46/src/Makefile --- nsalibselinux/src/Makefile 2007-09-26 19:37:45.000000000 -0400 -+++ libselinux-2.0.46/src/Makefile 2008-01-11 08:43:39.000000000 -0500 ++++ libselinux-2.0.46/src/Makefile 2008-01-11 10:51:06.000000000 -0500 @@ -18,6 +18,7 @@ SWIGSO=_selinux.so SWIGFILES=$(SWIGSO) selinux.py @@ -547,7 +544,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/Makefile libselinux-2.0.4 rm -f $(SWIGCOUT) $(SWIGFILES) diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.46/src/matchpathcon.c --- nsalibselinux/src/matchpathcon.c 2007-09-28 09:48:58.000000000 -0400 -+++ libselinux-2.0.46/src/matchpathcon.c 2008-01-10 13:25:57.000000000 -0500 ++++ libselinux-2.0.46/src/matchpathcon.c 2008-01-11 10:51:06.000000000 -0500 @@ -2,6 +2,7 @@ #include #include @@ -567,7 +564,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.46/src/selinux.py --- nsalibselinux/src/selinux.py 2007-10-05 13:09:54.000000000 -0400 -+++ libselinux-2.0.46/src/selinux.py 2008-01-10 13:26:25.000000000 -0500 ++++ libselinux-2.0.46/src/selinux.py 2008-01-11 10:51:06.000000000 -0500 @@ -1,5 +1,5 @@ # This file was automatically generated by SWIG (http://www.swig.org). -# Version 1.3.31 @@ -577,7 +574,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0 # This file is compatible with both classic and new-style classes. diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.46/src/selinuxswig.i --- nsalibselinux/src/selinuxswig.i 2007-10-01 09:54:35.000000000 -0400 -+++ libselinux-2.0.46/src/selinuxswig.i 2008-01-10 13:25:57.000000000 -0500 ++++ libselinux-2.0.46/src/selinuxswig.i 2008-01-11 10:51:06.000000000 -0500 @@ -5,11 +5,16 @@ %module selinux %{ @@ -597,7 +594,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux- $1 = &temp1; diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.46/src/selinuxswig_wrap.c --- nsalibselinux/src/selinuxswig_wrap.c 2007-10-05 13:09:54.000000000 -0400 -+++ libselinux-2.0.46/src/selinuxswig_wrap.c 2008-01-10 13:26:25.000000000 -0500 ++++ libselinux-2.0.46/src/selinuxswig_wrap.c 2008-01-11 10:51:06.000000000 -0500 @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). diff --git a/libselinux.spec b/libselinux.spec index 1bdfd47..21e767b 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,8 +1,8 @@ %define libsepolver 2.0.10-1 Summary: SELinux library and simple utilities Name: libselinux -Version: 2.0.46 -Release: 6%{?dist} +Version: 2.0.47 +Release: 1%{?dist} License: Public Domain Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz @@ -122,6 +122,11 @@ exit 0 %{_libdir}/python*/site-packages/selinux/* %changelog +* Fri Jan 11 2008 Dan Walsh - 2.0.47-1 +- Fix memory references in audit2why and change to use tuples +- Update to Upstream + * Fix for the avc: granted null message bug from Stephen Smalley. + * Fri Jan 11 2008 Dan Walsh - 2.0.46-6 - Fix __init__.py specification diff --git a/sources b/sources index 30053fb..fb8a8d4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e5889fd624a0b8af73e02f175c171560 libselinux-2.0.46.tgz +c6ffa48a94478bfd77fcffe33b70b76b libselinux-2.0.47.tgz