rpms/libselinux/devel libselinux-rhat.patch, 1.126, 1.127 libselinux.spec, 1.284, 1.285
Daniel J Walsh (dwalsh)
fedora-extras-commits at redhat.com
Tue Sep 18 15:37:44 UTC 2007
Author: dwalsh
Update of /cvs/extras/rpms/libselinux/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23698
Modified Files:
libselinux-rhat.patch libselinux.spec
Log Message:
libselinux-rhat.patch:
Index: libselinux-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/libselinux/devel/libselinux-rhat.patch,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -r1.126 -r1.127
--- libselinux-rhat.patch 6 Sep 2007 12:37:00 -0000 1.126
+++ libselinux-rhat.patch 18 Sep 2007 15:37:42 -0000 1.127
@@ -1,46 +1,25 @@
-Index: libselinux/src/selinuxswig_python.i
-===================================================================
---- libselinux/src/selinuxswig_python.i (revision 2549)
-+++ libselinux/src/selinuxswig_python.i (working copy)
-@@ -98,4 +98,41 @@
- }
- }
-
-+%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"
+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-2.0.33/src/matchpathcon.c 2007-09-18 11:28:07.000000000 -0400
+@@ -2,6 +2,7 @@
+ #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));
+ }
+
+ void
Index: libselinux.spec
===================================================================
RCS file: /cvs/extras/rpms/libselinux/devel/libselinux.spec,v
retrieving revision 1.284
retrieving revision 1.285
diff -u -r1.284 -r1.285
--- libselinux.spec 13 Sep 2007 12:29:38 -0000 1.284
+++ libselinux.spec 18 Sep 2007 15:37:42 -0000 1.285
@@ -2,10 +2,11 @@
Summary: SELinux library and simple utilities
Name: libselinux
Version: 2.0.33
-Release: 1%{?dist}
+Release: 2%{?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 @@
%prep
%setup -q
+%patch -p1 -b .rhat
%build
make clean
@@ -122,6 +124,9 @@
%changelog
+* Tue Sep 18 2007 Dan Walsh <dwalsh at redhat.com> - 2.0.33-2
+- Change matchpatcon to use syslog instead of syserror
+
* Thu Sep 13 2007 Dan Walsh <dwalsh at redhat.com> - 2.0.33-1
- 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.
More information about the fedora-extras-commits
mailing list