--- /dev/null
+=== modified file 'libraries/libapparmor/swig/SWIG/libapparmor.i'
+--- libraries/libapparmor/swig/SWIG/libapparmor.i 2014-01-06 22:08:55 +0000
++++ libraries/libapparmor/swig/SWIG/libapparmor.i 2014-03-07 19:54:12 +0000
+@@ -9,6 +9,16 @@
+ %include "typemaps.i"
+ %include <aalogparse.h>
+
++#ifdef SWIGPYTHON
++%exception {
++ $action
++ if (result < 0) {
++ PyErr_SetFromErrno(PyExc_OSError);
++ return NULL;
++ }
++}
++#endif
++
+ /* swig doesn't like the macro magic we do in apparmor.h so the fn prototypes
+ * are manually inserted here
+ */
+@@ -37,3 +37,5 @@
+ extern int aa_getcon(char **con, char **mode);
+ extern int aa_getpeercon_raw(int fd, char *buffer, int *size);
+ extern int aa_getpeercon(int fd, char **con);
++
++%exception;
+
Summary(pl.UTF-8): Biblioteka udostępniająca kluczowe symbole AppArmor
Name: libapparmor
Version: 2.8.3
-Release: 1
+Release: 2
Epoch: 1
License: LGPL v2.1
Group: Libraries
Source0: http://launchpad.net/apparmor/2.8/%{version}/+download/apparmor-%{version}.tar.gz
# Source0-md5: 43586e5096606e857fef45c49553e468
+Patch0: %{name}-python-exception.patch
URL: http://apparmor.wiki.kernel.org/
BuildRequires: autoconf
BuildRequires: automake >= 1.4
%prep
%setup -q -n apparmor-%{version}
+%patch0 -p0
%build
cd libraries/libapparmor