*** empty log message ***
This commit is contained in:
parent
4e3172796e
commit
6a9919e596
@ -1,12 +1,46 @@
|
||||
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.24/src/matchpathcon.c
|
||||
--- nsalibselinux/src/matchpathcon.c 2007-07-16 14:20:46.000000000 -0400
|
||||
+++ libselinux-2.0.24/src/matchpathcon.c 2007-07-23 10:21:34.000000000 -0400
|
||||
@@ -65,7 +65,7 @@
|
||||
#ifdef __GNUC__
|
||||
__attribute__ ((format(printf, 1, 2)))
|
||||
#endif
|
||||
- (*myprintf) (const char *fmt,...);
|
||||
+ (*myprintf) (const char *fmt,...) = &default_printf;
|
||||
Index: libselinux/src/selinuxswig_python.i
|
||||
===================================================================
|
||||
--- libselinux/src/selinuxswig_python.i (revision 2549)
|
||||
+++ libselinux/src/selinuxswig_python.i (working copy)
|
||||
@@ -98,4 +98,41 @@
|
||||
}
|
||||
}
|
||||
|
||||
void set_matchpathcon_printf(void (*f) (const char *fmt, ...))
|
||||
{
|
||||
+%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);
|
||||
+}
|
||||
+
|
||||
%include "selinuxswig.i"
|
||||
|
@ -2,10 +2,11 @@
|
||||
Summary: SELinux library and simple utilities
|
||||
Name: libselinux
|
||||
Version: 2.0.31
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: Public domain (uncopyrighted)
|
||||
Group: System Environment/Libraries
|
||||
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
|
||||
Patch: libselinux-rhat.patch
|
||||
|
||||
BuildRequires: libsepol-devel >= %{libsepolver} swig
|
||||
Requires: libsepol >= %{libsepolver}
|
||||
@ -48,6 +49,7 @@ needed for developing SELinux applications.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch -p1 -b .rhat
|
||||
|
||||
%build
|
||||
make clean
|
||||
@ -122,6 +124,9 @@ exit 0
|
||||
|
||||
%changelog
|
||||
|
||||
* Thu Sep 6 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.31-4
|
||||
- Apply James Athway patch to fix rpm_execcon python binding
|
||||
|
||||
* Tue Aug 28 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.31-3
|
||||
- Move libselinux.so back into main package, breaks procps
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user