All of lore.kernel.org
 help / color / mirror / Atom feed
* libselinux python binding segfault patch
@ 2007-01-24 17:25 Daniel J Walsh
  2007-01-24 17:31 ` Stephen Smalley
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel J Walsh @ 2007-01-24 17:25 UTC (permalink / raw)
  To: Stephen Smalley, SE Linux

[-- 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 ;
   

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-01-26 21:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-24 17:25 libselinux python binding segfault patch Daniel J Walsh
2007-01-24 17:31 ` 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

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.