return - seuser and level. ipa will populate file in future. - Change selinuxdefcon to return just the context by default
		
			
				
	
	
		
			3081 lines
		
	
	
		
			97 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
			
		
		
	
	
			3081 lines
		
	
	
		
			97 KiB
		
	
	
	
		
			Diff
		
	
	
	
	
	
| diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h libselinux-2.0.76/include/selinux/selinux.h
 | |
| --- nsalibselinux/include/selinux/selinux.h	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/include/selinux/selinux.h	2008-12-12 10:06:21.000000000 -0500
 | |
| @@ -511,6 +511,14 @@
 | |
|     Caller must free the returned strings via free. */
 | |
|  extern int getseuserbyname(const char *linuxuser, char **seuser, char **level);
 | |
|  
 | |
| +/* Get the SELinux username and level to use for a given Linux username and service. 
 | |
| +   These values may then be passed into the get_ordered_context_list*
 | |
| +   and get_default_context* functions to obtain a context for the user.
 | |
| +   Returns 0 on success or -1 otherwise.
 | |
| +   Caller must free the returned strings via free. */
 | |
| +extern int getseuser(const char *username, const char *service, 
 | |
| +		     char **r_seuser, char **r_level);
 | |
| +
 | |
|  /* Compare two file contexts, return 0 if equivalent. */
 | |
|  int selinux_file_context_cmp(const security_context_t a,
 | |
|  			     const security_context_t b);
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxconlist.8 libselinux-2.0.76/man/man8/selinuxconlist.8
 | |
| --- nsalibselinux/man/man8/selinuxconlist.8	1969-12-31 19:00:00.000000000 -0500
 | |
| +++ libselinux-2.0.76/man/man8/selinuxconlist.8	2008-12-02 09:14:48.000000000 -0500
 | |
| @@ -0,0 +1,18 @@
 | |
| +.TH "selinuxconlist" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation"
 | |
| +.SH "NAME"
 | |
| +selinuxconlist \- list all SELinux context reachable for user
 | |
| +.SH "SYNOPSIS"
 | |
| +.B selinuxconlist [-l level] user [context]
 | |
| +
 | |
| +.SH "DESCRIPTION"
 | |
| +.B selinuxconlist
 | |
| +reports the list of context reachable for user from the current context or specified context
 | |
| +
 | |
| +.B \-l level
 | |
| +mcs/mls level
 | |
| +
 | |
| +.SH AUTHOR	
 | |
| +This manual page was written by Dan Walsh <dwalsh@redhat.com>.
 | |
| +
 | |
| +.SH "SEE ALSO"
 | |
| +secon(8), selinuxdefcon(8)
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/man/man8/selinuxdefcon.8 libselinux-2.0.76/man/man8/selinuxdefcon.8
 | |
| --- nsalibselinux/man/man8/selinuxdefcon.8	1969-12-31 19:00:00.000000000 -0500
 | |
| +++ libselinux-2.0.76/man/man8/selinuxdefcon.8	2008-12-02 09:14:48.000000000 -0500
 | |
| @@ -0,0 +1,19 @@
 | |
| +.TH "selinuxdefcon" "1" "7 May 2008" "dwalsh@redhat.com" "SELinux Command Line documentation"
 | |
| +.SH "NAME"
 | |
| +selinuxdefcon \- list default SELinux context for user 
 | |
| +
 | |
| +.SH "SYNOPSIS"
 | |
| +.B selinuxdefcon [-l level] user [fromcon]
 | |
| +
 | |
| +.SH "DESCRIPTION"
 | |
| +.B seconlist
 | |
| +reports the default context for the specified user from current context or specified context
 | |
| +
 | |
| +.B \-l level
 | |
| +mcs/mls level
 | |
| +
 | |
| +.SH AUTHOR	
 | |
| +This manual page was written by Dan Walsh <dwalsh@redhat.com>.
 | |
| +
 | |
| +.SH "SEE ALSO"
 | |
| +secon(8), selinuxconlist(8)
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/src/callbacks.c libselinux-2.0.76/src/callbacks.c
 | |
| --- nsalibselinux/src/callbacks.c	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/src/callbacks.c	2008-12-02 09:14:48.000000000 -0500
 | |
| @@ -16,6 +16,7 @@
 | |
|  {
 | |
|  	int rc;
 | |
|  	va_list ap;
 | |
| +	if (is_selinux_enabled() == 0) return 0;
 | |
|  	va_start(ap, fmt);
 | |
|  	rc = vfprintf(stderr, fmt, ap);
 | |
|  	va_end(ap);
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.76/src/matchpathcon.c
 | |
| --- nsalibselinux/src/matchpathcon.c	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/src/matchpathcon.c	2008-12-02 09:14:48.000000000 -0500
 | |
| @@ -2,6 +2,7 @@
 | |
|  #include <string.h>
 | |
|  #include <errno.h>
 | |
|  #include <stdio.h>
 | |
| +#include <syslog.h>
 | |
|  #include "selinux_internal.h"
 | |
|  #include "label_internal.h"
 | |
|  #include "callbacks.h"
 | |
| @@ -57,7 +58,7 @@
 | |
|  {
 | |
|  	va_list ap;
 | |
|  	va_start(ap, fmt);
 | |
| -	vfprintf(stderr, fmt, ap);
 | |
| +	vsyslog(LOG_ERR, fmt, ap);
 | |
|  	va_end(ap);
 | |
|  }
 | |
|  
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux.py libselinux-2.0.76/src/selinux.py
 | |
| --- nsalibselinux/src/selinux.py	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/src/selinux.py	2008-12-12 10:08:01.000000000 -0500
 | |
| @@ -1,5 +1,5 @@
 | |
|  # This file was automatically generated by SWIG (http://www.swig.org).
 | |
| -# Version 1.3.33
 | |
| +# Version 1.3.36
 | |
|  #
 | |
|  # Don't modify this file, modify the SWIG interface instead.
 | |
|  # This file is compatible with both classic and new-style classes.
 | |
| @@ -48,6 +48,29 @@
 | |
|  del types
 | |
|  
 | |
|  
 | |
| +import shutil, os, stat
 | |
| +
 | |
| +def restorecon(path, recursive=False):
 | |
| +    """ Restore SELinux context on a given path """
 | |
| +    mode = os.stat(path)[stat.ST_MODE]
 | |
| +    status, context = matchpathcon(path, mode)
 | |
| +    if status == 0:
 | |
| +        lsetfilecon(path, context)
 | |
| +        if recursive:
 | |
| +            os.path.walk(path, lambda arg, dirname, fnames:
 | |
| +                             map(restorecon, [os.path.join(dirname, fname)
 | |
| +                                              for fname in fnames]), None)
 | |
| +
 | |
| +def copytree(src, dest):
 | |
| +    """ An SELinux-friendly shutil.copytree method """
 | |
| +    shutil.copytree(src, dest)
 | |
| +    restorecon(dest, recursive=True)
 | |
| +
 | |
| +def install(src, dest):
 | |
| +    """ An SELinux-friendly shutil.move method """
 | |
| +    shutil.move(src, dest)
 | |
| +    restorecon(dest, recursive=True)
 | |
| +
 | |
|  is_selinux_enabled = _selinux.is_selinux_enabled
 | |
|  is_selinux_mls_enabled = _selinux.is_selinux_mls_enabled
 | |
|  getcon = _selinux.getcon
 | |
| @@ -297,6 +320,7 @@
 | |
|  selinux_trans_to_raw_context = _selinux.selinux_trans_to_raw_context
 | |
|  selinux_raw_to_trans_context = _selinux.selinux_raw_to_trans_context
 | |
|  getseuserbyname = _selinux.getseuserbyname
 | |
| +getseuser = _selinux.getseuser
 | |
|  selinux_file_context_cmp = _selinux.selinux_file_context_cmp
 | |
|  selinux_file_context_verify = _selinux.selinux_file_context_verify
 | |
|  selinux_lsetfilecon_default = _selinux.selinux_lsetfilecon_default
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_python.i libselinux-2.0.76/src/selinuxswig_python.i
 | |
| --- nsalibselinux/src/selinuxswig_python.i	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/src/selinuxswig_python.i	2008-12-02 09:14:48.000000000 -0500
 | |
| @@ -6,6 +6,32 @@
 | |
|  	#include "selinux/selinux.h"
 | |
|  %}
 | |
|  
 | |
| +%pythoncode %{
 | |
| +
 | |
| +import shutil, os, stat
 | |
| +
 | |
| +def restorecon(path, recursive=False):
 | |
| +    """ Restore SELinux context on a given path """
 | |
| +    mode = os.stat(path)[stat.ST_MODE]
 | |
| +    status, context = matchpathcon(path, mode)
 | |
| +    if status == 0:
 | |
| +        lsetfilecon(path, context)
 | |
| +        if recursive:
 | |
| +            os.path.walk(path, lambda arg, dirname, fnames:
 | |
| +                             map(restorecon, [os.path.join(dirname, fname)
 | |
| +                                              for fname in fnames]), None)
 | |
| +
 | |
| +def copytree(src, dest):
 | |
| +    """ An SELinux-friendly shutil.copytree method """
 | |
| +    shutil.copytree(src, dest)
 | |
| +    restorecon(dest, recursive=True)
 | |
| +
 | |
| +def install(src, dest):
 | |
| +    """ An SELinux-friendly shutil.move method """
 | |
| +    shutil.move(src, dest)
 | |
| +    restorecon(dest, recursive=True)
 | |
| +%}
 | |
| +
 | |
|  /* security_get_boolean_names() typemap */
 | |
|  %typemap(argout) (char ***names, int *len) {
 | |
|  	PyObject* list = PyList_New(*$2);
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinuxswig_wrap.c libselinux-2.0.76/src/selinuxswig_wrap.c
 | |
| --- nsalibselinux/src/selinuxswig_wrap.c	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/src/selinuxswig_wrap.c	2008-12-12 10:08:01.000000000 -0500
 | |
| @@ -1,6 +1,6 @@
 | |
|  /* ----------------------------------------------------------------------------
 | |
|   * This file was automatically generated by SWIG (http://www.swig.org).
 | |
| - * Version 1.3.33
 | |
| + * Version 1.3.36
 | |
|   * 
 | |
|   * This file is not intended to be easily readable and contains a number of 
 | |
|   * coding conventions designed to improve portability and efficiency. Do not make
 | |
| @@ -52,6 +52,12 @@
 | |
|  # endif
 | |
|  #endif
 | |
|  
 | |
| +#ifndef SWIG_MSC_UNSUPPRESS_4505
 | |
| +# if defined(_MSC_VER)
 | |
| +#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
 | |
| +# endif 
 | |
| +#endif
 | |
| +
 | |
|  #ifndef SWIGUNUSEDPARM
 | |
|  # ifdef __cplusplus
 | |
|  #   define SWIGUNUSEDPARM(p)
 | |
| @@ -126,7 +132,7 @@
 | |
|  
 | |
|  /* This should only be incremented when either the layout of swig_type_info changes,
 | |
|     or for whatever reason, the runtime changes incompatibly */
 | |
| -#define SWIG_RUNTIME_VERSION "3"
 | |
| +#define SWIG_RUNTIME_VERSION "4"
 | |
|  
 | |
|  /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
 | |
|  #ifdef SWIG_TYPE_TABLE
 | |
| @@ -161,6 +167,7 @@
 | |
|  
 | |
|  /* Flags for pointer conversions */
 | |
|  #define SWIG_POINTER_DISOWN        0x1
 | |
| +#define SWIG_CAST_NEW_MEMORY       0x2
 | |
|  
 | |
|  /* Flags for new pointer objects */
 | |
|  #define SWIG_POINTER_OWN           0x1
 | |
| @@ -301,10 +308,10 @@
 | |
|  extern "C" {
 | |
|  #endif
 | |
|  
 | |
| -typedef void *(*swig_converter_func)(void *);
 | |
| +typedef void *(*swig_converter_func)(void *, int *);
 | |
|  typedef struct swig_type_info *(*swig_dycast_func)(void **);
 | |
|  
 | |
| -/* Structure to store inforomation on one type */
 | |
| +/* Structure to store information on one type */
 | |
|  typedef struct swig_type_info {
 | |
|    const char             *name;			/* mangled name of this type */
 | |
|    const char             *str;			/* human readable name of this type */
 | |
| @@ -431,8 +438,8 @@
 | |
|    Cast a pointer up an inheritance hierarchy
 | |
|  */
 | |
|  SWIGRUNTIMEINLINE void *
 | |
| -SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
 | |
| -  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
 | |
| +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
 | |
| +  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
 | |
|  }
 | |
|  
 | |
|  /* 
 | |
| @@ -856,7 +863,7 @@
 | |
|      Py_DECREF(old_str);
 | |
|      Py_DECREF(value);
 | |
|    } else {
 | |
| -    PyErr_Format(PyExc_RuntimeError, mesg);
 | |
| +    PyErr_SetString(PyExc_RuntimeError, mesg);
 | |
|    }
 | |
|  }
 | |
|  
 | |
| @@ -1416,7 +1423,7 @@
 | |
|  {
 | |
|    PySwigObject *sobj = (PySwigObject *) v;
 | |
|    PyObject *next = sobj->next;
 | |
| -  if (sobj->own) {
 | |
| +  if (sobj->own == SWIG_POINTER_OWN) {
 | |
|      swig_type_info *ty = sobj->ty;
 | |
|      PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
 | |
|      PyObject *destroy = data ? data->destroy : 0;
 | |
| @@ -1434,12 +1441,13 @@
 | |
|  	res = ((*meth)(mself, v));
 | |
|        }
 | |
|        Py_XDECREF(res);
 | |
| -    } else {
 | |
| -      const char *name = SWIG_TypePrettyName(ty);
 | |
| +    } 
 | |
|  #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
 | |
| -      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
 | |
| -#endif
 | |
| +    else {
 | |
| +      const char *name = SWIG_TypePrettyName(ty);
 | |
| +      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
 | |
|      }
 | |
| +#endif
 | |
|    } 
 | |
|    Py_XDECREF(next);
 | |
|    PyObject_DEL(v);
 | |
| @@ -1944,7 +1952,7 @@
 | |
|  
 | |
|  SWIGRUNTIME int
 | |
|  SWIG_Python_AcquirePtr(PyObject *obj, int own) {
 | |
| -  if (own) {
 | |
| +  if (own == SWIG_POINTER_OWN) {
 | |
|      PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
 | |
|      if (sobj) {
 | |
|        int oldown = sobj->own;
 | |
| @@ -1965,6 +1973,8 @@
 | |
|      return SWIG_OK;
 | |
|    } else {
 | |
|      PySwigObject *sobj = SWIG_Python_GetSwigThis(obj);
 | |
| +    if (own)
 | |
| +      *own = 0;
 | |
|      while (sobj) {
 | |
|        void *vptr = sobj->ptr;
 | |
|        if (ty) {
 | |
| @@ -1978,7 +1988,15 @@
 | |
|  	  if (!tc) {
 | |
|  	    sobj = (PySwigObject *)sobj->next;
 | |
|  	  } else {
 | |
| -	    if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
 | |
| +	    if (ptr) {
 | |
| +              int newmemory = 0;
 | |
| +              *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
 | |
| +              if (newmemory == SWIG_CAST_NEW_MEMORY) {
 | |
| +                assert(own);
 | |
| +                if (own)
 | |
| +                  *own = *own | SWIG_CAST_NEW_MEMORY;
 | |
| +              }
 | |
| +            }
 | |
|  	    break;
 | |
|  	  }
 | |
|  	}
 | |
| @@ -1988,7 +2006,8 @@
 | |
|        }
 | |
|      }
 | |
|      if (sobj) {
 | |
| -      if (own) *own = sobj->own;
 | |
| +      if (own)
 | |
| +        *own = *own | sobj->own;
 | |
|        if (flags & SWIG_POINTER_DISOWN) {
 | |
|  	sobj->own = 0;
 | |
|        }
 | |
| @@ -2053,8 +2072,13 @@
 | |
|      }
 | |
|      if (ty) {
 | |
|        swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
 | |
| -      if (!tc) return SWIG_ERROR;
 | |
| -      *ptr = SWIG_TypeCast(tc,vptr);
 | |
| +      if (tc) {
 | |
| +        int newmemory = 0;
 | |
| +        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
 | |
| +        assert(!newmemory); /* newmemory handling not yet implemented */
 | |
| +      } else {
 | |
| +        return SWIG_ERROR;
 | |
| +      }
 | |
|      } else {
 | |
|        *ptr = vptr;
 | |
|      }
 | |
| @@ -2506,7 +2530,7 @@
 | |
|  
 | |
|  #define SWIG_name    "_selinux"
 | |
|  
 | |
| -#define SWIGVERSION 0x010333 
 | |
| +#define SWIGVERSION 0x010336 
 | |
|  #define SWIG_VERSION SWIGVERSION
 | |
|  
 | |
|  
 | |
| @@ -2910,8 +2934,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getcon")) SWIG_fail;
 | |
| @@ -2934,8 +2958,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getcon_raw")) SWIG_fail;
 | |
| @@ -2958,11 +2982,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setcon",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -2983,11 +3007,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setcon_raw",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3009,11 +3033,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    pid_t arg1 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    unsigned int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:getpidcon",&obj0)) SWIG_fail;
 | |
| @@ -3042,11 +3066,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    pid_t arg1 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    unsigned int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:getpidcon_raw",&obj0)) SWIG_fail;
 | |
| @@ -3074,8 +3098,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getprevcon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getprevcon")) SWIG_fail;
 | |
| @@ -3098,8 +3122,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getprevcon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getprevcon_raw")) SWIG_fail;
 | |
| @@ -3122,8 +3146,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getexeccon")) SWIG_fail;
 | |
| @@ -3146,8 +3170,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getexeccon_raw")) SWIG_fail;
 | |
| @@ -3170,11 +3194,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setexeccon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setexeccon",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3195,11 +3219,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setexeccon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setexeccon_raw",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3220,8 +3244,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getfscreatecon")) SWIG_fail;
 | |
| @@ -3244,8 +3268,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getfscreatecon_raw")) SWIG_fail;
 | |
| @@ -3268,11 +3292,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setfscreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3293,11 +3317,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setfscreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setfscreatecon_raw",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3318,8 +3342,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon")) SWIG_fail;
 | |
| @@ -3342,8 +3366,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getkeycreatecon_raw")) SWIG_fail;
 | |
| @@ -3366,11 +3390,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setkeycreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3391,11 +3415,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setkeycreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setkeycreatecon_raw",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3416,8 +3440,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon")) SWIG_fail;
 | |
| @@ -3440,8 +3464,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_getsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":getsockcreatecon_raw")) SWIG_fail;
 | |
| @@ -3464,11 +3488,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setsockcreatecon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3489,11 +3513,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_setsockcreatecon_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:setsockcreatecon_raw",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3515,12 +3539,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:getfilecon",&obj0)) SWIG_fail;
 | |
| @@ -3551,12 +3575,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:getfilecon_raw",&obj0)) SWIG_fail;
 | |
| @@ -3587,12 +3611,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon",&obj0)) SWIG_fail;
 | |
| @@ -3623,12 +3647,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:lgetfilecon_raw",&obj0)) SWIG_fail;
 | |
| @@ -3659,11 +3683,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon",&obj0)) SWIG_fail;
 | |
| @@ -3692,11 +3716,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:fgetfilecon_raw",&obj0)) SWIG_fail;
 | |
| @@ -3725,7 +3749,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -3734,6 +3757,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3762,7 +3786,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -3771,6 +3794,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:setfilecon_raw",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3799,7 +3823,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -3808,6 +3831,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3836,7 +3860,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -3845,6 +3868,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:lsetfilecon_raw",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -3873,7 +3897,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    int res2 ;
 | |
| @@ -3881,6 +3904,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon",&obj0,&obj1)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_int(obj0, &val1);
 | |
| @@ -3907,7 +3931,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    int res2 ;
 | |
| @@ -3915,6 +3938,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:fsetfilecon_raw",&obj0,&obj1)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_int(obj0, &val1);
 | |
| @@ -3941,11 +3965,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:getpeercon",&obj0)) SWIG_fail;
 | |
| @@ -3974,11 +3998,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:getpeercon_raw",&obj0)) SWIG_fail;
 | |
| @@ -4026,7 +4050,6 @@
 | |
|    } 
 | |
|    arg2 = (access_vector_t)(val2);
 | |
|    if (arg1) (arg1)->allowed = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4037,10 +4060,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_av_decision_allowed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct av_decision *arg1 = (struct av_decision *) 0 ;
 | |
| -  access_vector_t result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  access_vector_t result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:av_decision_allowed_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 |  0 );
 | |
| @@ -4079,7 +4102,6 @@
 | |
|    } 
 | |
|    arg2 = (access_vector_t)(val2);
 | |
|    if (arg1) (arg1)->decided = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4090,10 +4112,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_av_decision_decided_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct av_decision *arg1 = (struct av_decision *) 0 ;
 | |
| -  access_vector_t result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  access_vector_t result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:av_decision_decided_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 |  0 );
 | |
| @@ -4132,7 +4154,6 @@
 | |
|    } 
 | |
|    arg2 = (access_vector_t)(val2);
 | |
|    if (arg1) (arg1)->auditallow = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4143,10 +4164,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_av_decision_auditallow_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct av_decision *arg1 = (struct av_decision *) 0 ;
 | |
| -  access_vector_t result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  access_vector_t result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditallow_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 |  0 );
 | |
| @@ -4185,7 +4206,6 @@
 | |
|    } 
 | |
|    arg2 = (access_vector_t)(val2);
 | |
|    if (arg1) (arg1)->auditdeny = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4196,10 +4216,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_av_decision_auditdeny_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct av_decision *arg1 = (struct av_decision *) 0 ;
 | |
| -  access_vector_t result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  access_vector_t result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:av_decision_auditdeny_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 |  0 );
 | |
| @@ -4238,7 +4258,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->seqno = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4249,10 +4268,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_av_decision_seqno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct av_decision *arg1 = (struct av_decision *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:av_decision_seqno_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_av_decision, 0 |  0 );
 | |
| @@ -4273,7 +4292,7 @@
 | |
|    struct av_decision *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_av_decision")) SWIG_fail;
 | |
| -  result = (struct av_decision *)(struct av_decision *) calloc(1, sizeof(struct av_decision));
 | |
| +  result = (struct av_decision *)calloc(1, sizeof(struct av_decision));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_av_decision, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4295,7 +4314,6 @@
 | |
|    }
 | |
|    arg1 = (struct av_decision *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4305,7 +4323,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *av_decision_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_av_decision, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -4333,7 +4351,6 @@
 | |
|    } 
 | |
|    arg2 = (int)(val2);
 | |
|    if (arg1) (arg1)->type = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4344,10 +4361,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_opt_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct selinux_opt *arg1 = (struct selinux_opt *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_type_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 |  0 );
 | |
| @@ -4404,10 +4421,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_opt_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct selinux_opt *arg1 = (struct selinux_opt *) 0 ;
 | |
| -  char *result = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  char *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_opt_value_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 |  0 );
 | |
| @@ -4428,7 +4445,7 @@
 | |
|    struct selinux_opt *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_selinux_opt")) SWIG_fail;
 | |
| -  result = (struct selinux_opt *)(struct selinux_opt *) calloc(1, sizeof(struct selinux_opt));
 | |
| +  result = (struct selinux_opt *)calloc(1, sizeof(struct selinux_opt));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_selinux_opt, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4450,7 +4467,6 @@
 | |
|    }
 | |
|    arg1 = (struct selinux_opt *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4460,7 +4476,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *selinux_opt_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_selinux_opt, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -4487,7 +4503,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_log = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4498,10 +4513,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_callback_func_log_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    union selinux_callback *arg1 = (union selinux_callback *) 0 ;
 | |
| -  int (*result)(int,char const *,...) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int (*result)(int,char const *,...) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_log_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 |  0 );
 | |
| @@ -4539,7 +4554,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_audit = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4550,10 +4564,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_callback_func_audit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    union selinux_callback *arg1 = (union selinux_callback *) 0 ;
 | |
| -  int (*result)(void *,security_class_t,char *,size_t) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int (*result)(void *,security_class_t,char *,size_t) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_audit_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 |  0 );
 | |
| @@ -4591,7 +4605,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_validate = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4602,10 +4615,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_callback_func_validate_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    union selinux_callback *arg1 = (union selinux_callback *) 0 ;
 | |
| -  int (*result)(security_context_t *) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int (*result)(security_context_t *) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_callback_func_validate_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_callback, 0 |  0 );
 | |
| @@ -4626,7 +4639,7 @@
 | |
|    union selinux_callback *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_selinux_callback")) SWIG_fail;
 | |
| -  result = (union selinux_callback *)(union selinux_callback *) calloc(1, sizeof(union selinux_callback));
 | |
| +  result = (union selinux_callback *)calloc(1, sizeof(union selinux_callback));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_selinux_callback, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4648,7 +4661,6 @@
 | |
|    }
 | |
|    arg1 = (union selinux_callback *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -4658,7 +4670,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *selinux_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_selinux_callback, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -4666,10 +4678,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_get_callback(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
| -  union selinux_callback result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  union selinux_callback result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_get_callback",&obj0)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_int(obj0, &val1);
 | |
| @@ -4728,7 +4740,6 @@
 | |
|    security_class_t arg3 ;
 | |
|    access_vector_t arg4 ;
 | |
|    struct av_decision *arg5 = (struct av_decision *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -4746,6 +4757,7 @@
 | |
|    PyObject * obj2 = 0 ;
 | |
|    PyObject * obj3 = 0 ;
 | |
|    PyObject * obj4 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -4792,7 +4804,6 @@
 | |
|    security_class_t arg3 ;
 | |
|    access_vector_t arg4 ;
 | |
|    struct av_decision *arg5 = (struct av_decision *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -4810,6 +4821,7 @@
 | |
|    PyObject * obj2 = 0 ;
 | |
|    PyObject * obj3 = 0 ;
 | |
|    PyObject * obj4 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOOOO:security_compute_av_raw",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -4855,7 +4867,6 @@
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -4868,6 +4879,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -4912,7 +4924,6 @@
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -4925,6 +4936,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_create_raw",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -4969,7 +4981,6 @@
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -4982,6 +4993,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -5026,7 +5038,6 @@
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -5039,6 +5050,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_relabel_raw",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -5083,7 +5095,6 @@
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -5096,6 +5107,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -5140,7 +5152,6 @@
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -5153,6 +5164,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:security_compute_member_raw",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -5196,7 +5208,6 @@
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    char *arg2 = (char *) 0 ;
 | |
|    security_context_t **arg3 = (security_context_t **) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -5206,6 +5217,7 @@
 | |
|    security_context_t *temp3 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg3 = &temp3;
 | |
| @@ -5261,7 +5273,6 @@
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    char *arg2 = (char *) 0 ;
 | |
|    security_context_t **arg3 = (security_context_t **) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -5271,6 +5282,7 @@
 | |
|    security_context_t *temp3 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg3 = &temp3;
 | |
| @@ -5325,12 +5337,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    void *arg1 = (void *) 0 ;
 | |
|    size_t arg2 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    size_t val2 ;
 | |
|    int ecode2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:security_load_policy",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
 | |
| @@ -5354,12 +5366,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context",&obj0)) SWIG_fail;
 | |
| @@ -5390,12 +5402,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_get_initial_context_raw",&obj0)) SWIG_fail;
 | |
| @@ -5425,10 +5437,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_mkload_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_mkload_policy",&obj0)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_int(obj0, &val1);
 | |
| @@ -5447,9 +5459,9 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_init_load_policy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    int *arg1 = (int *) 0 ;
 | |
| -  int result;
 | |
|    int temp1 ;
 | |
|    int res1 = SWIG_TMPOBJ ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":selinux_init_load_policy")) SWIG_fail;
 | |
| @@ -5509,10 +5521,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_SELboolean_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    SELboolean *arg1 = (SELboolean *) 0 ;
 | |
| -  char *result = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  char *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_name_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 |  0 );
 | |
| @@ -5551,7 +5563,6 @@
 | |
|    } 
 | |
|    arg2 = (int)(val2);
 | |
|    if (arg1) (arg1)->value = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -5562,10 +5573,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_SELboolean_value_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    SELboolean *arg1 = (SELboolean *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:SELboolean_value_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_SELboolean, 0 |  0 );
 | |
| @@ -5586,7 +5597,7 @@
 | |
|    SELboolean *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_SELboolean")) SWIG_fail;
 | |
| -  result = (SELboolean *)(SELboolean *) calloc(1, sizeof(SELboolean));
 | |
| +  result = (SELboolean *)calloc(1, sizeof(SELboolean));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_SELboolean, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -5608,7 +5619,6 @@
 | |
|    }
 | |
|    arg1 = (SELboolean *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -5618,7 +5628,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *SELboolean_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_SELboolean, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -5628,7 +5638,6 @@
 | |
|    size_t arg1 ;
 | |
|    SELboolean *arg2 = (SELboolean *) 0 ;
 | |
|    int arg3 ;
 | |
| -  int result;
 | |
|    size_t val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    void *argp2 = 0 ;
 | |
| @@ -5638,6 +5647,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:security_set_boolean_list",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_size_t(obj0, &val1);
 | |
| @@ -5666,11 +5676,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_load_booleans(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_load_booleans",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -5691,11 +5701,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_check_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_check_context",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -5716,11 +5726,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_check_context_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_check_context_raw",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -5742,12 +5752,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context",&obj0)) SWIG_fail;
 | |
| @@ -5778,12 +5788,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_canonicalize_context_raw",&obj0)) SWIG_fail;
 | |
| @@ -5826,10 +5836,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_setenforce(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    int arg1 ;
 | |
| -  int result;
 | |
|    int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_setenforce",&obj0)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_int(obj0, &val1);
 | |
| @@ -5875,9 +5885,9 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char ***arg1 = (char ***) 0 ;
 | |
|    int *arg2 = (int *) 0 ;
 | |
| -  int result;
 | |
|    char **temp11 ;
 | |
|    int temp21 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg1 = &temp11;
 | |
| @@ -5921,11 +5931,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_get_boolean_pending(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_pending",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -5946,11 +5956,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_get_boolean_active(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_get_boolean_active",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -5972,7 +5982,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    int arg2 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -5980,6 +5989,7 @@
 | |
|    int ecode2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:security_set_boolean",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -6056,10 +6066,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_class_mapping_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ;
 | |
| -  char *result = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  char *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_name_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 |  0 );
 | |
| @@ -6115,10 +6125,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_class_mapping_perms_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ;
 | |
| -  char **result = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  char **result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_class_mapping_perms_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 |  0 );
 | |
| @@ -6139,7 +6149,7 @@
 | |
|    struct security_class_mapping *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_security_class_mapping")) SWIG_fail;
 | |
| -  result = (struct security_class_mapping *)(struct security_class_mapping *) calloc(1, sizeof(struct security_class_mapping));
 | |
| +  result = (struct security_class_mapping *)calloc(1, sizeof(struct security_class_mapping));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_class_mapping, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -6161,7 +6171,6 @@
 | |
|    }
 | |
|    arg1 = (struct security_class_mapping *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -6171,7 +6180,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *security_class_mapping_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_security_class_mapping, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -6179,10 +6188,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_set_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct security_class_mapping *arg1 = (struct security_class_mapping *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_set_mapping",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_class_mapping, 0 |  0 );
 | |
| @@ -6201,11 +6210,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_string_to_security_class(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
| -  security_class_t result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  security_class_t result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:string_to_security_class",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -6226,10 +6235,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_class_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_class_t arg1 ;
 | |
| -  char *result = 0 ;
 | |
|    unsigned short val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  char *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_class_to_string",&obj0)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1);
 | |
| @@ -6249,13 +6258,13 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_class_t arg1 ;
 | |
|    access_vector_t arg2 ;
 | |
| -  char *result = 0 ;
 | |
|    unsigned short val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    unsigned int val2 ;
 | |
|    int ecode2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  char *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:security_av_perm_to_string",&obj0,&obj1)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1);
 | |
| @@ -6280,7 +6289,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_class_t arg1 ;
 | |
|    char *arg2 = (char *) 0 ;
 | |
| -  access_vector_t result;
 | |
|    unsigned short val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    int res2 ;
 | |
| @@ -6288,6 +6296,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  access_vector_t result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:string_to_av_perm",&obj0,&obj1)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_unsigned_SS_short(obj0, &val1);
 | |
| @@ -6315,7 +6324,6 @@
 | |
|    security_class_t arg1 ;
 | |
|    access_vector_t arg2 ;
 | |
|    char **arg3 = (char **) 0 ;
 | |
| -  int result;
 | |
|    unsigned short val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    unsigned int val2 ;
 | |
| @@ -6323,6 +6331,7 @@
 | |
|    char *temp3 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg3 = &temp3;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:security_av_string",&obj0,&obj1)) SWIG_fail;
 | |
| @@ -6406,11 +6415,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_matchpathcon_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:matchpathcon_init",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -6432,7 +6441,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    char *arg2 = (char *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -6441,6 +6449,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_init_prefix",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -6482,7 +6491,6 @@
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    mode_t arg2 ;
 | |
|    security_context_t *arg3 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -6491,6 +6499,7 @@
 | |
|    security_context_t temp3 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg3 = &temp3;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon",&obj0,&obj1)) SWIG_fail;
 | |
| @@ -6527,7 +6536,6 @@
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    mode_t arg2 ;
 | |
|    security_context_t *arg3 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -6536,6 +6544,7 @@
 | |
|    security_context_t temp3 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg3 = &temp3;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:matchpathcon_index",&obj0,&obj1)) SWIG_fail;
 | |
| @@ -6572,7 +6581,6 @@
 | |
|    ino_t arg1 ;
 | |
|    int arg2 ;
 | |
|    char *arg3 = (char *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 ;
 | |
|    int res1 = 0 ;
 | |
|    int val2 ;
 | |
| @@ -6583,6 +6591,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:matchpathcon_filespec_add",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
|    {
 | |
| @@ -6668,12 +6677,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:matchmediacon",&obj0)) SWIG_fail;
 | |
| @@ -6703,9 +6712,9 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_getenforcemode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    int *arg1 = (int *) 0 ;
 | |
| -  int result;
 | |
|    int temp1 ;
 | |
|    int res1 = SWIG_TMPOBJ ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":selinux_getenforcemode")) SWIG_fail;
 | |
| @@ -6726,8 +6735,8 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_getpolicytype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    char **arg1 = (char **) 0 ;
 | |
| -  int result;
 | |
|    char *temp1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    if (!PyArg_ParseTuple(args,(char *)":selinux_getpolicytype")) SWIG_fail;
 | |
| @@ -7023,10 +7032,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_check_passwd_access(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    access_vector_t arg1 ;
 | |
| -  int result;
 | |
|    unsigned int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_passwd_access",&obj0)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
 | |
| @@ -7045,10 +7054,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_checkPasswdAccess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    access_vector_t arg1 ;
 | |
| -  int result;
 | |
|    unsigned int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:checkPasswdAccess",&obj0)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
 | |
| @@ -7067,11 +7076,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_check_securetty_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_check_securetty_context",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -7119,7 +7128,6 @@
 | |
|    char *arg2 = (char *) 0 ;
 | |
|    char **arg3 ;
 | |
|    char **arg4 ;
 | |
| -  int result;
 | |
|    unsigned int val1 ;
 | |
|    int ecode1 = 0 ;
 | |
|    int res2 ;
 | |
| @@ -7129,6 +7137,7 @@
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
|    PyObject * obj3 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOOO:rpm_execcon",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
 | |
|    ecode1 = SWIG_AsVal_unsigned_SS_int(obj0, &val1);
 | |
| @@ -7240,11 +7249,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_is_context_customizable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:is_context_customizable",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -7266,12 +7275,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_trans_to_raw_context",&obj0)) SWIG_fail;
 | |
| @@ -7302,12 +7311,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_raw_to_trans_context",&obj0)) SWIG_fail;
 | |
| @@ -7339,13 +7348,13 @@
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    char **arg2 = (char **) 0 ;
 | |
|    char **arg3 = (char **) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    char *temp2 = 0 ;
 | |
|    char *temp3 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    arg3 = &temp3;
 | |
| @@ -7381,11 +7390,69 @@
 | |
|  }
 | |
|  
 | |
|  
 | |
| +SWIGINTERN PyObject *_wrap_getseuser(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
| +  PyObject *resultobj = 0;
 | |
| +  char *arg1 = (char *) 0 ;
 | |
| +  char *arg2 = (char *) 0 ;
 | |
| +  char **arg3 = (char **) 0 ;
 | |
| +  char **arg4 = (char **) 0 ;
 | |
| +  int res1 ;
 | |
| +  char *buf1 = 0 ;
 | |
| +  int alloc1 = 0 ;
 | |
| +  int res2 ;
 | |
| +  char *buf2 = 0 ;
 | |
| +  int alloc2 = 0 ;
 | |
| +  char *temp3 = 0 ;
 | |
| +  char *temp4 = 0 ;
 | |
| +  PyObject * obj0 = 0 ;
 | |
| +  PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
| +  
 | |
| +  arg3 = &temp3;
 | |
| +  arg4 = &temp4;
 | |
| +  if (!PyArg_ParseTuple(args,(char *)"OO:getseuser",&obj0,&obj1)) SWIG_fail;
 | |
| +  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| +  if (!SWIG_IsOK(res1)) {
 | |
| +    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getseuser" "', argument " "1"" of type '" "char const *""'");
 | |
| +  }
 | |
| +  arg1 = (char *)(buf1);
 | |
| +  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
 | |
| +  if (!SWIG_IsOK(res2)) {
 | |
| +    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "getseuser" "', argument " "2"" of type '" "char const *""'");
 | |
| +  }
 | |
| +  arg2 = (char *)(buf2);
 | |
| +  result = (int)getseuser((char const *)arg1,(char const *)arg2,arg3,arg4);
 | |
| +  resultobj = SWIG_From_int((int)(result));
 | |
| +  if (*arg3) {
 | |
| +    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg3));
 | |
| +    free(*arg3);
 | |
| +  }
 | |
| +  else {
 | |
| +    Py_INCREF(Py_None);
 | |
| +    resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
 | |
| +  }
 | |
| +  if (*arg4) {
 | |
| +    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_FromCharPtr(*arg4));
 | |
| +    free(*arg4);
 | |
| +  }
 | |
| +  else {
 | |
| +    Py_INCREF(Py_None);
 | |
| +    resultobj = SWIG_Python_AppendOutput(resultobj, Py_None);
 | |
| +  }
 | |
| +  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
 | |
| +  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
 | |
| +  return resultobj;
 | |
| +fail:
 | |
| +  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
 | |
| +  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
 | |
| +  return NULL;
 | |
| +}
 | |
| +
 | |
| +
 | |
|  SWIGINTERN PyObject *_wrap_selinux_file_context_cmp(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) (security_context_t)0 ;
 | |
|    security_context_t arg2 = (security_context_t) (security_context_t)0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -7394,6 +7461,7 @@
 | |
|    int alloc2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_cmp",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -7422,7 +7490,6 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    mode_t arg2 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -7430,6 +7497,7 @@
 | |
|    int ecode2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:selinux_file_context_verify",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -7455,11 +7523,11 @@
 | |
|  SWIGINTERN PyObject *_wrap_selinux_lsetfilecon_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:selinux_lsetfilecon_default",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -7519,10 +7587,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_id_ctx_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct security_id *arg1 = (struct security_id *) 0 ;
 | |
| -  security_context_t result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  security_context_t result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_id_ctx_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 |  0 );
 | |
| @@ -7561,7 +7629,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->refcnt = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -7572,10 +7639,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_security_id_refcnt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct security_id *arg1 = (struct security_id *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:security_id_refcnt_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 |  0 );
 | |
| @@ -7596,7 +7663,7 @@
 | |
|    struct security_id *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_security_id")) SWIG_fail;
 | |
| -  result = (struct security_id *)(struct security_id *) calloc(1, sizeof(struct security_id));
 | |
| +  result = (struct security_id *)calloc(1, sizeof(struct security_id));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_security_id, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -7618,7 +7685,6 @@
 | |
|    }
 | |
|    arg1 = (struct security_id *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -7628,7 +7694,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *security_id_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_security_id, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -7637,11 +7703,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_id_t arg1 = (security_id_t) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context",&obj0)) SWIG_fail;
 | |
| @@ -7670,11 +7736,11 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_id_t arg1 = (security_id_t) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_sid_to_context_raw",&obj0)) SWIG_fail;
 | |
| @@ -7703,12 +7769,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    security_id_t *arg2 = (security_id_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_id_t temp2 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg2 = &temp2;
 | |
| @@ -7741,12 +7807,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t arg1 = (security_context_t) 0 ;
 | |
|    security_id_t *arg2 = (security_id_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_id_t temp2 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg2 = &temp2;
 | |
| @@ -7778,10 +7844,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_sidget(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_id_t arg1 = (security_id_t) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:sidget",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 |  0 );
 | |
| @@ -7800,10 +7866,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_sidput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    security_id_t arg1 = (security_id_t) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:sidput",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 |  0 );
 | |
| @@ -7823,12 +7889,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_id_t *arg2 = (security_id_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_id_t temp2 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg2 = &temp2;
 | |
| @@ -7880,7 +7946,6 @@
 | |
|    }
 | |
|    arg2 = (struct avc_entry *)(argp2);
 | |
|    if (arg1) (arg1)->ae = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -7891,10 +7956,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_entry_ref_ae_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_entry_ref *arg1 = (struct avc_entry_ref *) 0 ;
 | |
| -  struct avc_entry *result = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  struct avc_entry *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_entry_ref_ae_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_entry_ref, 0 |  0 );
 | |
| @@ -7915,7 +7980,7 @@
 | |
|    struct avc_entry_ref *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_avc_entry_ref")) SWIG_fail;
 | |
| -  result = (struct avc_entry_ref *)(struct avc_entry_ref *) calloc(1, sizeof(struct avc_entry_ref));
 | |
| +  result = (struct avc_entry_ref *)calloc(1, sizeof(struct avc_entry_ref));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_entry_ref, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -7937,7 +8002,6 @@
 | |
|    }
 | |
|    arg1 = (struct avc_entry_ref *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -7947,7 +8011,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *avc_entry_ref_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_avc_entry_ref, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -7974,7 +8038,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_malloc = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -7985,10 +8048,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_memory_callback_func_malloc_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_memory_callback *arg1 = (struct avc_memory_callback *) 0 ;
 | |
| -  void *(*result)(size_t) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void *(*result)(size_t) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_memory_callback_func_malloc_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_memory_callback, 0 |  0 );
 | |
| @@ -8026,7 +8089,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_free = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8037,10 +8099,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_memory_callback_func_free_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_memory_callback *arg1 = (struct avc_memory_callback *) 0 ;
 | |
| -  void (*result)(void *) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void (*result)(void *) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_memory_callback_func_free_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_memory_callback, 0 |  0 );
 | |
| @@ -8061,7 +8123,7 @@
 | |
|    struct avc_memory_callback *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_avc_memory_callback")) SWIG_fail;
 | |
| -  result = (struct avc_memory_callback *)(struct avc_memory_callback *) calloc(1, sizeof(struct avc_memory_callback));
 | |
| +  result = (struct avc_memory_callback *)calloc(1, sizeof(struct avc_memory_callback));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_memory_callback, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8083,7 +8145,6 @@
 | |
|    }
 | |
|    arg1 = (struct avc_memory_callback *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8093,7 +8154,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *avc_memory_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_avc_memory_callback, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -8120,7 +8181,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_log = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8131,10 +8191,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_log_callback_func_log_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_log_callback *arg1 = (struct avc_log_callback *) 0 ;
 | |
| -  void (*result)(char const *,...) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void (*result)(char const *,...) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_log_callback_func_log_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_log_callback, 0 |  0 );
 | |
| @@ -8172,7 +8232,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_audit = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8183,10 +8242,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_log_callback_func_audit_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_log_callback *arg1 = (struct avc_log_callback *) 0 ;
 | |
| -  void (*result)(void *,security_class_t,char *,size_t) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void (*result)(void *,security_class_t,char *,size_t) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_log_callback_func_audit_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_log_callback, 0 |  0 );
 | |
| @@ -8207,7 +8266,7 @@
 | |
|    struct avc_log_callback *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_avc_log_callback")) SWIG_fail;
 | |
| -  result = (struct avc_log_callback *)(struct avc_log_callback *) calloc(1, sizeof(struct avc_log_callback));
 | |
| +  result = (struct avc_log_callback *)calloc(1, sizeof(struct avc_log_callback));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_log_callback, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8229,7 +8288,6 @@
 | |
|    }
 | |
|    arg1 = (struct avc_log_callback *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8239,7 +8297,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *avc_log_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_avc_log_callback, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -8266,7 +8324,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_create_thread = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8277,10 +8334,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_thread_callback_func_create_thread_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_thread_callback *arg1 = (struct avc_thread_callback *) 0 ;
 | |
| -  void *(*result)(void (*)(void)) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void *(*result)(void (*)(void)) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_thread_callback_func_create_thread_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_thread_callback, 0 |  0 );
 | |
| @@ -8318,7 +8375,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_stop_thread = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8329,10 +8385,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_thread_callback_func_stop_thread_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_thread_callback *arg1 = (struct avc_thread_callback *) 0 ;
 | |
| -  void (*result)(void *) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void (*result)(void *) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_thread_callback_func_stop_thread_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_thread_callback, 0 |  0 );
 | |
| @@ -8353,7 +8409,7 @@
 | |
|    struct avc_thread_callback *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_avc_thread_callback")) SWIG_fail;
 | |
| -  result = (struct avc_thread_callback *)(struct avc_thread_callback *) calloc(1, sizeof(struct avc_thread_callback));
 | |
| +  result = (struct avc_thread_callback *)calloc(1, sizeof(struct avc_thread_callback));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_thread_callback, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8375,7 +8431,6 @@
 | |
|    }
 | |
|    arg1 = (struct avc_thread_callback *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8385,7 +8440,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *avc_thread_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_avc_thread_callback, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -8412,7 +8467,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_alloc_lock = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8423,10 +8477,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_lock_callback_func_alloc_lock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ;
 | |
| -  void *(*result)(void) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void *(*result)(void) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_lock_callback_func_alloc_lock_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 |  0 );
 | |
| @@ -8464,7 +8518,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_get_lock = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8475,10 +8528,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_lock_callback_func_get_lock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ;
 | |
| -  void (*result)(void *) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void (*result)(void *) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_lock_callback_func_get_lock_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 |  0 );
 | |
| @@ -8516,7 +8569,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_release_lock = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8527,10 +8579,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_lock_callback_func_release_lock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ;
 | |
| -  void (*result)(void *) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void (*result)(void *) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_lock_callback_func_release_lock_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 |  0 );
 | |
| @@ -8568,7 +8620,6 @@
 | |
|      }
 | |
|    }
 | |
|    if (arg1) (arg1)->func_free_lock = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8579,10 +8630,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_lock_callback_func_free_lock_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_lock_callback *arg1 = (struct avc_lock_callback *) 0 ;
 | |
| -  void (*result)(void *) = 0 ;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  void (*result)(void *) = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_lock_callback_func_free_lock_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_lock_callback, 0 |  0 );
 | |
| @@ -8603,7 +8654,7 @@
 | |
|    struct avc_lock_callback *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_avc_lock_callback")) SWIG_fail;
 | |
| -  result = (struct avc_lock_callback *)(struct avc_lock_callback *) calloc(1, sizeof(struct avc_lock_callback));
 | |
| +  result = (struct avc_lock_callback *)calloc(1, sizeof(struct avc_lock_callback));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_lock_callback, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8625,7 +8676,6 @@
 | |
|    }
 | |
|    arg1 = (struct avc_lock_callback *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -8635,7 +8685,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *avc_lock_callback_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_avc_lock_callback, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -8647,7 +8697,6 @@
 | |
|    struct avc_log_callback *arg3 = (struct avc_log_callback *) 0 ;
 | |
|    struct avc_thread_callback *arg4 = (struct avc_thread_callback *) 0 ;
 | |
|    struct avc_lock_callback *arg5 = (struct avc_lock_callback *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -8664,6 +8713,7 @@
 | |
|    PyObject * obj2 = 0 ;
 | |
|    PyObject * obj3 = 0 ;
 | |
|    PyObject * obj4 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOOOO:avc_init",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
 | |
|    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
 | |
| @@ -8705,13 +8755,13 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    struct selinux_opt *arg1 = (struct selinux_opt *) 0 ;
 | |
|    unsigned int arg2 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    unsigned int val2 ;
 | |
|    int ecode2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:avc_open",&obj0,&obj1)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_selinux_opt, 0 |  0 );
 | |
| @@ -8777,7 +8827,6 @@
 | |
|    access_vector_t arg4 ;
 | |
|    struct avc_entry_ref *arg5 = (struct avc_entry_ref *) 0 ;
 | |
|    struct av_decision *arg6 = (struct av_decision *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    void *argp2 = 0 ;
 | |
| @@ -8796,6 +8845,7 @@
 | |
|    PyObject * obj3 = 0 ;
 | |
|    PyObject * obj4 = 0 ;
 | |
|    PyObject * obj5 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm_noaudit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 |  0 );
 | |
| @@ -8844,7 +8894,6 @@
 | |
|    access_vector_t arg4 ;
 | |
|    struct avc_entry_ref *arg5 = (struct avc_entry_ref *) 0 ;
 | |
|    void *arg6 = (void *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    void *argp2 = 0 ;
 | |
| @@ -8862,6 +8911,7 @@
 | |
|    PyObject * obj3 = 0 ;
 | |
|    PyObject * obj4 = 0 ;
 | |
|    PyObject * obj5 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOOOOO:avc_has_perm",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_security_id, 0 |  0 );
 | |
| @@ -8980,7 +9030,6 @@
 | |
|    security_id_t arg2 = (security_id_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_id_t *arg4 = (security_id_t *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    void *argp2 = 0 ;
 | |
| @@ -8991,6 +9040,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg4 = &temp4;
 | |
| @@ -9025,7 +9075,6 @@
 | |
|    security_id_t arg2 = (security_id_t) 0 ;
 | |
|    security_class_t arg3 ;
 | |
|    security_id_t *arg4 = (security_id_t *) 0 ;
 | |
| -  int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    void *argp2 = 0 ;
 | |
| @@ -9036,6 +9085,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg4 = &temp4;
 | |
| @@ -9087,7 +9137,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->entry_lookups = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9098,10 +9147,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_lookups_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_lookups_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9140,7 +9189,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->entry_hits = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9151,10 +9199,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_hits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_hits_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9193,7 +9241,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->entry_misses = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9204,10 +9251,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_misses_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_misses_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9246,7 +9293,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->entry_discards = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9257,10 +9303,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_entry_discards_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_entry_discards_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9299,7 +9345,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->cav_lookups = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9310,10 +9355,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_lookups_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_lookups_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9352,7 +9397,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->cav_hits = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9363,10 +9407,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_hits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_hits_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9405,7 +9449,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->cav_probes = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9416,10 +9459,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_probes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_probes_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9458,7 +9501,6 @@
 | |
|    } 
 | |
|    arg2 = (unsigned int)(val2);
 | |
|    if (arg1) (arg1)->cav_misses = arg2;
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9469,10 +9511,10 @@
 | |
|  SWIGINTERN PyObject *_wrap_avc_cache_stats_cav_misses_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *resultobj = 0;
 | |
|    struct avc_cache_stats *arg1 = (struct avc_cache_stats *) 0 ;
 | |
| -  unsigned int result;
 | |
|    void *argp1 = 0 ;
 | |
|    int res1 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  unsigned int result;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:avc_cache_stats_cav_misses_get",&obj0)) SWIG_fail;
 | |
|    res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_avc_cache_stats, 0 |  0 );
 | |
| @@ -9493,7 +9535,7 @@
 | |
|    struct avc_cache_stats *result = 0 ;
 | |
|    
 | |
|    if (!PyArg_ParseTuple(args,(char *)":new_avc_cache_stats")) SWIG_fail;
 | |
| -  result = (struct avc_cache_stats *)(struct avc_cache_stats *) calloc(1, sizeof(struct avc_cache_stats));
 | |
| +  result = (struct avc_cache_stats *)calloc(1, sizeof(struct avc_cache_stats));
 | |
|    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_avc_cache_stats, SWIG_POINTER_NEW |  0 );
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9515,7 +9557,6 @@
 | |
|    }
 | |
|    arg1 = (struct avc_cache_stats *)(argp1);
 | |
|    free((char *) arg1);
 | |
| -  
 | |
|    resultobj = SWIG_Py_Void();
 | |
|    return resultobj;
 | |
|  fail:
 | |
| @@ -9525,7 +9566,7 @@
 | |
|  
 | |
|  SWIGINTERN PyObject *avc_cache_stats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 | |
|    PyObject *obj;
 | |
| -  if (!PyArg_ParseTuple(args,(char*)"O|swigregister", &obj)) return NULL;
 | |
| +  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
 | |
|    SWIG_TypeNewClientData(SWIGTYPE_p_avc_cache_stats, SWIG_NewClientData(obj));
 | |
|    return SWIG_Py_Void();
 | |
|  }
 | |
| @@ -9571,12 +9612,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    char **arg2 = (char **) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    char *temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:get_default_type",&obj0)) SWIG_fail;
 | |
| @@ -9608,7 +9649,6 @@
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_context_t **arg3 = (security_context_t **) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -9618,6 +9658,7 @@
 | |
|    security_context_t *temp3 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg3 = &temp3;
 | |
| @@ -9672,7 +9713,6 @@
 | |
|    char *arg2 = (char *) 0 ;
 | |
|    security_context_t arg3 = (security_context_t) 0 ;
 | |
|    security_context_t **arg4 = (security_context_t **) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -9686,6 +9726,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    {
 | |
|      arg4 = &temp4;
 | |
| @@ -9746,7 +9787,6 @@
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t arg2 = (security_context_t) 0 ;
 | |
|    security_context_t *arg3 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -9756,6 +9796,7 @@
 | |
|    security_context_t temp3 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg3 = &temp3;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OO:get_default_context",&obj0,&obj1)) SWIG_fail;
 | |
| @@ -9795,7 +9836,6 @@
 | |
|    char *arg2 = (char *) 0 ;
 | |
|    security_context_t arg3 = (security_context_t) 0 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -9809,6 +9849,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_level",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -9855,7 +9896,6 @@
 | |
|    char *arg2 = (char *) 0 ;
 | |
|    security_context_t arg3 = (security_context_t) 0 ;
 | |
|    security_context_t *arg4 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -9869,6 +9909,7 @@
 | |
|    PyObject * obj0 = 0 ;
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg4 = &temp4;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOO:get_default_context_with_role",&obj0,&obj1,&obj2)) SWIG_fail;
 | |
| @@ -9916,7 +9957,6 @@
 | |
|    char *arg3 = (char *) 0 ;
 | |
|    security_context_t arg4 = (security_context_t) 0 ;
 | |
|    security_context_t *arg5 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
| @@ -9934,6 +9974,7 @@
 | |
|    PyObject * obj1 = 0 ;
 | |
|    PyObject * obj2 = 0 ;
 | |
|    PyObject * obj3 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg5 = &temp5;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"OOOO:get_default_context_with_rolelevel",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
 | |
| @@ -9985,9 +10026,9 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    security_context_t *arg1 = (security_context_t *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    security_context_t temp1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg1 = &temp1;
 | |
|    arg2 = &temp2;
 | |
| @@ -10020,12 +10061,12 @@
 | |
|    PyObject *resultobj = 0;
 | |
|    char *arg1 = (char *) 0 ;
 | |
|    security_context_t *arg2 = (security_context_t *) 0 ;
 | |
| -  int result;
 | |
|    int res1 ;
 | |
|    char *buf1 = 0 ;
 | |
|    int alloc1 = 0 ;
 | |
|    security_context_t temp2 = 0 ;
 | |
|    PyObject * obj0 = 0 ;
 | |
| +  int result;
 | |
|    
 | |
|    arg2 = &temp2;
 | |
|    if (!PyArg_ParseTuple(args,(char *)"O:manual_user_enter_context",&obj0)) SWIG_fail;
 | |
| @@ -10218,6 +10259,7 @@
 | |
|  	 { (char *)"selinux_trans_to_raw_context", _wrap_selinux_trans_to_raw_context, METH_VARARGS, NULL},
 | |
|  	 { (char *)"selinux_raw_to_trans_context", _wrap_selinux_raw_to_trans_context, METH_VARARGS, NULL},
 | |
|  	 { (char *)"getseuserbyname", _wrap_getseuserbyname, METH_VARARGS, NULL},
 | |
| +	 { (char *)"getseuser", _wrap_getseuser, METH_VARARGS, NULL},
 | |
|  	 { (char *)"selinux_file_context_cmp", _wrap_selinux_file_context_cmp, METH_VARARGS, NULL},
 | |
|  	 { (char *)"selinux_file_context_verify", _wrap_selinux_file_context_verify, METH_VARARGS, NULL},
 | |
|  	 { (char *)"selinux_lsetfilecon_default", _wrap_selinux_lsetfilecon_default, METH_VARARGS, NULL},
 | |
| @@ -10513,7 +10555,7 @@
 | |
|  SWIG_InitializeModule(void *clientdata) {
 | |
|    size_t i;
 | |
|    swig_module_info *module_head, *iter;
 | |
| -  int found;
 | |
| +  int found, init;
 | |
|    
 | |
|    clientdata = clientdata;
 | |
|    
 | |
| @@ -10523,6 +10565,9 @@
 | |
|      swig_module.type_initial = swig_type_initial;
 | |
|      swig_module.cast_initial = swig_cast_initial;
 | |
|      swig_module.next = &swig_module;
 | |
| +    init = 1;
 | |
| +  } else {
 | |
| +    init = 0;
 | |
|    }
 | |
|    
 | |
|    /* Try and load any already created modules */
 | |
| @@ -10551,6 +10596,12 @@
 | |
|      module_head->next = &swig_module;
 | |
|    }
 | |
|    
 | |
| +  /* When multiple interpeters are used, a module could have already been initialized in
 | |
| +       a different interpreter, but not yet have a pointer in this interpreter.
 | |
| +       In this case, we do not want to continue adding types... everything should be
 | |
| +       set up already */
 | |
| +  if (init == 0) return;
 | |
| +  
 | |
|    /* Now work on filling in swig_module.types */
 | |
|  #ifdef SWIGRUNTIME_DEBUG
 | |
|    printf("SWIG_InitializeModule: size %d\n", swig_module.size);
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/src/seusers.c libselinux-2.0.76/src/seusers.c
 | |
| --- nsalibselinux/src/seusers.c	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/src/seusers.c	2008-12-12 11:06:18.000000000 -0500
 | |
| @@ -243,3 +243,67 @@
 | |
|  	*r_level = NULL;
 | |
|  	return 0;
 | |
|  }
 | |
| +
 | |
| +int getseuser(const char *username, const char *service, 
 | |
| +	      char **r_seuser, char **r_level) {
 | |
| +	int ret = -1;
 | |
| +	int len = 0;
 | |
| +	char *seuser = NULL;
 | |
| +	char *level = NULL;
 | |
| +	char *buffer = NULL;
 | |
| +	size_t size = 0;
 | |
| +	size_t lineno = 0;
 | |
| +	char *rec = NULL;
 | |
| +	char *path=NULL;
 | |
| +	if (asprintf(&path,"%s/logins/%s", selinux_policy_root(), username) <  0)
 | |
| +		goto err;
 | |
| +	FILE *fp = fopen(path, "r");
 | |
| +	free(path);
 | |
| +	if (fp == NULL) goto err;
 | |
| +	__fsetlocking(fp, FSETLOCKING_BYCALLER);
 | |
| +	while (getline(&buffer, &size, fp) > 0) {
 | |
| +		++lineno;
 | |
| +
 | |
| +		if (strncmp(buffer, "*:", 2) == 0) {
 | |
| +			free(rec);
 | |
| +			rec = strdup(buffer);
 | |
| +			continue;
 | |
| +		}
 | |
| +		len = strlen(service);
 | |
| +		if ((strncmp(buffer, service, len) == 0) &&
 | |
| +		    (buffer[len] == ':')) {
 | |
| +			free(rec);
 | |
| +			rec = strdup(buffer);
 | |
| +			break;
 | |
| +		}
 | |
| +	}
 | |
| +
 | |
| +	if (! rec)  goto err;
 | |
| +	seuser = strchr(rec, ':');
 | |
| +	if (! seuser) goto err;
 | |
| +
 | |
| +	seuser++;
 | |
| +	level = strchr(seuser, ':');
 | |
| +	*level = 0;
 | |
| +	level++;
 | |
| +	*r_seuser = strdup(seuser);
 | |
| +	if (! *r_seuser) goto err;
 | |
| +
 | |
| +	len = strlen(level);
 | |
| +	if (len && level[len-1] == '\n')
 | |
| +		level[len-1] = 0;
 | |
| +
 | |
| +	*r_level = strdup(level);
 | |
| +	if (! *r_level) {
 | |
| +		free(*r_seuser);
 | |
| +		goto err;
 | |
| +	}
 | |
| +	ret = 0;
 | |
| +
 | |
| +	err:
 | |
| +	free(buffer);
 | |
| +	fclose(fp);
 | |
| +	free(rec);
 | |
| +
 | |
| +	return (ret ? getseuserbyname(username, r_seuser, r_level) : ret);
 | |
| +}
 | |
| diff --exclude-from=exclude -N -u -r nsalibselinux/utils/getdefaultcon.c libselinux-2.0.76/utils/getdefaultcon.c
 | |
| --- nsalibselinux/utils/getdefaultcon.c	2008-08-28 09:34:24.000000000 -0400
 | |
| +++ libselinux-2.0.76/utils/getdefaultcon.c	2008-12-02 09:33:14.000000000 -0500
 | |
| @@ -22,8 +22,9 @@
 | |
|  	security_context_t usercon = NULL, cur_context = NULL;
 | |
|  	char *user = NULL, *level = NULL, *role=NULL, *seuser=NULL, *dlevel=NULL;
 | |
|  	int ret, opt;
 | |
| +	int verbose = 0;
 | |
|  
 | |
| -	while ((opt = getopt(argc, argv, "l:r:")) > 0) {
 | |
| +	while ((opt = getopt(argc, argv, "l:r:v")) > 0) {
 | |
|  		switch (opt) {
 | |
|  		case 'l':
 | |
|  			level = strdup(optarg);
 | |
| @@ -31,6 +32,9 @@
 | |
|  		case 'r':
 | |
|  			role = strdup(optarg);
 | |
|  			break;
 | |
| +		case 'v':
 | |
| +			verbose = 1;
 | |
| +			break;
 | |
|  		default:
 | |
|  			usage(argv[0], "invalid option", 1);
 | |
|  		}
 | |
| @@ -66,9 +70,13 @@
 | |
|  	}
 | |
|  	if (ret < 0)
 | |
|  		perror(argv[0]);
 | |
| -	else
 | |
| -		printf("%s: %s from %s %s %s %s -> %s\n", argv[0], user, cur_context, seuser, role, level, usercon);
 | |
| -
 | |
| +	else {
 | |
| +		if (verbose) {
 | |
| +			printf("%s: %s from %s %s %s %s -> %s\n", argv[0], user, cur_context, seuser, role, level, usercon);
 | |
| +		} else {
 | |
| +			printf("%s", usercon);
 | |
| +		}
 | |
| +	}
 | |
|  
 | |
|  	free(role);
 | |
|  	free(seuser);
 | |
| @@ -76,5 +84,5 @@
 | |
|  	free(dlevel);
 | |
|  	free(usercon);
 | |
|  
 | |
| -	return 0;
 | |
| +	return ret >= 0;
 | |
|  }
 |