*** empty log message ***
This commit is contained in:
parent
31de56ffa4
commit
71cd1381ef
@ -1,46 +1,25 @@
|
|||||||
Index: libselinux/src/selinuxswig_python.i
|
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.33/src/matchpathcon.c
|
||||||
===================================================================
|
--- nsalibselinux/src/matchpathcon.c 2007-08-10 11:58:34.000000000 -0400
|
||||||
--- libselinux/src/selinuxswig_python.i (revision 2549)
|
+++ libselinux-2.0.33/src/matchpathcon.c 2007-09-18 11:28:07.000000000 -0400
|
||||||
+++ libselinux/src/selinuxswig_python.i (working copy)
|
@@ -2,6 +2,7 @@
|
||||||
@@ -98,4 +98,41 @@
|
#include <string.h>
|
||||||
}
|
#include <errno.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <syslog.h>
|
||||||
|
#include "selinux_internal.h"
|
||||||
|
#include "label_internal.h"
|
||||||
|
#include "callbacks.h"
|
||||||
|
@@ -55,10 +56,12 @@
|
||||||
|
#endif
|
||||||
|
default_printf(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
+ char buf[BUFSIZ];
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, fmt);
|
||||||
|
- vfprintf(stderr, fmt, ap);
|
||||||
|
+ vsnprintf(buf, sizeof(buf) - 1, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
+ syslog(LOG_ERR, buf, strlen(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
+%typemap(in) char * const [] {
|
void
|
||||||
+ 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
|
Summary: SELinux library and simple utilities
|
||||||
Name: libselinux
|
Name: libselinux
|
||||||
Version: 2.0.33
|
Version: 2.0.33
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: Public domain (uncopyrighted)
|
License: Public domain (uncopyrighted)
|
||||||
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
|
||||||
|
Patch: libselinux-rhat.patch
|
||||||
|
|
||||||
BuildRequires: libsepol-devel >= %{libsepolver} swig
|
BuildRequires: libsepol-devel >= %{libsepolver} swig
|
||||||
Requires: libsepol >= %{libsepolver}
|
Requires: libsepol >= %{libsepolver}
|
||||||
@ -48,6 +49,7 @@ needed for developing SELinux applications.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch -p1 -b .rhat
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make clean
|
make clean
|
||||||
@ -122,6 +124,9 @@ exit 0
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|
||||||
|
* Tue Sep 18 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.33-2
|
||||||
|
- Change matchpatcon to use syslog instead of syserror
|
||||||
|
|
||||||
* Thu Sep 13 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.33-1
|
* Thu Sep 13 2007 Dan Walsh <dwalsh@redhat.com> - 2.0.33-1
|
||||||
- Upgrade to latest from NSA
|
- Upgrade to latest from NSA
|
||||||
* Re-map a getxattr return value of 0 to a getfilecon return value of -1 with errno EOPNOTSUPP from Stephen Smalley.
|
* Re-map a getxattr return value of 0 to a getfilecon return value of -1 with errno EOPNOTSUPP from Stephen Smalley.
|
||||||
|
Loading…
Reference in New Issue
Block a user