ff4b4da
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-2.0.9/src/selinuxswig.i
ff4b4da
--- nsalibselinux/src/selinuxswig.i	2007-02-22 08:53:23.000000000 -0500
ff4b4da
+++ libselinux-2.0.9/src/selinuxswig.i	2007-04-05 11:53:17.000000000 -0400
ff4b4da
@@ -115,9 +115,34 @@
ff4b4da
 extern const char *selinux_path(void);
ff4b4da
 extern int selinux_check_passwd_access(access_vector_t requested);
ff4b4da
 extern int checkPasswdAccess(access_vector_t requested);
ff4b4da
+
ff4b4da
+// This tells SWIG to treat char ** as a special case
ff4b4da
+%typemap(in) char ** {
ff4b4da
+  /* Check if is a list */
ff4b4da
+  if (PyList_Check($input)) {
ff4b4da
+    int size = PyList_Size($input);
ff4b4da
+    int i = 0;
ff4b4da
+    $1 = (char **) malloc((size+1)*sizeof(char *));
ff4b4da
+    for (i = 0; i < size; i++) {
ff4b4da
+      PyObject *o = PyList_GetItem($input,i);
ff4b4da
+      if (PyString_Check(o))
ff4b4da
+	$1[i] = PyString_AsString(PyList_GetItem($input,i));
ff4b4da
+      else {
ff4b4da
+	PyErr_SetString(PyExc_TypeError,"list must contain strings");
ff4b4da
+	free($1);
ff4b4da
+	return NULL;
ff4b4da
+      }
ff4b4da
+    }
ff4b4da
+    $1[i] = 0;
ff4b4da
+  } else {
ff4b4da
+    PyErr_SetString(PyExc_TypeError,"not a list");
ff4b4da
+    return NULL;
ff4b4da
+  }
ff4b4da
+}
ff4b4da
+
ff4b4da
 extern int rpm_execcon(unsigned int verified, 
ff4b4da
 		       const char *filename, 
ff4b4da
-		       char *const argv[], char *const envp[]);
ff4b4da
+		       char **, char **);
ff4b4da
 
ff4b4da
 extern int is_context_customizable (security_context_t scontext);
ff4b4da
 
ff4b4da
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.9/src/selinuxswig_wrap.c
ff4b4da
--- nsalibselinux/src/selinuxswig_wrap.c	2007-02-22 08:53:23.000000000 -0500
ff4b4da
+++ libselinux-2.0.9/src/selinuxswig_wrap.c	2007-04-05 11:45:04.000000000 -0400
ff4b4da
@@ -4145,18 +4145,14 @@
ff4b4da
   PyObject *resultobj = 0;
ff4b4da
   unsigned int arg1 ;
ff4b4da
   char *arg2 = (char *) 0 ;
ff4b4da
-  char **arg3 ;
ff4b4da
-  char **arg4 ;
ff4b4da
+  char **arg3 = (char **) 0 ;
ff4b4da
+  char **arg4 = (char **) 0 ;
ff4b4da
   int result;
ff4b4da
   unsigned int val1 ;
ff4b4da
   int ecode1 = 0 ;
ff4b4da
   int res2 ;
ff4b4da
   char *buf2 = 0 ;
ff4b4da
   int alloc2 = 0 ;
ff4b4da
-  void *argp3 = 0 ;
ff4b4da
-  int res3 = 0 ;
ff4b4da
-  void *argp4 = 0 ;
ff4b4da
-  int res4 = 0 ;
ff4b4da
   PyObject * obj0 = 0 ;
ff4b4da
   PyObject * obj1 = 0 ;
ff4b4da
   PyObject * obj2 = 0 ;
ff4b4da
@@ -4173,17 +4169,51 @@
ff4b4da
     SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "rpm_execcon" "', argument " "2"" of type '" "char const *""'");
ff4b4da
   }
ff4b4da
   arg2 = (char *)(buf2);
ff4b4da
-  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_p_char, 0 |  0 );
ff4b4da
-  if (!SWIG_IsOK(res3)) {
ff4b4da
-    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "rpm_execcon" "', argument " "3"" of type '" "char *const []""'"); 
ff4b4da
-  } 
ff4b4da
-  arg3 = (char **)(argp3);
ff4b4da
-  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_char, 0 |  0 );
ff4b4da
-  if (!SWIG_IsOK(res4)) {
ff4b4da
-    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "rpm_execcon" "', argument " "4"" of type '" "char *const []""'"); 
ff4b4da
-  } 
ff4b4da
-  arg4 = (char **)(argp4);
ff4b4da
-  result = (int)rpm_execcon(arg1,(char const *)arg2,(char *const (*))arg3,(char *const (*))arg4);
ff4b4da
+  {
ff4b4da
+    /* Check if is a list */
ff4b4da
+    if (PyList_Check(obj2)) {
ff4b4da
+      int size = PyList_Size(obj2);
ff4b4da
+      int i = 0;
ff4b4da
+      arg3 = (char **) malloc((size+1)*sizeof(char *));
ff4b4da
+      for (i = 0; i < size; i++) {
ff4b4da
+        PyObject *o = PyList_GetItem(obj2,i);
ff4b4da
+        if (PyString_Check(o))
ff4b4da
+        arg3[i] = PyString_AsString(PyList_GetItem(obj2,i));
ff4b4da
+        else {
ff4b4da
+          PyErr_SetString(PyExc_TypeError,"list must contain strings");
ff4b4da
+          free(arg3);
ff4b4da
+          return NULL;
ff4b4da
+        }
ff4b4da
+      }
ff4b4da
+      arg3[i] = 0;
ff4b4da
+    } else {
ff4b4da
+      PyErr_SetString(PyExc_TypeError,"not a list");
ff4b4da
+      return NULL;
ff4b4da
+    }
ff4b4da
+  }
ff4b4da
+  {
ff4b4da
+    /* Check if is a list */
ff4b4da
+    if (PyList_Check(obj3)) {
ff4b4da
+      int size = PyList_Size(obj3);
ff4b4da
+      int i = 0;
ff4b4da
+      arg4 = (char **) malloc((size+1)*sizeof(char *));
ff4b4da
+      for (i = 0; i < size; i++) {
ff4b4da
+        PyObject *o = PyList_GetItem(obj3,i);
ff4b4da
+        if (PyString_Check(o))
ff4b4da
+        arg4[i] = PyString_AsString(PyList_GetItem(obj3,i));
ff4b4da
+        else {
ff4b4da
+          PyErr_SetString(PyExc_TypeError,"list must contain strings");
ff4b4da
+          free(arg4);
ff4b4da
+          return NULL;
ff4b4da
+        }
ff4b4da
+      }
ff4b4da
+      arg4[i] = 0;
ff4b4da
+    } else {
ff4b4da
+      PyErr_SetString(PyExc_TypeError,"not a list");
ff4b4da
+      return NULL;
ff4b4da
+    }
ff4b4da
+  }
ff4b4da
+  result = (int)rpm_execcon(arg1,(char const *)arg2,arg3,arg4);
ff4b4da
   resultobj = SWIG_From_int((int)(result));
ff4b4da
   if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
ff4b4da
   return resultobj;
ff4b4da
diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getsebool.c libselinux-2.0.9/utils/getsebool.c
c7862e5
--- nsalibselinux/utils/getsebool.c	2006-11-16 17:15:17.000000000 -0500
ff4b4da
+++ libselinux-2.0.9/utils/getsebool.c	2007-04-05 10:53:29.000000000 -0400
22298b4
@@ -72,17 +72,23 @@
22298b4
 	for (i = 0; i < len; i++) {
22298b4
 		active = security_get_boolean_active(names[i]);
22298b4
 		if (active < 0) {
22298b4
-			fprintf(stderr, "Error getting active value for %s\n",
22298b4
-				names[i]);
22298b4
-			rc = -1;
c7862e5
-			goto out;
22298b4
+			if (errno != EACCES) { 
22298b4
+				fprintf(stderr, "Error getting active value for %s\n",
22298b4
+					names[i]);
22298b4
+				rc = -1;
22298b4
+				goto out;
22298b4
+			}
c7862e5
+			continue;
c7862e5
 		}
c7862e5
 		pending = security_get_boolean_pending(names[i]);
c7862e5
 		if (pending < 0) {
22298b4
-			fprintf(stderr, "Error getting pending value for %s\n",
22298b4
-				names[i]);
22298b4
-			rc = -1;
c7862e5
-			goto out;
22298b4
+			if (errno != EACCES) { 
22298b4
+				fprintf(stderr, "Error getting pending value for %s\n",
22298b4
+					names[i]);
22298b4
+				rc = -1;
22298b4
+				goto out;
22298b4
+			}
c7862e5
+			continue;
c7862e5
 		}
c7862e5
 		if (pending != active) {
c7862e5
 			printf("%s --> %s pending: %s\n", names[i],