[PATCH 009/155] libselinux: fix python audit2why binding error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


This patch looks good to me. acked.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk45tG4ACgkQrlYvE4MpobOaHgCgiIhmd1Hv77+ZEDSEI64GJpt+
nEkAn2CmxSdP8uoKv3lCu7ck7xvQ/Lue
=ghmO
-----END PGP SIGNATURE-----
>From ca57312e90dbc57de31d0a29da0101fb06b8769b Mon Sep 17 00:00:00 2001
From: Eric Paris <eparis@xxxxxxxxxx>
Date: Wed, 29 Jun 2011 00:29:21 -0400
Subject: [PATCH 009/155] libselinux: fix python audit2why binding error

There is a missing error check in audit2why.c.  Check for error and
return NULL if we can't initialize instead of just pretending it worked.

Signed-off-by: Eric Paris <eparis@xxxxxxxxxx>
---
 libselinux/src/audit2why.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/libselinux/src/audit2why.c b/libselinux/src/audit2why.c
index d48fbeb..43b725c 100644
--- a/libselinux/src/audit2why.c
+++ b/libselinux/src/audit2why.c
@@ -287,8 +287,9 @@ static int __policy_init(const char *init_path)
 static PyObject *init(PyObject *self __attribute__((unused)), PyObject *args) {
   int result;
   char *init_path=NULL;
-  if (PyArg_ParseTuple(args,(char *)"|s:policy_init",&init_path)) 
-	  result = __policy_init(init_path);
+  if (!PyArg_ParseTuple(args,(char *)"|s:policy_init",&init_path))
+    return NULL;
+  result = __policy_init(init_path);
   return Py_BuildValue("i", result);
 }
 
-- 
1.7.6

Attachment: 0009-libselinux-fix-python-audit2why-binding-error.patch.sig
Description: PGP signature


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux