All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, SE Linux <selinux@tycho.nsa.gov>
Subject: libselinux python binding segfault patch
Date: Wed, 24 Jan 2007 12:25:34 -0500	[thread overview]
Message-ID: <45B7968E.8040106@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 104 bytes --]

This patch fixes a segfault in the python binding when getfilecon is 
called with a non existant file.


[-- Attachment #2: libselinux-rhat.patch --]
[-- Type: text/x-patch, Size: 4183 bytes --]

Binary files nsalibselinux/src/selinux.pyc and libselinux-1.34.0/src/selinux.pyc differ
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-1.34.0/src/selinuxswig.i
--- nsalibselinux/src/selinuxswig.i	2006-11-16 17:15:25.000000000 -0500
+++ libselinux-1.34.0/src/selinuxswig.i	2007-01-24 12:16:39.000000000 -0500
@@ -25,7 +25,7 @@
 %apply int *OUTPUT { int * };
 %apply int *OUTPUT { size_t * };
 
-%typemap(in, numinputs=0) security_context_t *(security_context_t temp) {
+%typemap(in, numinputs=0) security_context_t *(security_context_t temp=NULL) {
 	$1 = &temp;
 }
 %typemap(argout) security_context_t * (char *temp) {
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-1.34.0/src/selinuxswig_wrap.c
--- nsalibselinux/src/selinuxswig_wrap.c	2006-11-16 17:15:25.000000000 -0500
+++ libselinux-1.34.0/src/selinuxswig_wrap.c	2007-01-24 12:16:58.000000000 -0500
@@ -2831,7 +2831,7 @@
   PyObject *resultobj = 0;
   security_context_t *arg1 = (security_context_t *) 0 ;
   int result;
-  security_context_t temp1 ;
+  security_context_t temp1 = NULL ;
   char *temp10 ;
   
   {
@@ -2878,7 +2878,7 @@
   int result;
   int val1 ;
   int ecode1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -2910,7 +2910,7 @@
   PyObject *resultobj = 0;
   security_context_t *arg1 = (security_context_t *) 0 ;
   int result;
-  security_context_t temp1 ;
+  security_context_t temp1 = NULL ;
   char *temp10 ;
   
   {
@@ -2936,7 +2936,7 @@
   PyObject *resultobj = 0;
   security_context_t *arg1 = (security_context_t *) 0 ;
   int result;
-  security_context_t temp1 ;
+  security_context_t temp1 = NULL ;
   char *temp10 ;
   
   {
@@ -2980,7 +2980,7 @@
   PyObject *resultobj = 0;
   security_context_t *arg1 = (security_context_t *) 0 ;
   int result;
-  security_context_t temp1 ;
+  security_context_t temp1 = NULL ;
   char *temp10 ;
   
   {
@@ -3024,7 +3024,7 @@
   PyObject *resultobj = 0;
   security_context_t *arg1 = (security_context_t *) 0 ;
   int result;
-  security_context_t temp1 ;
+  security_context_t temp1 = NULL ;
   char *temp10 ;
   
   {
@@ -3068,7 +3068,7 @@
   PyObject *resultobj = 0;
   security_context_t *arg1 = (security_context_t *) 0 ;
   int result;
-  security_context_t temp1 ;
+  security_context_t temp1 = NULL ;
   char *temp10 ;
   
   {
@@ -3116,7 +3116,7 @@
   int res1 ;
   char *buf1 = 0 ;
   int alloc1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -3154,7 +3154,7 @@
   int res1 ;
   char *buf1 = 0 ;
   int alloc1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -3191,7 +3191,7 @@
   int result;
   int val1 ;
   int ecode1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -3313,7 +3313,7 @@
   int result;
   int val1 ;
   int ecode1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -3474,7 +3474,7 @@
   security_context_t arg1 ;
   security_context_t *arg2 = (security_context_t *) 0 ;
   int result;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -3734,7 +3734,7 @@
   int alloc1 = 0 ;
   unsigned int val2 ;
   int ecode2 = 0 ;
-  security_context_t temp3 ;
+  security_context_t temp3 = NULL ;
   char *temp30 ;
   PyObject * obj0 = 0 ;
   PyObject * obj1 = 0 ;
@@ -3778,7 +3778,7 @@
   int res1 ;
   char *buf1 = 0 ;
   int alloc1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -4212,7 +4212,7 @@
   int res1 ;
   char *buf1 = 0 ;
   int alloc1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   
@@ -4250,7 +4250,7 @@
   int res1 ;
   char *buf1 = 0 ;
   int alloc1 = 0 ;
-  security_context_t temp2 ;
+  security_context_t temp2 = NULL ;
   char *temp20 ;
   PyObject * obj0 = 0 ;
   

             reply	other threads:[~2007-01-24 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24 17:25 Daniel J Walsh [this message]
2007-01-24 17:31 ` libselinux python binding segfault patch Stephen Smalley
2007-01-24 17:54   ` Daniel J Walsh
2007-01-24 18:02     ` Stephen Smalley
2007-01-24 18:40       ` Daniel J Walsh
2007-01-26 21:03         ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45B7968E.8040106@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.