psss / rpms / libselinux

Forked from rpms/libselinux 5 years ago
Clone
407234b
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig.i libselinux-1.29.2/src/selinuxswig.i
407234b
--- nsalibselinux/src/selinuxswig.i	2005-12-08 12:52:24.000000000 -0500
407234b
+++ libselinux-1.29.2/src/selinuxswig.i	2005-12-20 09:41:32.000000000 -0500
407234b
@@ -36,7 +37,7 @@
407234b
 extern int is_selinux_mls_enabled(void);
407234b
 extern int getcon(security_context_t *con);
407234b
 extern int setcon(security_context_t con);
407234b
-extern int getpidcon(pid_t pid, security_context_t *con);
407234b
+extern int getpidcon(int pid, security_context_t *con);
407234b
 extern int getprevcon(security_context_t *con);
407234b
 extern int getexeccon(security_context_t *con);
407234b
 extern int setexeccon(security_context_t con);
407234b
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-1.29.2/src/selinuxswig_wrap.c
407234b
--- nsalibselinux/src/selinuxswig_wrap.c	2005-12-08 12:52:24.000000000 -0500
407234b
+++ libselinux-1.29.2/src/selinuxswig_wrap.c	2005-12-20 09:41:35.000000000 -0500
407234b
@@ -1322,17 +1322,16 @@
407234b
 /* -------- TYPES TABLE (BEGIN) -------- */
407234b
 
407234b
 #define  SWIGTYPE_p_mode_t swig_types[0] 
407234b
-#define  SWIGTYPE_p_pid_t swig_types[1] 
407234b
-#define  SWIGTYPE_p_SELboolean swig_types[2] 
407234b
-#define  SWIGTYPE_p_char swig_types[3] 
407234b
-#define  SWIGTYPE_p_p_p_char swig_types[4] 
407234b
-#define  SWIGTYPE_p_access_vector_t swig_types[5] 
407234b
-#define  SWIGTYPE_p_p_char swig_types[6] 
407234b
-#define  SWIGTYPE_size_t swig_types[7] 
407234b
-#define  SWIGTYPE_p_security_context_t swig_types[8] 
407234b
-#define  SWIGTYPE_ptrdiff_t swig_types[9] 
407234b
-#define  SWIGTYPE_p_int swig_types[10] 
407234b
-static swig_type_info *swig_types[12];
407234b
+#define  SWIGTYPE_p_SELboolean swig_types[1] 
407234b
+#define  SWIGTYPE_p_char swig_types[2] 
407234b
+#define  SWIGTYPE_p_p_p_char swig_types[3] 
407234b
+#define  SWIGTYPE_p_access_vector_t swig_types[4] 
407234b
+#define  SWIGTYPE_p_p_char swig_types[5] 
407234b
+#define  SWIGTYPE_size_t swig_types[6] 
407234b
+#define  SWIGTYPE_p_security_context_t swig_types[7] 
407234b
+#define  SWIGTYPE_ptrdiff_t swig_types[8] 
407234b
+#define  SWIGTYPE_p_int swig_types[9] 
407234b
+static swig_type_info *swig_types[11];
407234b
 
407234b
 /* -------- TYPES TABLE (END) -------- */
407234b
 
407234b
@@ -1355,59 +1354,7 @@
407234b
 int is_selinux_mls_enabled(void);
407234b
 int getcon(security_context_t *);
407234b
 int setcon(security_context_t);
407234b
-int getpidcon(pid_t,security_context_t *);
407234b
-int getprevcon(security_context_t *);
407234b
-int getexeccon(security_context_t *);
407234b
-int setexeccon(security_context_t);
407234b
-int getfscreatecon(security_context_t *);
407234b
-int setfscreatecon(security_context_t);
407234b
-int getfilecon(char const *,security_context_t *);
407234b
-
407234b
-/* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
407234b
-SWIGINTERN int
407234b
-SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
407234b
-{
407234b
-  static swig_type_info* pchar_info = 0;
407234b
-  char* vptr = 0;
407234b
-  if (!pchar_info) pchar_info = SWIG_TypeQuery("char *");
407234b
-  if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_info, 0) != -1) {
407234b
-    if (cptr) *cptr = vptr;
407234b
-    if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
407234b
-    return SWIG_OLDOBJ;
407234b
-  } else {
407234b
-    PyErr_Clear();
407234b
-    if (PyString_Check(obj)) {
407234b
-      if (cptr) {
407234b
-	*cptr = PyString_AS_STRING(obj);
407234b
-	if (psize) {
407234b
-	  *psize = PyString_GET_SIZE(obj) + 1;
407234b
-	}
407234b
-      }
407234b
-      return SWIG_PYSTR;
407234b
-    }
407234b
-  }
407234b
-  if (cptr) {
407234b
-    SWIG_type_error("char *", obj);
407234b
-  }
407234b
-  return 0;
407234b
-}
407234b
-
407234b
-
407234b
-SWIGINTERNSHORT int
407234b
-SWIG_AsCharPtr(PyObject *obj, char **val)
407234b
-{
407234b
-  if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
407234b
-    return 1;
407234b
-  }
407234b
-  if (val) {
407234b
-    PyErr_Clear();
407234b
-    SWIG_type_error("char *", obj);
407234b
-  }
407234b
-  return 0;
407234b
-}
407234b
-
407234b
-int lgetfilecon(char const *,security_context_t *);
407234b
-int fgetfilecon(int,security_context_t *);
407234b
+int getpidcon(int,security_context_t *);
407234b
 
407234b
 #include <limits.h>
407234b
 
407234b
@@ -1509,6 +1456,58 @@
407234b
   return SWIG_AsVal_int(obj, (int*)0);
407234b
 }
407234b
 
407234b
+int getprevcon(security_context_t *);
407234b
+int getexeccon(security_context_t *);
407234b
+int setexeccon(security_context_t);
407234b
+int getfscreatecon(security_context_t *);
407234b
+int setfscreatecon(security_context_t);
407234b
+int getfilecon(char const *,security_context_t *);
3371166
+
407234b
+/* returns SWIG_OLDOBJ if the input is a raw char*, SWIG_PYSTR if is a PyString */
407234b
+SWIGINTERN int
407234b
+SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize)
407234b
+{
407234b
+  static swig_type_info* pchar_info = 0;
407234b
+  char* vptr = 0;
407234b
+  if (!pchar_info) pchar_info = SWIG_TypeQuery("char *");
407234b
+  if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_info, 0) != -1) {
407234b
+    if (cptr) *cptr = vptr;
407234b
+    if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
407234b
+    return SWIG_OLDOBJ;
407234b
+  } else {
407234b
+    PyErr_Clear();
407234b
+    if (PyString_Check(obj)) {
407234b
+      if (cptr) {
407234b
+	*cptr = PyString_AS_STRING(obj);
407234b
+	if (psize) {
407234b
+	  *psize = PyString_GET_SIZE(obj) + 1;
407234b
+	}
407234b
+      }
407234b
+      return SWIG_PYSTR;
407234b
+    }
407234b
+  }
407234b
+  if (cptr) {
407234b
+    SWIG_type_error("char *", obj);
407234b
+  }
407234b
+  return 0;
407234b
+}
407234b
+
407234b
+
407234b
+SWIGINTERNSHORT int
407234b
+SWIG_AsCharPtr(PyObject *obj, char **val)
407234b
+{
407234b
+  if (SWIG_AsCharPtrAndSize(obj, val, (size_t*)(0))) {
407234b
+    return 1;
407234b
+  }
407234b
+  if (val) {
407234b
+    PyErr_Clear();
407234b
+    SWIG_type_error("char *", obj);
407234b
+  }
407234b
+  return 0;
407234b
+}
407234b
+
407234b
+int lgetfilecon(char const *,security_context_t *);
407234b
+int fgetfilecon(int,security_context_t *);
407234b
 int setfilecon(char const *,security_context_t);
407234b
 int lsetfilecon(char const *,security_context_t);
407234b
 int fsetfilecon(int,security_context_t);
407234b
@@ -1799,7 +1798,7 @@
407234b
 
407234b
 static PyObject *_wrap_getpidcon(PyObject *self, PyObject *args) {
407234b
     PyObject *resultobj;
407234b
-    pid_t arg1 ;
407234b
+    int arg1 ;
407234b
     security_context_t *arg2 = (security_context_t *) 0 ;
407234b
     int result;
407234b
     security_context_t temp2 ;
407234b
@@ -1810,14 +1809,8 @@
407234b
     }
407234b
     if(!PyArg_ParseTuple(args,(char *)"O:getpidcon",&obj0)) goto fail;
407234b
     {
407234b
-        pid_t * argp;
407234b
-        SWIG_Python_ConvertPtr(obj0, (void **)&argp, SWIGTYPE_p_pid_t, SWIG_POINTER_EXCEPTION);
407234b
-        if (SWIG_arg_fail(1)) SWIG_fail;
407234b
-        if (argp == NULL) {
407234b
-            SWIG_null_ref("pid_t");
407234b
-        }
407234b
+        arg1 = (int)(SWIG_As_int(obj0)); 
407234b
         if (SWIG_arg_fail(1)) SWIG_fail;
407234b
-        arg1 = *argp;
407234b
     }
407234b
     result = (int)getpidcon(arg1,arg2);
407234b
     
407234b
@@ -3142,7 +3135,6 @@
407234b
 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
407234b
 
407234b
 static swig_type_info _swigt__p_mode_t[] = {{"_p_mode_t", 0, "mode_t *", 0, 0, 0, 0},{"_p_mode_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
407234b
-static swig_type_info _swigt__p_pid_t[] = {{"_p_pid_t", 0, "pid_t *", 0, 0, 0, 0},{"_p_pid_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
407234b
 static swig_type_info _swigt__p_SELboolean[] = {{"_p_SELboolean", 0, "SELboolean *", 0, 0, 0, 0},{"_p_SELboolean", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
407234b
 static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
407234b
 static swig_type_info _swigt__p_p_p_char[] = {{"_p_p_p_char", 0, "char ***", 0, 0, 0, 0},{"_p_p_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
407234b
@@ -3155,7 +3147,6 @@
407234b
 
407234b
 static swig_type_info *swig_types_initial[] = {
407234b
 _swigt__p_mode_t, 
407234b
-_swigt__p_pid_t, 
407234b
 _swigt__p_SELboolean, 
407234b
 _swigt__p_char, 
407234b
 _swigt__p_p_p_char,