- Fix memory references in audit2why and change to use tuples
- Update to Upstream granted null message bug from Stephen Smalley.
This commit is contained in:
parent
88cc8f8805
commit
2f233dfd7a
@ -137,3 +137,4 @@ libselinux-2.0.42.tgz
|
|||||||
libselinux-2.0.43.tgz
|
libselinux-2.0.43.tgz
|
||||||
libselinux-2.0.45.tgz
|
libselinux-2.0.45.tgz
|
||||||
libselinux-2.0.46.tgz
|
libselinux-2.0.46.tgz
|
||||||
|
libselinux-2.0.47.tgz
|
||||||
|
@ -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
|
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
|
--- 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 @@
|
@@ -900,6 +900,8 @@
|
||||||
#define PACKET__SEND 0x00000001UL
|
#define PACKET__SEND 0x00000001UL
|
||||||
#define PACKET__RECV 0x00000002UL
|
#define PACKET__RECV 0x00000002UL
|
||||||
@ -12,8 +12,8 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/av_permission
|
|||||||
#define KEY__WRITE 0x00000004UL
|
#define KEY__WRITE 0x00000004UL
|
||||||
diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2.0.46/src/audit2why.c
|
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
|
--- 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
|
+++ libselinux-2.0.46/src/audit2why.c 2008-01-11 10:51:10.000000000 -0500
|
||||||
@@ -0,0 +1,463 @@
|
@@ -0,0 +1,460 @@
|
||||||
+#include <unistd.h>
|
+#include <unistd.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+#include <ctype.h>
|
+#include <ctype.h>
|
||||||
@ -326,7 +326,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2.
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+#define RETURN(X) \
|
+#define RETURN(X) \
|
||||||
+ PyList_SetItem(result, 0, Py_BuildValue("i", X)); \
|
+ PyTuple_SetItem(result, 0, Py_BuildValue("i", X)); \
|
||||||
+ return result;
|
+ return result;
|
||||||
+
|
+
|
||||||
+static PyObject *analyze(PyObject *self __attribute__((unused)) , PyObject *args) {
|
+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;
|
+ struct sepol_av_decision avd;
|
||||||
+ int rc;
|
+ int rc;
|
||||||
+ int i=0;
|
+ int i=0;
|
||||||
+ PyObject *result = PyList_New(2);
|
+ PyObject *result = PyTuple_New(2);
|
||||||
+ if (!result) return NULL;
|
+ if (!result) return NULL;
|
||||||
+ Py_INCREF(result);
|
|
||||||
+ Py_INCREF(Py_None);
|
+ 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))
|
+ if (!PyArg_ParseTuple(args,(char *)"sssO!:audit2why",&scon,&tcon,&tclassstr,&PyList_Type, &listObj))
|
||||||
+ return NULL;
|
+ return NULL;
|
||||||
@ -417,24 +416,22 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/audit2why.c libselinux-2.
|
|||||||
+ RETURN(TERULE)
|
+ RETURN(TERULE)
|
||||||
+ }
|
+ }
|
||||||
+ } else {
|
+ } 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;
|
+ struct boolean_t *b=(struct boolean_t *) bools;
|
||||||
+ int len=0;
|
+ int len=0;
|
||||||
+ while (b->name) {
|
+ while (b->name) {
|
||||||
+ len++; b++;
|
+ len++; b++;
|
||||||
+ }
|
+ }
|
||||||
+ b = (struct boolean_t *) bools;
|
+ b = (struct boolean_t *) bools;
|
||||||
+ PyObject *boollist = PyList_New(len);
|
+ PyObject *boollist = PyTuple_New(len);
|
||||||
+ len=0;
|
+ len=0;
|
||||||
+ while(b->name) {
|
+ while(b->name) {
|
||||||
+ PyObject *bool = PyList_New(2);
|
+ PyObject *bool = Py_BuildValue("(si)", b->name, b->active);
|
||||||
+ PyList_SetItem(bool, 0, PyString_FromString(b->name));
|
+ PyTuple_SetItem(boollist, len++, bool);
|
||||||
+ PyList_SetItem(bool, 1, Py_BuildValue("i", b->active));
|
|
||||||
+ PyList_SetItem(boollist, len++, bool);
|
|
||||||
+ b++;
|
+ b++;
|
||||||
+ }
|
+ }
|
||||||
+ free(bools);
|
+ free(bools);
|
||||||
+ PyList_SetItem(result, 1, boollist);
|
+ PyTuple_SetItem(result, 1, boollist);
|
||||||
+ return result;
|
+ 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
|
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
|
--- 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 @@
|
@@ -18,6 +18,7 @@
|
||||||
SWIGSO=_selinux.so
|
SWIGSO=_selinux.so
|
||||||
SWIGFILES=$(SWIGSO) selinux.py
|
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)
|
rm -f $(SWIGCOUT) $(SWIGFILES)
|
||||||
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.46/src/matchpathcon.c
|
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
|
--- 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 @@
|
@@ -2,6 +2,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
@ -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
|
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
|
--- 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 @@
|
@@ -1,5 +1,5 @@
|
||||||
# This file was automatically generated by SWIG (http://www.swig.org).
|
# This file was automatically generated by SWIG (http://www.swig.org).
|
||||||
-# Version 1.3.31
|
-# 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.
|
# 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
|
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
|
--- 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 @@
|
@@ -5,11 +5,16 @@
|
||||||
%module selinux
|
%module selinux
|
||||||
%{
|
%{
|
||||||
@ -597,7 +594,7 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-
|
|||||||
$1 = &temp1;
|
$1 = &temp1;
|
||||||
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.46/src/selinuxswig_wrap.c
|
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
|
--- 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 @@
|
@@ -1,6 +1,6 @@
|
||||||
/* ----------------------------------------------------------------------------
|
/* ----------------------------------------------------------------------------
|
||||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
%define libsepolver 2.0.10-1
|
%define libsepolver 2.0.10-1
|
||||||
Summary: SELinux library and simple utilities
|
Summary: SELinux library and simple utilities
|
||||||
Name: libselinux
|
Name: libselinux
|
||||||
Version: 2.0.46
|
Version: 2.0.47
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
License: Public Domain
|
License: Public Domain
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
|
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
|
||||||
@ -122,6 +122,11 @@ exit 0
|
|||||||
%{_libdir}/python*/site-packages/selinux/*
|
%{_libdir}/python*/site-packages/selinux/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jan 11 2008 Dan Walsh <dwalsh@redhat.com> - 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 <dwalsh@redhat.com> - 2.0.46-6
|
* Fri Jan 11 2008 Dan Walsh <dwalsh@redhat.com> - 2.0.46-6
|
||||||
- Fix __init__.py specification
|
- Fix __init__.py specification
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user