--- libsemanage-2.0.39.orig/src/semanageswig_ruby_wrap.c +++ libsemanage-2.0.39/src/semanageswig_ruby_wrap.c @@ -0,0 +1,11551 @@ +/* ---------------------------------------------------------------------------- + * This file was automatically generated by SWIG (http://www.swig.org). + * Version 1.3.39 + * + * 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 + * changes to this file unless you know what you are doing--modify the SWIG + * interface file instead. + * ----------------------------------------------------------------------------- */ + +#define SWIGRUBY + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# 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) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + +/* ----------------------------------------------------------------------------- + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * ----------------------------------------------------------------------------- */ + +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# elif defined(__HP_aCC) +/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */ +/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */ +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif + +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif + +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# 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) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED +#endif + +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE +#endif + +/* exporting methods */ +#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) +# ifndef GCC_HASCLASSVISIBILITY +# define GCC_HASCLASSVISIBILITY +# endif +#endif + +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY) +# define SWIGEXPORT __attribute__ ((visibility("default"))) +# else +# define SWIGEXPORT +# endif +# endif +#endif + +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif +#endif + +/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ +#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) +# define _CRT_SECURE_NO_DEPRECATE +#endif + +/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */ +#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE) +# define _SCL_SECURE_NO_DEPRECATE +#endif + + +/* ----------------------------------------------------------------------------- + * swigrun.swg + * + * This file contains generic C API SWIG runtime support for pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* 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 "4" + +/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ +#ifdef SWIG_TYPE_TABLE +# define SWIG_QUOTE_STRING(x) #x +# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x) +# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE) +#else +# define SWIG_TYPE_TABLE_NAME +#endif + +/* + You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for + creating a static or dynamic library from the SWIG runtime code. + In 99.9% of the cases, SWIG just needs to declare them as 'static'. + + But only do this if strictly necessary, ie, if you have problems + with your compiler or suchlike. +*/ + +#ifndef SWIGRUNTIME +# define SWIGRUNTIME SWIGINTERN +#endif + +#ifndef SWIGRUNTIMEINLINE +# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE +#endif + +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* 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 + + +/* + Flags/methods for returning states. + + The SWIG conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old versions of SWIG, code such as the following was usually written: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + which is the same really, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + also requires SWIG_ConvertPtr to return new result values, such as + + int SWIG_ConvertPtr(obj, ptr,...) { + if () { + if () { + *ptr = ; + return SWIG_NEWOBJ; + } else { + *ptr = ; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + SWIG errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() +*/ + +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef void *(*swig_converter_func)(void *, int *); +typedef struct swig_type_info *(*swig_dycast_func)(void **); + +/* 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 */ + swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ + struct swig_cast_info *cast; /* linked list of types that can cast into this type */ + void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ +} swig_type_info; + +/* Structure to store a type and conversion function used for casting */ +typedef struct swig_cast_info { + swig_type_info *type; /* pointer to type that is equivalent to this type */ + swig_converter_func converter; /* function to cast the void pointers */ + struct swig_cast_info *next; /* pointer to next cast in linked list */ + struct swig_cast_info *prev; /* pointer to the previous cast */ +} swig_cast_info; + +/* Structure used to store module information + * Each module generates one structure like this, and the runtime collects + * all of these structures and stores them in a circularly linked list.*/ +typedef struct swig_module_info { + swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */ + size_t size; /* Number of types in this module */ + struct swig_module_info *next; /* Pointer to next element in circularly linked list */ + swig_type_info **type_initial; /* Array of initially generated type structures */ + swig_cast_info **cast_initial; /* Array of initially generated casting structures */ + void *clientdata; /* Language specific module data */ +} swig_module_info; + +/* + Compare two type names skipping the space characters, therefore + "char*" == "char *" and "Class" == "Class", etc. + + Return 0 when the two name types are equivalent, as in + strncmp, but skipping ' '. +*/ +SWIGRUNTIME int +SWIG_TypeNameComp(const char *f1, const char *l1, + const char *f2, const char *l2) { + for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) { + while ((*f1 == ' ') && (f1 != l1)) ++f1; + while ((*f2 == ' ') && (f2 != l2)) ++f2; + if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1; + } + return (int)((l1 - f1) - (l2 - f2)); +} + +/* + Check type equivalence in a name list like ||... + Return 0 if not equal, 1 if equal +*/ +SWIGRUNTIME int +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + +/* + Check type equivalence in a name list like ||... + Return 0 if equal, -1 if nb < tb, 1 if nb > tb +*/ +SWIGRUNTIME int +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; +} + + +/* + Check the typename +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheck(const char *c, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (strcmp(iter->type->name, c) == 0) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison +*/ +SWIGRUNTIME swig_cast_info * +SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) { + if (ty) { + swig_cast_info *iter = ty->cast; + while (iter) { + if (iter->type == from) { + if (iter == ty->cast) + return iter; + /* Move iter to the top of the linked list */ + iter->prev->next = iter->next; + if (iter->next) + iter->next->prev = iter->prev; + iter->next = ty->cast; + iter->prev = 0; + if (ty->cast) ty->cast->prev = iter; + ty->cast = iter; + return iter; + } + iter = iter->next; + } + } + return 0; +} + +/* + Cast a pointer up an inheritance hierarchy +*/ +SWIGRUNTIMEINLINE void * +SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) { + return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory); +} + +/* + Dynamic pointer casting. Down an inheritance hierarchy +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) { + swig_type_info *lastty = ty; + if (!ty || !ty->dcast) return ty; + while (ty && (ty->dcast)) { + ty = (*ty->dcast)(ptr); + if (ty) lastty = ty; + } + return lastty; +} + +/* + Return the name associated with this type +*/ +SWIGRUNTIMEINLINE const char * +SWIG_TypeName(const swig_type_info *ty) { + return ty->name; +} + +/* + Return the pretty name associated with this type, + that is an unmangled type name in a form presentable to the user. +*/ +SWIGRUNTIME const char * +SWIG_TypePrettyName(const swig_type_info *type) { + /* The "str" field contains the equivalent pretty names of the + type, separated by vertical-bar characters. We choose + to print the last name, as it is often (?) the most + specific. */ + if (!type) return NULL; + if (type->str != NULL) { + const char *last_name = type->str; + const char *s; + for (s = type->str; *s; s++) + if (*s == '|') last_name = s+1; + return last_name; + } + else + return type->name; +} + +/* + Set the clientdata field for a type +*/ +SWIGRUNTIME void +SWIG_TypeClientData(swig_type_info *ti, void *clientdata) { + swig_cast_info *cast = ti->cast; + /* if (ti->clientdata == clientdata) return; */ + ti->clientdata = clientdata; + + while (cast) { + if (!cast->converter) { + swig_type_info *tc = cast->type; + if (!tc->clientdata) { + SWIG_TypeClientData(tc, clientdata); + } + } + cast = cast->next; + } +} +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + +/* + Search for a swig_type_info structure only by mangled name + Search is a O(log #types) + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_MangledTypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + swig_module_info *iter = start; + do { + if (iter->size) { + register size_t l = 0; + register size_t r = iter->size - 1; + do { + /* since l+r >= 0, we can (>> 1) instead (/ 2) */ + register size_t i = (l + r) >> 1; + const char *iname = iter->types[i]->name; + if (iname) { + register int compare = strcmp(name, iname); + if (compare == 0) { + return iter->types[i]; + } else if (compare < 0) { + if (i) { + r = i - 1; + } else { + break; + } + } else if (compare > 0) { + l = i + 1; + } + } else { + break; /* should never happen */ + } + } while (l <= r); + } + iter = iter->next; + } while (iter != end); + return 0; +} + +/* + Search for a swig_type_info structure for either a mangled name or a human readable name. + It first searches the mangled names of the types, which is a O(log #types) + If a type is not found it then searches the human readable names, which is O(#types). + + We start searching at module start, and finish searching when start == end. + Note: if start == end at the beginning of the function, we go all the way around + the circular list. +*/ +SWIGRUNTIME swig_type_info * +SWIG_TypeQueryModule(swig_module_info *start, + swig_module_info *end, + const char *name) { + /* STEP 1: Search the name field using binary search */ + swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name); + if (ret) { + return ret; + } else { + /* STEP 2: If the type hasn't been found, do a complete search + of the str field (the human readable name) */ + swig_module_info *iter = start; + do { + register size_t i = 0; + for (; i < iter->size; ++i) { + if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name))) + return iter->types[i]; + } + iter = iter->next; + } while (iter != end); + } + + /* neither found a match */ + return 0; +} + +/* + Pack binary data into a string +*/ +SWIGRUNTIME char * +SWIG_PackData(char *c, void *ptr, size_t sz) { + static const char hex[17] = "0123456789abcdef"; + register const unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register unsigned char uu = *u; + *(c++) = hex[(uu & 0xf0) >> 4]; + *(c++) = hex[uu & 0xf]; + } + return c; +} + +/* + Unpack binary data from a string +*/ +SWIGRUNTIME const char * +SWIG_UnpackData(const char *c, void *ptr, size_t sz) { + register unsigned char *u = (unsigned char *) ptr; + register const unsigned char *eu = u + sz; + for (; u != eu; ++u) { + register char d = *(c++); + register unsigned char uu; + if ((d >= '0') && (d <= '9')) + uu = ((d - '0') << 4); + else if ((d >= 'a') && (d <= 'f')) + uu = ((d - ('a'-10)) << 4); + else + return (char *) 0; + d = *(c++); + if ((d >= '0') && (d <= '9')) + uu |= (d - '0'); + else if ((d >= 'a') && (d <= 'f')) + uu |= (d - ('a'-10)); + else + return (char *) 0; + *u = uu; + } + return c; +} + +/* + Pack 'void *' into a string buffer. +*/ +SWIGRUNTIME char * +SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) { + char *r = buff; + if ((2*sizeof(void *) + 2) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,&ptr,sizeof(void *)); + if (strlen(name) + 1 > (bsz - (r - buff))) return 0; + strcpy(r,name); + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + *ptr = (void *) 0; + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sizeof(void *)); +} + +SWIGRUNTIME char * +SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) { + char *r = buff; + size_t lname = (name ? strlen(name) : 0); + if ((2*sz + 2 + lname) > bsz) return 0; + *(r++) = '_'; + r = SWIG_PackData(r,ptr,sz); + if (lname) { + strncpy(r,name,lname+1); + } else { + *r = 0; + } + return buff; +} + +SWIGRUNTIME const char * +SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) { + if (*c != '_') { + if (strcmp(c,"NULL") == 0) { + memset(ptr,0,sz); + return name; + } else { + return 0; + } + } + return SWIG_UnpackData(++c,ptr,sz); +} + +#ifdef __cplusplus +} +#endif + +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +#include + +/* Remove global macros defined in Ruby's win32.h */ +#ifdef write +# undef write +#endif +#ifdef read +# undef read +#endif +#ifdef bind +# undef bind +#endif + + +/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ +#ifndef NUM2LL +#define NUM2LL(x) NUM2LONG((x)) +#endif +#ifndef LL2NUM +#define LL2NUM(x) INT2NUM((long) (x)) +#endif +#ifndef ULL2NUM +#define ULL2NUM(x) UINT2NUM((unsigned long) (x)) +#endif + +/* Ruby 1.7 doesn't (yet) define NUM2ULL() */ +#ifndef NUM2ULL +#ifdef HAVE_LONG_LONG +#define NUM2ULL(x) rb_num2ull((x)) +#else +#define NUM2ULL(x) NUM2ULONG(x) +#endif +#endif + +/* RSTRING_LEN, etc are new in Ruby 1.9, but ->ptr and ->len no longer work */ +/* Define these for older versions so we can just write code the new way */ +#ifndef RSTRING_LEN +# define RSTRING_LEN(x) RSTRING(x)->len +#endif +#ifndef RSTRING_PTR +# define RSTRING_PTR(x) RSTRING(x)->ptr +#endif +#ifndef RSTRING_END +# define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x)) +#endif +#ifndef RARRAY_LEN +# define RARRAY_LEN(x) RARRAY(x)->len +#endif +#ifndef RARRAY_PTR +# define RARRAY_PTR(x) RARRAY(x)->ptr +#endif +#ifndef RFLOAT_VALUE +# define RFLOAT_VALUE(x) RFLOAT(x)->value +#endif +#ifndef DOUBLE2NUM +# define DOUBLE2NUM(x) rb_float_new(x) +#endif +#ifndef RHASH_TBL +# define RHASH_TBL(x) (RHASH(x)->tbl) +#endif +#ifndef RHASH_ITER_LEV +# define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev) +#endif +#ifndef RHASH_IFNONE +# define RHASH_IFNONE(x) (RHASH(x)->ifnone) +#endif +#ifndef RHASH_SIZE +# define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries) +#endif +#ifndef RHASH_EMPTY_P +# define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0) +#endif +#ifndef RSTRUCT_LEN +# define RSTRUCT_LEN(x) RSTRUCT(x)->len +#endif +#ifndef RSTRUCT_PTR +# define RSTRUCT_PTR(x) RSTRUCT(x)->ptr +#endif + + + +/* + * Need to be very careful about how these macros are defined, especially + * when compiling C++ code or C code with an ANSI C compiler. + * + * VALUEFUNC(f) is a macro used to typecast a C function that implements + * a Ruby method so that it can be passed as an argument to API functions + * like rb_define_method() and rb_define_singleton_method(). + * + * VOIDFUNC(f) is a macro used to typecast a C function that implements + * either the "mark" or "free" stuff for a Ruby Data object, so that it + * can be passed as an argument to API functions like Data_Wrap_Struct() + * and Data_Make_Struct(). + */ + +#ifdef __cplusplus +# ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */ +# define PROTECTFUNC(f) ((VALUE (*)()) f) +# define VALUEFUNC(f) ((VALUE (*)()) f) +# define VOIDFUNC(f) ((void (*)()) f) +# else +# ifndef ANYARGS /* These definitions should work for Ruby 1.6 */ +# define PROTECTFUNC(f) ((VALUE (*)()) f) +# define VALUEFUNC(f) ((VALUE (*)()) f) +# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) +# else /* These definitions should work for Ruby 1.7+ */ +# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) +# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) +# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) +# endif +# endif +#else +# define VALUEFUNC(f) (f) +# define VOIDFUNC(f) (f) +#endif + +/* Don't use for expressions have side effect */ +#ifndef RB_STRING_VALUE +#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) +#endif +#ifndef StringValue +#define StringValue(s) RB_STRING_VALUE(s) +#endif +#ifndef StringValuePtr +#define StringValuePtr(s) RSTRING_PTR(RB_STRING_VALUE(s)) +#endif +#ifndef StringValueLen +#define StringValueLen(s) RSTRING_LEN(RB_STRING_VALUE(s)) +#endif +#ifndef SafeStringValue +#define SafeStringValue(v) do {\ + StringValue(v);\ + rb_check_safe_str(v);\ +} while (0) +#endif + +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC +#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) +#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") +#endif + +static VALUE _mSWIG = Qnil; + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + + +/* Define some additional error types */ +#define SWIG_ObjectPreviouslyDeletedError -100 + + +/* Define custom exceptions for errors that do not map to existing Ruby + exceptions. Note this only works for C++ since a global cannot be + initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/ + +SWIGINTERN VALUE +getNullReferenceError(void) { + static int init = 0; + static VALUE rb_eNullReferenceError ; + if (!init) { + init = 1; + rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError); + } + return rb_eNullReferenceError; +} + +SWIGINTERN VALUE +getObjectPreviouslyDeletedError(void) { + static int init = 0; + static VALUE rb_eObjectPreviouslyDeleted ; + if (!init) { + init = 1; + rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError); + } + return rb_eObjectPreviouslyDeleted; +} + + +SWIGINTERN VALUE +SWIG_Ruby_ErrorType(int SWIG_code) { + VALUE type; + switch (SWIG_code) { + case SWIG_MemoryError: + type = rb_eNoMemError; + break; + case SWIG_IOError: + type = rb_eIOError; + break; + case SWIG_RuntimeError: + type = rb_eRuntimeError; + break; + case SWIG_IndexError: + type = rb_eIndexError; + break; + case SWIG_TypeError: + type = rb_eTypeError; + break; + case SWIG_DivisionByZero: + type = rb_eZeroDivError; + break; + case SWIG_OverflowError: + type = rb_eRangeError; + break; + case SWIG_SyntaxError: + type = rb_eSyntaxError; + break; + case SWIG_ValueError: + type = rb_eArgError; + break; + case SWIG_SystemError: + type = rb_eFatal; + break; + case SWIG_AttributeError: + type = rb_eRuntimeError; + break; + case SWIG_NullReferenceError: + type = getNullReferenceError(); + break; + case SWIG_ObjectPreviouslyDeletedError: + type = getObjectPreviouslyDeletedError(); + break; + case SWIG_UnknownError: + type = rb_eRuntimeError; + break; + default: + type = rb_eRuntimeError; + } + return type; +} + + +/* This function is called when a user inputs a wrong argument to + a method. + */ +SWIGINTERN +const char* Ruby_Format_TypeError( const char* msg, + const char* type, + const char* name, + const int argn, + VALUE input ) +{ + char buf[128]; + VALUE str; + VALUE asStr; + if ( msg && *msg ) + { + str = rb_str_new2(msg); + } + else + { + str = rb_str_new(NULL, 0); + } + + str = rb_str_cat2( str, "Expected argument " ); + sprintf( buf, "%d of type ", argn-1 ); + str = rb_str_cat2( str, buf ); + str = rb_str_cat2( str, type ); + str = rb_str_cat2( str, ", but got " ); + str = rb_str_cat2( str, rb_obj_classname(input) ); + str = rb_str_cat2( str, " " ); + asStr = rb_inspect(input); + if ( RSTRING_LEN(asStr) > 30 ) + { + str = rb_str_cat( str, StringValuePtr(asStr), 30 ); + str = rb_str_cat2( str, "..." ); + } + else + { + str = rb_str_append( str, asStr ); + } + + if ( name ) + { + str = rb_str_cat2( str, "\n\tin SWIG method '" ); + str = rb_str_cat2( str, name ); + str = rb_str_cat2( str, "'" ); + } + + return StringValuePtr( str ); +} + +/* This function is called when an overloaded method fails */ +SWIGINTERN +void Ruby_Format_OverloadedError( + const int argc, + const int maxargs, + const char* method, + const char* prototypes + ) +{ + const char* msg = "Wrong # of arguments"; + if ( argc <= maxargs ) msg = "Wrong arguments"; + rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n" + "Possible C/C++ prototypes are:\n%s", + msg, method, prototypes); +} + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * rubytracking.swg + * + * This file contains support for tracking mappings from + * Ruby objects to C++ objects. This functionality is needed + * to implement mark functions for Ruby's mark and sweep + * garbage collector. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Ruby 1.8 actually assumes the first case. */ +#if SIZEOF_VOIDP == SIZEOF_LONG +# define SWIG2NUM(v) LONG2NUM((unsigned long)v) +# define NUM2SWIG(x) (unsigned long)NUM2LONG(x) +#elif SIZEOF_VOIDP == SIZEOF_LONG_LONG +# define SWIG2NUM(v) LL2NUM((unsigned long long)v) +# define NUM2SWIG(x) (unsigned long long)NUM2LL(x) +#else +# error sizeof(void*) is not the same as long or long long +#endif + + +/* Global Ruby hash table to store Trackings from C/C++ + structs to Ruby Objects. +*/ +static VALUE swig_ruby_trackings = Qnil; + +/* Global variable that stores a reference to the ruby + hash table delete function. */ +static ID swig_ruby_hash_delete; + +/* Setup a Ruby hash table to store Trackings */ +SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { + /* Create a ruby hash table to store Trackings from C++ + objects to Ruby objects. */ + + /* Try to see if some other .so has already created a + tracking hash table, which we keep hidden in an instance var + in the SWIG module. + This is done to allow multiple DSOs to share the same + tracking table. + */ + ID trackings_id = rb_intern( "@__trackings__" ); + VALUE verbose = rb_gv_get("VERBOSE"); + rb_gv_set("VERBOSE", Qfalse); + swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id ); + rb_gv_set("VERBOSE", verbose); + + /* No, it hasn't. Create one ourselves */ + if ( swig_ruby_trackings == Qnil ) + { + swig_ruby_trackings = rb_hash_new(); + rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings ); + } + + /* Now store a reference to the hash table delete function + so that we only have to look it up once.*/ + swig_ruby_hash_delete = rb_intern("delete"); +} + +/* Get a Ruby number to reference a pointer */ +SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) { + /* We cast the pointer to an unsigned long + and then store a reference to it using + a Ruby number object. */ + + /* Convert the pointer to a Ruby number */ + return SWIG2NUM(ptr); +} + +/* Get a Ruby number to reference an object */ +SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) { + /* We cast the object to an unsigned long + and then store a reference to it using + a Ruby number object. */ + + /* Convert the Object to a Ruby number */ + return SWIG2NUM(object); +} + +/* Get a Ruby object from a previously stored reference */ +SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) { + /* The provided Ruby number object is a reference + to the Ruby object we want.*/ + + /* Convert the Ruby number to a Ruby object */ + return NUM2SWIG(reference); +} + +/* Add a Tracking from a C/C++ struct to a Ruby object */ +SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) { + /* In a Ruby hash table we store the pointer and + the associated Ruby object. The trick here is + that we cannot store the Ruby object directly - if + we do then it cannot be garbage collected. So + instead we typecast it as a unsigned long and + convert it to a Ruby number object.*/ + + /* Get a reference to the pointer as a Ruby number */ + VALUE key = SWIG_RubyPtrToReference(ptr); + + /* Get a reference to the Ruby object as a Ruby number */ + VALUE value = SWIG_RubyObjectToReference(object); + + /* Store the mapping to the global hash table. */ + rb_hash_aset(swig_ruby_trackings, key, value); +} + +/* Get the Ruby object that owns the specified C/C++ struct */ +SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) { + /* Get a reference to the pointer as a Ruby number */ + VALUE key = SWIG_RubyPtrToReference(ptr); + + /* Now lookup the value stored in the global hash table */ + VALUE value = rb_hash_aref(swig_ruby_trackings, key); + + if (value == Qnil) { + /* No object exists - return nil. */ + return Qnil; + } + else { + /* Convert this value to Ruby object */ + return SWIG_RubyReferenceToObject(value); + } +} + +/* Remove a Tracking from a C/C++ struct to a Ruby object. It + is very important to remove objects once they are destroyed + since the same memory address may be reused later to create + a new object. */ +SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) { + /* Get a reference to the pointer as a Ruby number */ + VALUE key = SWIG_RubyPtrToReference(ptr); + + /* Delete the object from the hash table by calling Ruby's + do this we need to call the Hash.delete method.*/ + rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key); +} + +/* This is a helper method that unlinks a Ruby object from its + underlying C++ object. This is needed if the lifetime of the + Ruby object is longer than the C++ object */ +SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) { + VALUE object = SWIG_RubyInstanceFor(ptr); + + if (object != Qnil) { + DATA_PTR(object) = 0; + } +} + + +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * Ruby API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +SWIGINTERN VALUE +SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { + if (NIL_P(target)) { + target = o; + } else { + if (TYPE(target) != T_ARRAY) { + VALUE o2 = target; + target = rb_ary_new(); + rb_ary_push(target, o2); + } + rb_ary_push(target, o); + } + return target; +} + +/* For ruby1.8.4 and earlier. */ +#ifndef RUBY_INIT_STACK + RUBY_EXTERN void Init_stack(VALUE* addr); +# define RUBY_INIT_STACK \ + VALUE variable_in_this_stack_frame; \ + Init_stack(&variable_in_this_stack_frame); +#endif + + +#ifdef __cplusplus +} +#endif + + +/* ----------------------------------------------------------------------------- + * See the LICENSE file for information on copyright, usage and redistribution + * of SWIG, and the README file for authors - http://www.swig.org/release.html. + * + * rubyrun.swg + * + * This file contains the runtime support for Ruby modules + * and includes code for managing global variables and pointer + * type checking. + * ----------------------------------------------------------------------------- */ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) +#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) +#define swig_owntype ruby_owntype + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) +#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg) +#define SWIG_fail goto fail + + +/* Ruby-specific SWIG API */ + +#define SWIG_InitRuntime() SWIG_Ruby_InitRuntime() +#define SWIG_define_class(ty) SWIG_Ruby_define_class(ty) +#define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty) +#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value) +#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty) + +#include "assert.h" + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + VALUE klass; + VALUE mImpl; + void (*mark)(void *); + void (*destroy)(void *); + int trackObjects; +} swig_class; + + +/* Global pointer used to keep some internal SWIG stuff */ +static VALUE _cSWIG_Pointer = Qnil; +static VALUE swig_runtime_data_type_pointer = Qnil; + +/* Global IDs used to keep some internal SWIG stuff */ +static ID swig_arity_id = 0; +static ID swig_call_id = 0; + +/* + If your swig extension is to be run within an embedded ruby and has + director callbacks, you should set -DRUBY_EMBEDDED during compilation. + This will reset ruby's stack frame on each entry point from the main + program the first time a virtual director function is invoked (in a + non-recursive way). + If this is not done, you run the risk of Ruby trashing the stack. +*/ + +#ifdef RUBY_EMBEDDED + +# define SWIG_INIT_STACK \ + if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \ + ++swig_virtual_calls; +# define SWIG_RELEASE_STACK --swig_virtual_calls; +# define Ruby_DirectorTypeMismatchException(x) \ + rb_raise( rb_eTypeError, x ); return c_result; + + static unsigned int swig_virtual_calls = 0; + +#else /* normal non-embedded extension */ + +# define SWIG_INIT_STACK +# define SWIG_RELEASE_STACK +# define Ruby_DirectorTypeMismatchException(x) \ + throw Swig::DirectorTypeMismatchException( x ); + +#endif /* RUBY_EMBEDDED */ + + +SWIGRUNTIME VALUE +getExceptionClass(void) { + static int init = 0; + static VALUE rubyExceptionClass ; + if (!init) { + init = 1; + rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception")); + } + return rubyExceptionClass; +} + +/* This code checks to see if the Ruby object being raised as part + of an exception inherits from the Ruby class Exception. If so, + the object is simply returned. If not, then a new Ruby exception + object is created and that will be returned to Ruby.*/ +SWIGRUNTIME VALUE +SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) { + VALUE exceptionClass = getExceptionClass(); + if (rb_obj_is_kind_of(obj, exceptionClass)) { + return obj; + } else { + return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)); + } +} + +/* Initialize Ruby runtime support */ +SWIGRUNTIME void +SWIG_Ruby_InitRuntime(void) +{ + if (_mSWIG == Qnil) { + _mSWIG = rb_define_module("SWIG"); + swig_call_id = rb_intern("call"); + swig_arity_id = rb_intern("arity"); + } +} + +/* Define Ruby class for C type */ +SWIGRUNTIME void +SWIG_Ruby_define_class(swig_type_info *type) +{ + VALUE klass; + char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); + sprintf(klass_name, "TYPE%s", type->name); + if (NIL_P(_cSWIG_Pointer)) { + _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); + rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); + } + klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); + free((void *) klass_name); +} + +/* Create a new pointer object */ +SWIGRUNTIME VALUE +SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) +{ + int own = flags & SWIG_POINTER_OWN; + int track; + char *klass_name; + swig_class *sklass; + VALUE klass; + VALUE obj; + + if (!ptr) + return Qnil; + + if (type->clientdata) { + sklass = (swig_class *) type->clientdata; + + /* Are we tracking this class and have we already returned this Ruby object? */ + track = sklass->trackObjects; + if (track) { + obj = SWIG_RubyInstanceFor(ptr); + + /* Check the object's type and make sure it has the correct type. + It might not in cases where methods do things like + downcast methods. */ + if (obj != Qnil) { + VALUE value = rb_iv_get(obj, "@__swigtype__"); + char* type_name = RSTRING_PTR(value); + + if (strcmp(type->name, type_name) == 0) { + return obj; + } + } + } + + /* Create a new Ruby object */ + obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), + ( own ? VOIDFUNC(sklass->destroy) : + (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 ) + ), ptr); + + /* If tracking is on for this class then track this object. */ + if (track) { + SWIG_RubyAddTracking(ptr, obj); + } + } else { + klass_name = (char *) malloc(4 + strlen(type->name) + 1); + sprintf(klass_name, "TYPE%s", type->name); + klass = rb_const_get(_mSWIG, rb_intern(klass_name)); + free((void *) klass_name); + obj = Data_Wrap_Struct(klass, 0, 0, ptr); + } + rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); + + return obj; +} + +/* Create a new class instance (always owned) */ +SWIGRUNTIME VALUE +SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) +{ + VALUE obj; + swig_class *sklass = (swig_class *) type->clientdata; + obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); + rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name)); + return obj; +} + +/* Get type mangle from class name */ +SWIGRUNTIMEINLINE char * +SWIG_Ruby_MangleStr(VALUE obj) +{ + VALUE stype = rb_iv_get(obj, "@__swigtype__"); + return StringValuePtr(stype); +} + +/* Acquire a pointer value */ +typedef void (*ruby_owntype)(void*); + +SWIGRUNTIME ruby_owntype +SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) { + if (obj) { + ruby_owntype oldown = RDATA(obj)->dfree; + RDATA(obj)->dfree = own; + return oldown; + } else { + return 0; + } +} + +/* Convert a pointer value */ +SWIGRUNTIME int +SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own) +{ + char *c; + swig_cast_info *tc; + void *vptr = 0; + + /* Grab the pointer */ + if (NIL_P(obj)) { + *ptr = 0; + return SWIG_OK; + } else { + if (TYPE(obj) != T_DATA) { + return SWIG_ERROR; + } + Data_Get_Struct(obj, void, vptr); + } + + if (own) *own = RDATA(obj)->dfree; + + /* Check to see if the input object is giving up ownership + of the underlying C struct or C++ object. If so then we + need to reset the destructor since the Ruby object no + longer owns the underlying C++ object.*/ + if (flags & SWIG_POINTER_DISOWN) { + /* Is tracking on for this class? */ + int track = 0; + if (ty && ty->clientdata) { + swig_class *sklass = (swig_class *) ty->clientdata; + track = sklass->trackObjects; + } + + if (track) { + /* We are tracking objects for this class. Thus we change the destructor + * to SWIG_RubyRemoveTracking. This allows us to + * remove the mapping from the C++ to Ruby object + * when the Ruby object is garbage collected. If we don't + * do this, then it is possible we will return a reference + * to a Ruby object that no longer exists thereby crashing Ruby. */ + RDATA(obj)->dfree = SWIG_RubyRemoveTracking; + } else { + RDATA(obj)->dfree = 0; + } + } + + /* Do type-checking if type info was provided */ + if (ty) { + if (ty->clientdata) { + if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { + if (vptr == 0) { + /* The object has already been deleted */ + return SWIG_ObjectPreviouslyDeletedError; + } + *ptr = vptr; + return SWIG_OK; + } + } + if ((c = SWIG_MangleStr(obj)) == NULL) { + return SWIG_ERROR; + } + tc = SWIG_TypeCheck(c, ty); + if (!tc) { + return SWIG_ERROR; + } else { + int newmemory = 0; + *ptr = SWIG_TypeCast(tc, vptr, &newmemory); + assert(!newmemory); /* newmemory handling not yet implemented */ + } + } else { + *ptr = vptr; + } + + return SWIG_OK; +} + +/* Check convert */ +SWIGRUNTIMEINLINE int +SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty) +{ + char *c = SWIG_MangleStr(obj); + if (!c) return 0; + return SWIG_TypeCheck(c,ty) != 0; +} + +SWIGRUNTIME VALUE +SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) { + char result[1024]; + char *r = result; + if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; + *(r++) = '_'; + r = SWIG_PackData(r, ptr, sz); + strcpy(r, type->name); + return rb_str_new2(result); +} + +/* Convert a packed value value */ +SWIGRUNTIME int +SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { + swig_cast_info *tc; + const char *c; + + if (TYPE(obj) != T_STRING) goto type_error; + c = StringValuePtr(obj); + /* Pointer values must start with leading underscore */ + if (*c != '_') goto type_error; + c++; + c = SWIG_UnpackData(c, ptr, sz); + if (ty) { + tc = SWIG_TypeCheck(c, ty); + if (!tc) goto type_error; + } + return SWIG_OK; + + type_error: + return SWIG_ERROR; +} + +SWIGRUNTIME swig_module_info * +SWIG_Ruby_GetModule(void) +{ + VALUE pointer; + swig_module_info *ret = 0; + VALUE verbose = rb_gv_get("VERBOSE"); + + /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */ + rb_gv_set("VERBOSE", Qfalse); + + /* first check if pointer already created */ + pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); + if (pointer != Qnil) { + Data_Get_Struct(pointer, swig_module_info, ret); + } + + /* reinstate warnings */ + rb_gv_set("VERBOSE", verbose); + return ret; +} + +SWIGRUNTIME void +SWIG_Ruby_SetModule(swig_module_info *pointer) +{ + /* register a new class */ + VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); + /* create and store the structure pointer to a global variable */ + swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); + rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); +} + +/* This function can be used to check whether a proc or method or similarly + callable function has been passed. Usually used in a %typecheck, like: + + %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) { + $result = SWIG_Ruby_isCallable( $input ); + } + */ +SWIGINTERN +int SWIG_Ruby_isCallable( VALUE proc ) +{ + if ( rb_respond_to( proc, swig_call_id ) == Qtrue ) + return 1; + return 0; +} + +/* This function can be used to check the arity (number of arguments) + a proc or method can take. Usually used in a %typecheck. + Valid arities will be that equal to minimal or those < 0 + which indicate a variable number of parameters at the end. + */ +SWIGINTERN +int SWIG_Ruby_arity( VALUE proc, int minimal ) +{ + if ( rb_respond_to( proc, swig_arity_id ) == Qtrue ) + { + VALUE num = rb_funcall( proc, swig_arity_id, 0 ); + int arity = NUM2INT(num); + if ( arity < 0 && (arity+1) < -minimal ) return 1; + if ( arity == minimal ) return 1; + return 1; + } + return 0; +} + + +#ifdef __cplusplus +} +#endif + + + +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + +/* -------- TYPES TABLE (BEGIN) -------- */ + +#define SWIGTYPE_p_char swig_types[0] +#define SWIGTYPE_p_f_p_q_const__struct_semanage_bool_p_void__int swig_types[1] +#define SWIGTYPE_p_f_p_q_const__struct_semanage_fcontext_p_void__int swig_types[2] +#define SWIGTYPE_p_f_p_q_const__struct_semanage_iface_p_void__int swig_types[3] +#define SWIGTYPE_p_f_p_q_const__struct_semanage_node_p_void__int swig_types[4] +#define SWIGTYPE_p_f_p_q_const__struct_semanage_port_p_void__int swig_types[5] +#define SWIGTYPE_p_f_p_q_const__struct_semanage_seuser_p_void__int swig_types[6] +#define SWIGTYPE_p_f_p_q_const__struct_semanage_user_p_void__int swig_types[7] +#define SWIGTYPE_p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void swig_types[8] +#define SWIGTYPE_p_int swig_types[9] +#define SWIGTYPE_p_p_char swig_types[10] +#define SWIGTYPE_p_p_p_char swig_types[11] +#define SWIGTYPE_p_p_p_semanage_bool swig_types[12] +#define SWIGTYPE_p_p_p_semanage_fcontext swig_types[13] +#define SWIGTYPE_p_p_p_semanage_iface swig_types[14] +#define SWIGTYPE_p_p_p_semanage_node swig_types[15] +#define SWIGTYPE_p_p_p_semanage_port swig_types[16] +#define SWIGTYPE_p_p_p_semanage_seuser swig_types[17] +#define SWIGTYPE_p_p_p_semanage_user swig_types[18] +#define SWIGTYPE_p_p_semanage_bool swig_types[19] +#define SWIGTYPE_p_p_semanage_bool_key swig_types[20] +#define SWIGTYPE_p_p_semanage_context swig_types[21] +#define SWIGTYPE_p_p_semanage_fcontext swig_types[22] +#define SWIGTYPE_p_p_semanage_fcontext_key swig_types[23] +#define SWIGTYPE_p_p_semanage_iface swig_types[24] +#define SWIGTYPE_p_p_semanage_iface_key swig_types[25] +#define SWIGTYPE_p_p_semanage_module_info swig_types[26] +#define SWIGTYPE_p_p_semanage_node swig_types[27] +#define SWIGTYPE_p_p_semanage_node_key swig_types[28] +#define SWIGTYPE_p_p_semanage_port swig_types[29] +#define SWIGTYPE_p_p_semanage_port_key swig_types[30] +#define SWIGTYPE_p_p_semanage_seuser swig_types[31] +#define SWIGTYPE_p_p_semanage_seuser_key swig_types[32] +#define SWIGTYPE_p_p_semanage_user swig_types[33] +#define SWIGTYPE_p_p_semanage_user_key swig_types[34] +#define SWIGTYPE_p_semanage_bool swig_types[35] +#define SWIGTYPE_p_semanage_bool_key swig_types[36] +#define SWIGTYPE_p_semanage_context swig_types[37] +#define SWIGTYPE_p_semanage_fcontext swig_types[38] +#define SWIGTYPE_p_semanage_fcontext_key swig_types[39] +#define SWIGTYPE_p_semanage_handle swig_types[40] +#define SWIGTYPE_p_semanage_iface swig_types[41] +#define SWIGTYPE_p_semanage_iface_key swig_types[42] +#define SWIGTYPE_p_semanage_module_info swig_types[43] +#define SWIGTYPE_p_semanage_node swig_types[44] +#define SWIGTYPE_p_semanage_node_key swig_types[45] +#define SWIGTYPE_p_semanage_port swig_types[46] +#define SWIGTYPE_p_semanage_port_key swig_types[47] +#define SWIGTYPE_p_semanage_seuser swig_types[48] +#define SWIGTYPE_p_semanage_seuser_key swig_types[49] +#define SWIGTYPE_p_semanage_user swig_types[50] +#define SWIGTYPE_p_semanage_user_key swig_types[51] +#define SWIGTYPE_p_size_t swig_types[52] +#define SWIGTYPE_p_unsigned_int swig_types[53] +static swig_type_info *swig_types[55]; +static swig_module_info swig_module = {swig_types, 54, 0, 0, 0, 0}; +#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) +#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) + +/* -------- TYPES TABLE (END) -------- */ + +#define SWIG_init Init_semanage +#define SWIG_name "Semanage" + +static VALUE mSemanage; + +#define SWIG_RUBY_THREAD_BEGIN_BLOCK +#define SWIG_RUBY_THREAD_END_BLOCK + + +#define SWIGVERSION 0x010339 +#define SWIG_VERSION SWIGVERSION + + +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + + #include + #include + + #define STATUS_SUCCESS 0 + #define STATUS_ERR -1 + + +#ifdef __cplusplus +extern "C" { +#endif + +// Ruby 1.9 changed the file name of this header +#ifdef HAVE_RUBY_IO_H +#include "ruby/io.h" +#else +#include "rubyio.h" +#endif + +#ifdef __cplusplus +} +#endif + + +#ifdef __cplusplus +extern "C" { +#endif +#ifdef HAVE_SYS_TIME_H +# include +struct timeval rb_time_timeval(VALUE); +#endif +#ifdef __cplusplus +} +#endif + + +#include +#if !defined(SWIG_NO_LLONG_MAX) +# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__) +# define LLONG_MAX __LONG_LONG_MAX__ +# define LLONG_MIN (-LLONG_MAX - 1LL) +# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) +# endif +#endif + + + #define SWIG_From_long LONG2NUM + + +SWIGINTERNINLINE VALUE +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor(void) +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > LONG_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : Qnil; + } else { + return rb_str_new(carray, (long)(size)); + } + } else { + return Qnil; + } +} + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) +{ + if (TYPE(obj) == T_STRING) { + #if defined(StringValuePtr) + char *cstr = StringValuePtr(obj); + #else + char *cstr = STR2CSTR(obj); + #endif + size_t size = RSTRING_LEN(obj) + 1; + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } + } + if (psize) *psize = size; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + void* vptr = 0; + if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = (char *)vptr; + if (psize) *psize = vptr ? (strlen((char*)vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + + +SWIGINTERN VALUE +SWIG_ruby_failed(void) +{ + return Qnil; +} + + +/*@SWIG:/usr/share/swig1.3/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) +{ + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long *res = (long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long (VALUE obj, long* val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_int (VALUE obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + + +/*@SWIG:/usr/share/swig1.3/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args) +{ + VALUE obj = args[0]; + VALUE type = TYPE(obj); + unsigned long *res = (unsigned long *)(args[1]); + *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + unsigned long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +SWIGINTERNINLINE int +SWIG_AsVal_size_t (VALUE obj, size_t *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0); + if (SWIG_IsOK(res) && val) *val = (size_t)(v); + return res; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (unsigned int)(v); + } + } + return res; +} + +SWIGINTERN VALUE +_wrap_semanage_msg_get_level(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_msg_get_level", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_msg_get_level(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_msg_get_channel(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_msg_get_channel", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (char *)semanage_msg_get_channel(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_msg_get_fname(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_msg_get_fname", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (char *)semanage_msg_get_fname(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_msg_set_callback(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void (*arg2)(void *,semanage_handle_t *,char const *,...) = (void (*)(void *,semanage_handle_t *,char const *,...)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_msg_set_callback", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "void (*)(void *,semanage_handle_t *,char const *,...)","semanage_msg_set_callback", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_msg_set_callback", 3, argv[2] )); + } + semanage_msg_set_callback(arg1,arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_handle_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (semanage_handle_t *)semanage_handle_create(); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_semanage_handle, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_handle_destroy(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_handle_destroy", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + semanage_handle_destroy(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_select_store(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + enum semanage_connect_type arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_select_store", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","semanage_select_store", 2, argv[1] )); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "enum semanage_connect_type","semanage_select_store", 3, argv[2] )); + } + arg3 = (enum semanage_connect_type)(val3); + semanage_select_store(arg1,arg2,arg3); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_reload_policy(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_reload_policy", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_reload_policy(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_set_reload(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_set_reload", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_set_reload", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_set_reload(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_set_rebuild(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_set_rebuild", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_set_rebuild", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_set_rebuild(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_set_create_store(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_set_create_store", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_set_create_store", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_set_create_store(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_get_disable_dontaudit(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_get_disable_dontaudit", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_get_disable_dontaudit(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_set_disable_dontaudit(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_set_disable_dontaudit", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_set_disable_dontaudit", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_set_disable_dontaudit(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_is_managed(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_is_managed", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_is_managed(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_connect(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_connect", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_connect(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_disconnect(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_disconnect", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_disconnect(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_begin_transaction(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_begin_transaction", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_begin_transaction(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_commit(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_commit", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_commit(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_access_check(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_access_check", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_access_check(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_is_connected(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_is_connected", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_is_connected(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_mls_enabled(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_mls_enabled", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_mls_enabled(arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_install(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + size_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_install", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","semanage_module_install", 2, argv[1] )); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_size_t(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","semanage_module_install", 3, argv[2] )); + } + arg3 = (size_t)(val3); + result = (int)semanage_module_install(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_install_file(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_install_file", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_module_install_file", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_module_install_file(arg1,(char const *)arg2); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_upgrade(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + size_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_upgrade", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","semanage_module_upgrade", 2, argv[1] )); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_size_t(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","semanage_module_upgrade", 3, argv[2] )); + } + arg3 = (size_t)(val3); + result = (int)semanage_module_upgrade(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_upgrade_file(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_upgrade_file", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_module_upgrade_file", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_module_upgrade_file(arg1,(char const *)arg2); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_install_base(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + size_t arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + size_t val3 ; + int ecode3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_install_base", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","semanage_module_install_base", 2, argv[1] )); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_size_t(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "size_t","semanage_module_install_base", 3, argv[2] )); + } + arg3 = (size_t)(val3); + result = (int)semanage_module_install_base(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_install_base_file(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_install_base_file", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_module_install_base_file", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_module_install_base_file(arg1,(char const *)arg2); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_remove(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_remove", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","semanage_module_remove", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_module_remove(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_module_info_t **arg2 = (semanage_module_info_t **) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_module_info_t *temp2 = NULL ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_module_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_module_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_module_info, 0)); + } + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_info_datum_destroy(int argc, VALUE *argv, VALUE self) { + semanage_module_info_t *arg1 = (semanage_module_info_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_module_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_module_info_t *","semanage_module_info_datum_destroy", 1, argv[0] )); + } + arg1 = (semanage_module_info_t *)(argp1); + semanage_module_info_datum_destroy(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_list_nth(int argc, VALUE *argv, VALUE self) { + semanage_module_info_t *arg1 = (semanage_module_info_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + semanage_module_info_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_module_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_module_info_t *","semanage_module_list_nth", 1, argv[0] )); + } + arg1 = (semanage_module_info_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_module_list_nth", 2, argv[1] )); + } + arg2 = (int)(val2); + result = (semanage_module_info_t *)semanage_module_list_nth(arg1,arg2); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_semanage_module_info, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_get_name(int argc, VALUE *argv, VALUE self) { + semanage_module_info_t *arg1 = (semanage_module_info_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_module_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_module_info_t *","semanage_module_get_name", 1, argv[0] )); + } + arg1 = (semanage_module_info_t *)(argp1); + result = (char *)semanage_module_get_name(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_module_get_version(int argc, VALUE *argv, VALUE self) { + semanage_module_info_t *arg1 = (semanage_module_info_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_module_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_module_info_t *","semanage_module_get_version", 1, argv[0] )); + } + arg1 = (semanage_module_info_t *)(argp1); + result = (char *)semanage_module_get_version(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_get_user(int argc, VALUE *argv, VALUE self) { + semanage_context_t *arg1 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_context_t const *","semanage_context_get_user", 1, argv[0] )); + } + arg1 = (semanage_context_t *)(argp1); + result = (char *)semanage_context_get_user((struct semanage_context const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_set_user(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_context_t *arg2 = (semanage_context_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_set_user", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_context_set_user", 2, argv[1] )); + } + arg2 = (semanage_context_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_context_set_user", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_context_set_user(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_get_role(int argc, VALUE *argv, VALUE self) { + semanage_context_t *arg1 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_context_t const *","semanage_context_get_role", 1, argv[0] )); + } + arg1 = (semanage_context_t *)(argp1); + result = (char *)semanage_context_get_role((struct semanage_context const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_set_role(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_context_t *arg2 = (semanage_context_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_set_role", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_context_set_role", 2, argv[1] )); + } + arg2 = (semanage_context_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_context_set_role", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_context_set_role(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_get_type(int argc, VALUE *argv, VALUE self) { + semanage_context_t *arg1 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_context_t const *","semanage_context_get_type", 1, argv[0] )); + } + arg1 = (semanage_context_t *)(argp1); + result = (char *)semanage_context_get_type((struct semanage_context const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_set_type(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_context_t *arg2 = (semanage_context_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_set_type", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_context_set_type", 2, argv[1] )); + } + arg2 = (semanage_context_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_context_set_type", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_context_set_type(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_get_mls(int argc, VALUE *argv, VALUE self) { + semanage_context_t *arg1 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_context_t const *","semanage_context_get_mls", 1, argv[0] )); + } + arg1 = (semanage_context_t *)(argp1); + result = (char *)semanage_context_get_mls((struct semanage_context const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_set_mls(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_context_t *arg2 = (semanage_context_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_set_mls", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_context_set_mls", 2, argv[1] )); + } + arg2 = (semanage_context_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_context_set_mls", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_context_set_mls(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_context_t **arg2 = (semanage_context_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_context_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_context_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_context, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_context_t *arg2 = (semanage_context_t *) 0 ; + semanage_context_t **arg3 = (semanage_context_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_context_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_context_t const *","semanage_context_clone", 2, argv[1] )); + } + arg2 = (semanage_context_t *)(argp2); + result = (int)semanage_context_clone(arg1,(struct semanage_context const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_context, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_free(int argc, VALUE *argv, VALUE self) { + semanage_context_t *arg1 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_context_free", 1, argv[0] )); + } + arg1 = (semanage_context_t *)(argp1); + semanage_context_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_from_string(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + semanage_context_t **arg3 = (semanage_context_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + semanage_context_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_from_string", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_context_from_string", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_context_from_string(arg1,(char const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_context, 0)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_context_to_string(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_context_t *arg2 = (semanage_context_t *) 0 ; + char **arg3 = (char **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + char *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_context_to_string", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_context_t const *","semanage_context_to_string", 2, argv[1] )); + } + arg2 = (semanage_context_t *)(argp2); + result = (int)semanage_context_to_string(arg1,(struct semanage_context const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(*arg3)); + free(*arg3); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_key_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + semanage_bool_key_t **arg3 = (semanage_bool_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + semanage_bool_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_key_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_bool_key_create", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_bool_key_create(arg1,(char const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_bool_key, 0)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_key_extract(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_t *arg2 = (semanage_bool_t *) 0 ; + semanage_bool_key_t **arg3 = (semanage_bool_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_bool_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_key_extract", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_key_extract", 2, argv[1] )); + } + arg2 = (semanage_bool_t *)(argp2); + result = (int)semanage_bool_key_extract(arg1,(struct semanage_bool const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_bool_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_key_free(int argc, VALUE *argv, VALUE self) { + semanage_bool_key_t *arg1 = (semanage_bool_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_bool_key_t *","semanage_bool_key_free", 1, argv[0] )); + } + arg1 = (semanage_bool_key_t *)(argp1); + semanage_bool_key_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_compare(int argc, VALUE *argv, VALUE self) { + semanage_bool_t *arg1 = (semanage_bool_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_compare", 1, argv[0] )); + } + arg1 = (semanage_bool_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_compare", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_compare((struct semanage_bool const *)arg1,(struct semanage_bool_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_compare2(int argc, VALUE *argv, VALUE self) { + semanage_bool_t *arg1 = (semanage_bool_t *) 0 ; + semanage_bool_t *arg2 = (semanage_bool_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_compare2", 1, argv[0] )); + } + arg1 = (semanage_bool_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_compare2", 2, argv[1] )); + } + arg2 = (semanage_bool_t *)(argp2); + result = (int)semanage_bool_compare2((struct semanage_bool const *)arg1,(struct semanage_bool const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_get_name(int argc, VALUE *argv, VALUE self) { + semanage_bool_t *arg1 = (semanage_bool_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_get_name", 1, argv[0] )); + } + arg1 = (semanage_bool_t *)(argp1); + result = (char *)semanage_bool_get_name((struct semanage_bool const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_set_name(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_t *arg2 = (semanage_bool_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_set_name", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_t *","semanage_bool_set_name", 2, argv[1] )); + } + arg2 = (semanage_bool_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_bool_set_name", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_bool_set_name(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_get_value(int argc, VALUE *argv, VALUE self) { + semanage_bool_t *arg1 = (semanage_bool_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_get_value", 1, argv[0] )); + } + arg1 = (semanage_bool_t *)(argp1); + result = (int)semanage_bool_get_value((struct semanage_bool const *)arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_set_value(int argc, VALUE *argv, VALUE self) { + semanage_bool_t *arg1 = (semanage_bool_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_bool_t *","semanage_bool_set_value", 1, argv[0] )); + } + arg1 = (semanage_bool_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_bool_set_value", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_bool_set_value(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_t **arg2 = (semanage_bool_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_bool_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_bool_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_bool, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_t *arg2 = (semanage_bool_t *) 0 ; + semanage_bool_t **arg3 = (semanage_bool_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_bool_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_clone", 2, argv[1] )); + } + arg2 = (semanage_bool_t *)(argp2); + result = (int)semanage_bool_clone(arg1,(struct semanage_bool const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_bool, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_free(int argc, VALUE *argv, VALUE self) { + semanage_bool_t *arg1 = (semanage_bool_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_bool_t *","semanage_bool_free", 1, argv[0] )); + } + arg1 = (semanage_bool_t *)(argp1); + semanage_bool_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_query(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + semanage_bool_t **arg3 = (semanage_bool_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_bool_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_query", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_query", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_query(arg1,(struct semanage_bool_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_bool, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_exists(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_exists", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_exists", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_exists(arg1,(struct semanage_bool_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_count(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_count", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_bool_count(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_iterate(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_bool_t const *,void *) = (int (*)(semanage_bool_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_iterate", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_bool_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_bool_t const *,void *)","semanage_bool_iterate", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_bool_iterate", 3, argv[2] )); + } + result = (int)semanage_bool_iterate(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_t ***arg2 = (semanage_bool_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_bool_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_bool_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_modify_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + semanage_bool_t *arg3 = (semanage_bool_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_modify_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_modify_local", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_modify_local", 3, argv[2] )); + } + arg3 = (semanage_bool_t *)(argp3); + result = (int)semanage_bool_modify_local(arg1,(struct semanage_bool_key const *)arg2,(struct semanage_bool const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_del_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_del_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_del_local", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_del_local(arg1,(struct semanage_bool_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_query_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + semanage_bool_t **arg3 = (semanage_bool_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_bool_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_query_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_query_local", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_query_local(arg1,(struct semanage_bool_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_bool, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_exists_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_exists_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_exists_local", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_exists_local(arg1,(struct semanage_bool_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_count_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_count_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_bool_count_local(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_iterate_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_bool_t const *,void *) = (int (*)(semanage_bool_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_iterate_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_bool_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_bool_t const *,void *)","semanage_bool_iterate_local", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_bool_iterate_local", 3, argv[2] )); + } + result = (int)semanage_bool_iterate_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_list_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_t ***arg2 = (semanage_bool_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_bool_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_list_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_bool_list_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_set_active(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + semanage_bool_t *arg3 = (semanage_bool_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_set_active", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_set_active", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_bool, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_bool_t const *","semanage_bool_set_active", 3, argv[2] )); + } + arg3 = (semanage_bool_t *)(argp3); + result = (int)semanage_bool_set_active(arg1,(struct semanage_bool_key const *)arg2,(struct semanage_bool const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_query_active(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + semanage_bool_t **arg3 = (semanage_bool_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_bool_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_query_active", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_query_active", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_query_active(arg1,(struct semanage_bool_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_bool, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_exists_active(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_key_t *arg2 = (semanage_bool_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_exists_active", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_bool_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_bool_key_t const *","semanage_bool_exists_active", 2, argv[1] )); + } + arg2 = (semanage_bool_key_t *)(argp2); + result = (int)semanage_bool_exists_active(arg1,(struct semanage_bool_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_count_active(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_count_active", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_bool_count_active(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_iterate_active(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_bool_t const *,void *) = (int (*)(semanage_bool_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_iterate_active", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_bool_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_bool_t const *,void *)","semanage_bool_iterate_active", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_bool_iterate_active", 3, argv[2] )); + } + result = (int)semanage_bool_iterate_active(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_bool_list_active(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_bool_t ***arg2 = (semanage_bool_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_bool_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_bool_list_active", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_bool_list_active(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_compare(int argc, VALUE *argv, VALUE self) { + semanage_iface_t *arg1 = (semanage_iface_t *) 0 ; + semanage_iface_key_t *arg2 = (semanage_iface_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_compare", 1, argv[0] )); + } + arg1 = (semanage_iface_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_key_t const *","semanage_iface_compare", 2, argv[1] )); + } + arg2 = (semanage_iface_key_t *)(argp2); + result = (int)semanage_iface_compare((struct semanage_iface const *)arg1,(struct semanage_iface_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_compare2(int argc, VALUE *argv, VALUE self) { + semanage_iface_t *arg1 = (semanage_iface_t *) 0 ; + semanage_iface_t *arg2 = (semanage_iface_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_compare2", 1, argv[0] )); + } + arg1 = (semanage_iface_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_compare2", 2, argv[1] )); + } + arg2 = (semanage_iface_t *)(argp2); + result = (int)semanage_iface_compare2((struct semanage_iface const *)arg1,(struct semanage_iface const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_key_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + semanage_iface_key_t **arg3 = (semanage_iface_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + semanage_iface_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_key_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_iface_key_create", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_iface_key_create(arg1,(char const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_iface_key, 0)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_key_extract(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t *arg2 = (semanage_iface_t *) 0 ; + semanage_iface_key_t **arg3 = (semanage_iface_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_iface_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_key_extract", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_key_extract", 2, argv[1] )); + } + arg2 = (semanage_iface_t *)(argp2); + result = (int)semanage_iface_key_extract(arg1,(struct semanage_iface const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_iface_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_key_free(int argc, VALUE *argv, VALUE self) { + semanage_iface_key_t *arg1 = (semanage_iface_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_iface_key_t *","semanage_iface_key_free", 1, argv[0] )); + } + arg1 = (semanage_iface_key_t *)(argp1); + semanage_iface_key_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_get_name(int argc, VALUE *argv, VALUE self) { + semanage_iface_t *arg1 = (semanage_iface_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_get_name", 1, argv[0] )); + } + arg1 = (semanage_iface_t *)(argp1); + result = (char *)semanage_iface_get_name((struct semanage_iface const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_set_name(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t *arg2 = (semanage_iface_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_set_name", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_t *","semanage_iface_set_name", 2, argv[1] )); + } + arg2 = (semanage_iface_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_iface_set_name", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_iface_set_name(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_get_ifcon(int argc, VALUE *argv, VALUE self) { + semanage_iface_t *arg1 = (semanage_iface_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_context_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_get_ifcon", 1, argv[0] )); + } + arg1 = (semanage_iface_t *)(argp1); + result = (semanage_context_t *)semanage_iface_get_ifcon((struct semanage_iface const *)arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_semanage_context, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_set_ifcon(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t *arg2 = (semanage_iface_t *) 0 ; + semanage_context_t *arg3 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_set_ifcon", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_t *","semanage_iface_set_ifcon", 2, argv[1] )); + } + arg2 = (semanage_iface_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_iface_set_ifcon", 3, argv[2] )); + } + arg3 = (semanage_context_t *)(argp3); + result = (int)semanage_iface_set_ifcon(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_get_msgcon(int argc, VALUE *argv, VALUE self) { + semanage_iface_t *arg1 = (semanage_iface_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_context_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_get_msgcon", 1, argv[0] )); + } + arg1 = (semanage_iface_t *)(argp1); + result = (semanage_context_t *)semanage_iface_get_msgcon((struct semanage_iface const *)arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_semanage_context, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_set_msgcon(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t *arg2 = (semanage_iface_t *) 0 ; + semanage_context_t *arg3 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_set_msgcon", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_t *","semanage_iface_set_msgcon", 2, argv[1] )); + } + arg2 = (semanage_iface_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_iface_set_msgcon", 3, argv[2] )); + } + arg3 = (semanage_context_t *)(argp3); + result = (int)semanage_iface_set_msgcon(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t **arg2 = (semanage_iface_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_iface_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_iface_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_iface, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t *arg2 = (semanage_iface_t *) 0 ; + semanage_iface_t **arg3 = (semanage_iface_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_iface_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_clone", 2, argv[1] )); + } + arg2 = (semanage_iface_t *)(argp2); + result = (int)semanage_iface_clone(arg1,(struct semanage_iface const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_iface, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_free(int argc, VALUE *argv, VALUE self) { + semanage_iface_t *arg1 = (semanage_iface_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_iface_t *","semanage_iface_free", 1, argv[0] )); + } + arg1 = (semanage_iface_t *)(argp1); + semanage_iface_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_modify_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_key_t *arg2 = (semanage_iface_key_t *) 0 ; + semanage_iface_t *arg3 = (semanage_iface_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_modify_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_key_t const *","semanage_iface_modify_local", 2, argv[1] )); + } + arg2 = (semanage_iface_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_iface, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_iface_t const *","semanage_iface_modify_local", 3, argv[2] )); + } + arg3 = (semanage_iface_t *)(argp3); + result = (int)semanage_iface_modify_local(arg1,(struct semanage_iface_key const *)arg2,(struct semanage_iface const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_del_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_key_t *arg2 = (semanage_iface_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_del_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_key_t const *","semanage_iface_del_local", 2, argv[1] )); + } + arg2 = (semanage_iface_key_t *)(argp2); + result = (int)semanage_iface_del_local(arg1,(struct semanage_iface_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_query_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_key_t *arg2 = (semanage_iface_key_t *) 0 ; + semanage_iface_t **arg3 = (semanage_iface_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_iface_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_query_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_key_t const *","semanage_iface_query_local", 2, argv[1] )); + } + arg2 = (semanage_iface_key_t *)(argp2); + result = (int)semanage_iface_query_local(arg1,(struct semanage_iface_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_iface, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_exists_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_key_t *arg2 = (semanage_iface_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_exists_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_key_t const *","semanage_iface_exists_local", 2, argv[1] )); + } + arg2 = (semanage_iface_key_t *)(argp2); + result = (int)semanage_iface_exists_local(arg1,(struct semanage_iface_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_count_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_count_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_iface_count_local(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_iterate_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_iface_t const *,void *) = (int (*)(semanage_iface_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_iterate_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_iface_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_iface_t const *,void *)","semanage_iface_iterate_local", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_iface_iterate_local", 3, argv[2] )); + } + result = (int)semanage_iface_iterate_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_list_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t ***arg2 = (semanage_iface_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_iface_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_list_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_iface_list_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_query(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_key_t *arg2 = (semanage_iface_key_t *) 0 ; + semanage_iface_t **arg3 = (semanage_iface_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_iface_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_query", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_key_t const *","semanage_iface_query", 2, argv[1] )); + } + arg2 = (semanage_iface_key_t *)(argp2); + result = (int)semanage_iface_query(arg1,(struct semanage_iface_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_iface, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_exists(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_key_t *arg2 = (semanage_iface_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_exists", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_iface_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_iface_key_t const *","semanage_iface_exists", 2, argv[1] )); + } + arg2 = (semanage_iface_key_t *)(argp2); + result = (int)semanage_iface_exists(arg1,(struct semanage_iface_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_count(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_count", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_iface_count(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_iterate(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_iface_t const *,void *) = (int (*)(semanage_iface_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_iterate", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_iface_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_iface_t const *,void *)","semanage_iface_iterate", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_iface_iterate", 3, argv[2] )); + } + result = (int)semanage_iface_iterate(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_iface_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_iface_t ***arg2 = (semanage_iface_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_iface_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_iface_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_iface_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_key_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + semanage_user_key_t **arg3 = (semanage_user_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + semanage_user_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_key_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_user_key_create", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_user_key_create(arg1,(char const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_user_key, 0)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_key_extract(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + semanage_user_key_t **arg3 = (semanage_user_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_user_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_key_extract", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_key_extract", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + result = (int)semanage_user_key_extract(arg1,(struct semanage_user const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_user_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_key_free(int argc, VALUE *argv, VALUE self) { + semanage_user_key_t *arg1 = (semanage_user_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_key_t *","semanage_user_key_free", 1, argv[0] )); + } + arg1 = (semanage_user_key_t *)(argp1); + semanage_user_key_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_compare(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + semanage_user_key_t *arg2 = (semanage_user_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_compare", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_key_t const *","semanage_user_compare", 2, argv[1] )); + } + arg2 = (semanage_user_key_t *)(argp2); + result = (int)semanage_user_compare((struct semanage_user const *)arg1,(struct semanage_user_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_compare2(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_compare2", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_compare2", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + result = (int)semanage_user_compare2((struct semanage_user const *)arg1,(struct semanage_user const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_get_name(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_get_name", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + result = (char *)semanage_user_get_name((struct semanage_user const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_set_name(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_set_name", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_set_name", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_user_set_name", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_user_set_name(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_get_prefix(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_get_prefix", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + result = (char *)semanage_user_get_prefix((struct semanage_user const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_set_prefix(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_set_prefix", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_set_prefix", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_user_set_prefix", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_user_set_prefix(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_get_mlslevel(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_get_mlslevel", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + result = (char *)semanage_user_get_mlslevel((struct semanage_user const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_set_mlslevel(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_set_mlslevel", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_set_mlslevel", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_user_set_mlslevel", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_user_set_mlslevel(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_get_mlsrange(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_get_mlsrange", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + result = (char *)semanage_user_get_mlsrange((struct semanage_user const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_set_mlsrange(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_set_mlsrange", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_set_mlsrange", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_user_set_mlsrange", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_user_set_mlsrange(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_get_num_roles(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_get_num_roles", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + result = (int)semanage_user_get_num_roles((struct semanage_user const *)arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_add_role(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_add_role", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_add_role", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_user_add_role", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_user_add_role(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_del_role(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_del_role", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_user_del_role", 2, argv[1] )); + } + arg2 = (char *)(buf2); + semanage_user_del_role(arg1,(char const *)arg2); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_has_role(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + char *arg2 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_has_role", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_user_has_role", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_user_has_role((struct semanage_user const *)arg1,(char const *)arg2); + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_get_roles(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + char ***arg3 = (char ***) 0 ; + unsigned int *arg4 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + char **temp3 = NULL ; + unsigned int temp4 ; + int res4 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + arg4 = &temp4; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_get_roles", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_get_roles", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + result = (int)semanage_user_get_roles(arg1,(struct semanage_user const *)arg2,(char const ***)arg3,arg4); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res4)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_set_roles(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + char **arg3 = (char **) 0 ; + unsigned int arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + char *temp3 = NULL ; + unsigned int val4 ; + int ecode4 = 0 ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_set_roles", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_set_roles", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + ecode4 = SWIG_AsVal_unsigned_SS_int(argv[2], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "unsigned int","semanage_user_set_roles", 4, argv[2] )); + } + arg4 = (unsigned int)(val4); + result = (int)semanage_user_set_roles(arg1,arg2,(char const **)arg3,arg4); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(*arg3)); + free(*arg3); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t **arg2 = (semanage_user_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_user_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_user_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_user, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t *arg2 = (semanage_user_t *) 0 ; + semanage_user_t **arg3 = (semanage_user_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_user_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_clone", 2, argv[1] )); + } + arg2 = (semanage_user_t *)(argp2); + result = (int)semanage_user_clone(arg1,(struct semanage_user const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_user, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_free(int argc, VALUE *argv, VALUE self) { + semanage_user_t *arg1 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_user_t *","semanage_user_free", 1, argv[0] )); + } + arg1 = (semanage_user_t *)(argp1); + semanage_user_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_modify_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_key_t *arg2 = (semanage_user_key_t *) 0 ; + semanage_user_t *arg3 = (semanage_user_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_modify_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_key_t const *","semanage_user_modify_local", 2, argv[1] )); + } + arg2 = (semanage_user_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_user, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_user_t const *","semanage_user_modify_local", 3, argv[2] )); + } + arg3 = (semanage_user_t *)(argp3); + result = (int)semanage_user_modify_local(arg1,(struct semanage_user_key const *)arg2,(struct semanage_user const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_del_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_key_t *arg2 = (semanage_user_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_del_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_key_t const *","semanage_user_del_local", 2, argv[1] )); + } + arg2 = (semanage_user_key_t *)(argp2); + result = (int)semanage_user_del_local(arg1,(struct semanage_user_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_query_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_key_t *arg2 = (semanage_user_key_t *) 0 ; + semanage_user_t **arg3 = (semanage_user_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_user_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_query_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_key_t const *","semanage_user_query_local", 2, argv[1] )); + } + arg2 = (semanage_user_key_t *)(argp2); + result = (int)semanage_user_query_local(arg1,(struct semanage_user_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_user, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_exists_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_key_t *arg2 = (semanage_user_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_exists_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_key_t const *","semanage_user_exists_local", 2, argv[1] )); + } + arg2 = (semanage_user_key_t *)(argp2); + result = (int)semanage_user_exists_local(arg1,(struct semanage_user_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_count_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_count_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_user_count_local(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_iterate_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_user_t const *,void *) = (int (*)(semanage_user_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_iterate_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_user_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_user_t const *,void *)","semanage_user_iterate_local", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_user_iterate_local", 3, argv[2] )); + } + result = (int)semanage_user_iterate_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_list_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t ***arg2 = (semanage_user_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_user_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_list_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_user_list_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_query(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_key_t *arg2 = (semanage_user_key_t *) 0 ; + semanage_user_t **arg3 = (semanage_user_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_user_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_query", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_key_t const *","semanage_user_query", 2, argv[1] )); + } + arg2 = (semanage_user_key_t *)(argp2); + result = (int)semanage_user_query(arg1,(struct semanage_user_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_user, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_exists(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_key_t *arg2 = (semanage_user_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_exists", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_user_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_user_key_t const *","semanage_user_exists", 2, argv[1] )); + } + arg2 = (semanage_user_key_t *)(argp2); + result = (int)semanage_user_exists(arg1,(struct semanage_user_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_count(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_count", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_user_count(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_iterate(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_user_t const *,void *) = (int (*)(semanage_user_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_iterate", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_user_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_user_t const *,void *)","semanage_user_iterate", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_user_iterate", 3, argv[2] )); + } + result = (int)semanage_user_iterate(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_user_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_user_t ***arg2 = (semanage_user_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_user_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_user_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_user_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_compare(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + semanage_port_key_t *arg2 = (semanage_port_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_compare", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_key_t const *","semanage_port_compare", 2, argv[1] )); + } + arg2 = (semanage_port_key_t *)(argp2); + result = (int)semanage_port_compare((struct semanage_port const *)arg1,(struct semanage_port_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_compare2(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + semanage_port_t *arg2 = (semanage_port_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_compare2", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_compare2", 2, argv[1] )); + } + arg2 = (semanage_port_t *)(argp2); + result = (int)semanage_port_compare2((struct semanage_port const *)arg1,(struct semanage_port const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_key_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int arg2 ; + int arg3 ; + int arg4 ; + semanage_port_key_t **arg5 = (semanage_port_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int val4 ; + int ecode4 = 0 ; + semanage_port_key_t *temp5 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg5 = &temp5; + } + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_key_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_port_key_create", 2, argv[1] )); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","semanage_port_key_create", 3, argv[2] )); + } + arg3 = (int)(val3); + ecode4 = SWIG_AsVal_int(argv[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","semanage_port_key_create", 4, argv[3] )); + } + arg4 = (int)(val4); + result = (int)semanage_port_key_create(arg1,arg2,arg3,arg4,arg5); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg5, SWIGTYPE_p_semanage_port_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_key_extract(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_t *arg2 = (semanage_port_t *) 0 ; + semanage_port_key_t **arg3 = (semanage_port_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_port_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_key_extract", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_key_extract", 2, argv[1] )); + } + arg2 = (semanage_port_t *)(argp2); + result = (int)semanage_port_key_extract(arg1,(struct semanage_port const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_port_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_key_free(int argc, VALUE *argv, VALUE self) { + semanage_port_key_t *arg1 = (semanage_port_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_key_t *","semanage_port_key_free", 1, argv[0] )); + } + arg1 = (semanage_port_key_t *)(argp1); + semanage_port_key_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_get_proto(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_get_proto", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + result = (int)semanage_port_get_proto((struct semanage_port const *)arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_set_proto(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t *","semanage_port_set_proto", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_port_set_proto", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_port_set_proto(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_get_proto_str(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","semanage_port_get_proto_str", 1, argv[0] )); + } + arg1 = (int)(val1); + result = (char *)semanage_port_get_proto_str(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_get_low(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_get_low", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + result = (int)semanage_port_get_low((struct semanage_port const *)arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_get_high(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_get_high", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + result = (int)semanage_port_get_high((struct semanage_port const *)arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_set_port(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t *","semanage_port_set_port", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_port_set_port", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_port_set_port(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_set_range(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + int arg2 ; + int arg3 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + int val3 ; + int ecode3 = 0 ; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t *","semanage_port_set_range", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_port_set_range", 2, argv[1] )); + } + arg2 = (int)(val2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","semanage_port_set_range", 3, argv[2] )); + } + arg3 = (int)(val3); + semanage_port_set_range(arg1,arg2,arg3); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_get_con(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_context_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_get_con", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + result = (semanage_context_t *)semanage_port_get_con((struct semanage_port const *)arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_semanage_context, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_set_con(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_t *arg2 = (semanage_port_t *) 0 ; + semanage_context_t *arg3 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_set_con", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_t *","semanage_port_set_con", 2, argv[1] )); + } + arg2 = (semanage_port_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_port_set_con", 3, argv[2] )); + } + arg3 = (semanage_context_t *)(argp3); + result = (int)semanage_port_set_con(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_t **arg2 = (semanage_port_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_port_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_port_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_port, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_t *arg2 = (semanage_port_t *) 0 ; + semanage_port_t **arg3 = (semanage_port_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_port_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_clone", 2, argv[1] )); + } + arg2 = (semanage_port_t *)(argp2); + result = (int)semanage_port_clone(arg1,(struct semanage_port const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_port, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_free(int argc, VALUE *argv, VALUE self) { + semanage_port_t *arg1 = (semanage_port_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_port_t *","semanage_port_free", 1, argv[0] )); + } + arg1 = (semanage_port_t *)(argp1); + semanage_port_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_modify_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_key_t *arg2 = (semanage_port_key_t *) 0 ; + semanage_port_t *arg3 = (semanage_port_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_modify_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_key_t const *","semanage_port_modify_local", 2, argv[1] )); + } + arg2 = (semanage_port_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_port, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_port_t const *","semanage_port_modify_local", 3, argv[2] )); + } + arg3 = (semanage_port_t *)(argp3); + result = (int)semanage_port_modify_local(arg1,(struct semanage_port_key const *)arg2,(struct semanage_port const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_del_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_key_t *arg2 = (semanage_port_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_del_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_key_t const *","semanage_port_del_local", 2, argv[1] )); + } + arg2 = (semanage_port_key_t *)(argp2); + result = (int)semanage_port_del_local(arg1,(struct semanage_port_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_query_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_key_t *arg2 = (semanage_port_key_t *) 0 ; + semanage_port_t **arg3 = (semanage_port_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_port_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_query_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_key_t const *","semanage_port_query_local", 2, argv[1] )); + } + arg2 = (semanage_port_key_t *)(argp2); + result = (int)semanage_port_query_local(arg1,(struct semanage_port_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_port, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_exists_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_key_t *arg2 = (semanage_port_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_exists_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_key_t const *","semanage_port_exists_local", 2, argv[1] )); + } + arg2 = (semanage_port_key_t *)(argp2); + result = (int)semanage_port_exists_local(arg1,(struct semanage_port_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_count_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_count_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_port_count_local(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_iterate_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_port_t const *,void *) = (int (*)(semanage_port_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_iterate_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_port_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_port_t const *,void *)","semanage_port_iterate_local", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_port_iterate_local", 3, argv[2] )); + } + result = (int)semanage_port_iterate_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_list_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_t ***arg2 = (semanage_port_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_port_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_list_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_port_list_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_query(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_key_t *arg2 = (semanage_port_key_t *) 0 ; + semanage_port_t **arg3 = (semanage_port_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_port_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_query", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_key_t const *","semanage_port_query", 2, argv[1] )); + } + arg2 = (semanage_port_key_t *)(argp2); + result = (int)semanage_port_query(arg1,(struct semanage_port_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_port, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_exists(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_key_t *arg2 = (semanage_port_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_exists", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_port_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_port_key_t const *","semanage_port_exists", 2, argv[1] )); + } + arg2 = (semanage_port_key_t *)(argp2); + result = (int)semanage_port_exists(arg1,(struct semanage_port_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_count(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_count", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_port_count(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_iterate(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_port_t const *,void *) = (int (*)(semanage_port_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_iterate", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_port_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_port_t const *,void *)","semanage_port_iterate", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_port_iterate", 3, argv[2] )); + } + result = (int)semanage_port_iterate(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_port_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_port_t ***arg2 = (semanage_port_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_port_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_port_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_port_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_compare(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_t *arg1 = (semanage_fcontext_t *) 0 ; + semanage_fcontext_key_t *arg2 = (semanage_fcontext_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_compare", 1, argv[0] )); + } + arg1 = (semanage_fcontext_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_key_t const *","semanage_fcontext_compare", 2, argv[1] )); + } + arg2 = (semanage_fcontext_key_t *)(argp2); + result = (int)semanage_fcontext_compare((struct semanage_fcontext const *)arg1,(struct semanage_fcontext_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_compare2(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_t *arg1 = (semanage_fcontext_t *) 0 ; + semanage_fcontext_t *arg2 = (semanage_fcontext_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_compare2", 1, argv[0] )); + } + arg1 = (semanage_fcontext_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_compare2", 2, argv[1] )); + } + arg2 = (semanage_fcontext_t *)(argp2); + result = (int)semanage_fcontext_compare2((struct semanage_fcontext const *)arg1,(struct semanage_fcontext const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_key_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + int arg3 ; + semanage_fcontext_key_t **arg4 = (semanage_fcontext_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + semanage_fcontext_key_t *temp4 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg4 = &temp4; + } + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_key_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_fcontext_key_create", 2, argv[1] )); + } + arg2 = (char *)(buf2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","semanage_fcontext_key_create", 3, argv[2] )); + } + arg3 = (int)(val3); + result = (int)semanage_fcontext_key_create(arg1,(char const *)arg2,arg3,arg4); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg4, SWIGTYPE_p_semanage_fcontext_key, 0)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_key_extract(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_t *arg2 = (semanage_fcontext_t *) 0 ; + semanage_fcontext_key_t **arg3 = (semanage_fcontext_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_fcontext_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_key_extract", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_key_extract", 2, argv[1] )); + } + arg2 = (semanage_fcontext_t *)(argp2); + result = (int)semanage_fcontext_key_extract(arg1,(struct semanage_fcontext const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_fcontext_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_key_free(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_key_t *arg1 = (semanage_fcontext_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_key_t *","semanage_fcontext_key_free", 1, argv[0] )); + } + arg1 = (semanage_fcontext_key_t *)(argp1); + semanage_fcontext_key_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_get_expr(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_t *arg1 = (semanage_fcontext_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_get_expr", 1, argv[0] )); + } + arg1 = (semanage_fcontext_t *)(argp1); + result = (char *)semanage_fcontext_get_expr((struct semanage_fcontext const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_set_expr(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_t *arg2 = (semanage_fcontext_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_set_expr", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_t *","semanage_fcontext_set_expr", 2, argv[1] )); + } + arg2 = (semanage_fcontext_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_fcontext_set_expr", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_fcontext_set_expr(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_get_type(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_t *arg1 = (semanage_fcontext_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_get_type", 1, argv[0] )); + } + arg1 = (semanage_fcontext_t *)(argp1); + result = (int)semanage_fcontext_get_type((struct semanage_fcontext const *)arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_get_type_str(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","semanage_fcontext_get_type_str", 1, argv[0] )); + } + arg1 = (int)(val1); + result = (char *)semanage_fcontext_get_type_str(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_set_type(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_t *arg1 = (semanage_fcontext_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_t *","semanage_fcontext_set_type", 1, argv[0] )); + } + arg1 = (semanage_fcontext_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_fcontext_set_type", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_fcontext_set_type(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_get_con(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_t *arg1 = (semanage_fcontext_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_context_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_get_con", 1, argv[0] )); + } + arg1 = (semanage_fcontext_t *)(argp1); + result = (semanage_context_t *)semanage_fcontext_get_con((struct semanage_fcontext const *)arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_semanage_context, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_set_con(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_t *arg2 = (semanage_fcontext_t *) 0 ; + semanage_context_t *arg3 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_set_con", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_t *","semanage_fcontext_set_con", 2, argv[1] )); + } + arg2 = (semanage_fcontext_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_fcontext_set_con", 3, argv[2] )); + } + arg3 = (semanage_context_t *)(argp3); + result = (int)semanage_fcontext_set_con(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_t **arg2 = (semanage_fcontext_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_fcontext_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_fcontext_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_fcontext, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_t *arg2 = (semanage_fcontext_t *) 0 ; + semanage_fcontext_t **arg3 = (semanage_fcontext_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_fcontext_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_clone", 2, argv[1] )); + } + arg2 = (semanage_fcontext_t *)(argp2); + result = (int)semanage_fcontext_clone(arg1,(struct semanage_fcontext const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_fcontext, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_free(int argc, VALUE *argv, VALUE self) { + semanage_fcontext_t *arg1 = (semanage_fcontext_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_fcontext_t *","semanage_fcontext_free", 1, argv[0] )); + } + arg1 = (semanage_fcontext_t *)(argp1); + semanage_fcontext_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_modify_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_key_t *arg2 = (semanage_fcontext_key_t *) 0 ; + semanage_fcontext_t *arg3 = (semanage_fcontext_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_modify_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_key_t const *","semanage_fcontext_modify_local", 2, argv[1] )); + } + arg2 = (semanage_fcontext_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_fcontext, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_fcontext_t const *","semanage_fcontext_modify_local", 3, argv[2] )); + } + arg3 = (semanage_fcontext_t *)(argp3); + result = (int)semanage_fcontext_modify_local(arg1,(struct semanage_fcontext_key const *)arg2,(struct semanage_fcontext const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_del_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_key_t *arg2 = (semanage_fcontext_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_del_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_key_t const *","semanage_fcontext_del_local", 2, argv[1] )); + } + arg2 = (semanage_fcontext_key_t *)(argp2); + result = (int)semanage_fcontext_del_local(arg1,(struct semanage_fcontext_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_query_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_key_t *arg2 = (semanage_fcontext_key_t *) 0 ; + semanage_fcontext_t **arg3 = (semanage_fcontext_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_fcontext_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_query_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_key_t const *","semanage_fcontext_query_local", 2, argv[1] )); + } + arg2 = (semanage_fcontext_key_t *)(argp2); + result = (int)semanage_fcontext_query_local(arg1,(struct semanage_fcontext_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_fcontext, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_exists_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_key_t *arg2 = (semanage_fcontext_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_exists_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_key_t const *","semanage_fcontext_exists_local", 2, argv[1] )); + } + arg2 = (semanage_fcontext_key_t *)(argp2); + result = (int)semanage_fcontext_exists_local(arg1,(struct semanage_fcontext_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_count_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_count_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_fcontext_count_local(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_iterate_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_fcontext_t const *,void *) = (int (*)(semanage_fcontext_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_iterate_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_fcontext_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_fcontext_t const *,void *)","semanage_fcontext_iterate_local", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_fcontext_iterate_local", 3, argv[2] )); + } + result = (int)semanage_fcontext_iterate_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_list_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_t ***arg2 = (semanage_fcontext_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_fcontext_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_list_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_fcontext_list_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_query(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_key_t *arg2 = (semanage_fcontext_key_t *) 0 ; + semanage_fcontext_t **arg3 = (semanage_fcontext_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_fcontext_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_query", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_key_t const *","semanage_fcontext_query", 2, argv[1] )); + } + arg2 = (semanage_fcontext_key_t *)(argp2); + result = (int)semanage_fcontext_query(arg1,(struct semanage_fcontext_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_fcontext, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_exists(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_key_t *arg2 = (semanage_fcontext_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_exists", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_fcontext_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_fcontext_key_t const *","semanage_fcontext_exists", 2, argv[1] )); + } + arg2 = (semanage_fcontext_key_t *)(argp2); + result = (int)semanage_fcontext_exists(arg1,(struct semanage_fcontext_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_count(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_count", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_fcontext_count(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_iterate(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_fcontext_t const *,void *) = (int (*)(semanage_fcontext_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_iterate", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_fcontext_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_fcontext_t const *,void *)","semanage_fcontext_iterate", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_fcontext_iterate", 3, argv[2] )); + } + result = (int)semanage_fcontext_iterate(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_fcontext_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_fcontext_t ***arg2 = (semanage_fcontext_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_fcontext_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_fcontext_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_fcontext_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_key_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + semanage_seuser_key_t **arg3 = (semanage_seuser_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + semanage_seuser_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_key_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_seuser_key_create", 2, argv[1] )); + } + arg2 = (char *)(buf2); + result = (int)semanage_seuser_key_create(arg1,(char const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_seuser_key, 0)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_key_extract(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t *arg2 = (semanage_seuser_t *) 0 ; + semanage_seuser_key_t **arg3 = (semanage_seuser_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_seuser_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_key_extract", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_key_extract", 2, argv[1] )); + } + arg2 = (semanage_seuser_t *)(argp2); + result = (int)semanage_seuser_key_extract(arg1,(struct semanage_seuser const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_seuser_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_key_free(int argc, VALUE *argv, VALUE self) { + semanage_seuser_key_t *arg1 = (semanage_seuser_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_seuser_key_t *","semanage_seuser_key_free", 1, argv[0] )); + } + arg1 = (semanage_seuser_key_t *)(argp1); + semanage_seuser_key_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_compare(int argc, VALUE *argv, VALUE self) { + semanage_seuser_t *arg1 = (semanage_seuser_t *) 0 ; + semanage_seuser_key_t *arg2 = (semanage_seuser_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_compare", 1, argv[0] )); + } + arg1 = (semanage_seuser_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_key_t const *","semanage_seuser_compare", 2, argv[1] )); + } + arg2 = (semanage_seuser_key_t *)(argp2); + result = (int)semanage_seuser_compare((struct semanage_seuser const *)arg1,(struct semanage_seuser_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_compare2(int argc, VALUE *argv, VALUE self) { + semanage_seuser_t *arg1 = (semanage_seuser_t *) 0 ; + semanage_seuser_t *arg2 = (semanage_seuser_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_compare2", 1, argv[0] )); + } + arg1 = (semanage_seuser_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_compare2", 2, argv[1] )); + } + arg2 = (semanage_seuser_t *)(argp2); + result = (int)semanage_seuser_compare2((struct semanage_seuser const *)arg1,(struct semanage_seuser const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_get_name(int argc, VALUE *argv, VALUE self) { + semanage_seuser_t *arg1 = (semanage_seuser_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_get_name", 1, argv[0] )); + } + arg1 = (semanage_seuser_t *)(argp1); + result = (char *)semanage_seuser_get_name((struct semanage_seuser const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_set_name(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t *arg2 = (semanage_seuser_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_set_name", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_t *","semanage_seuser_set_name", 2, argv[1] )); + } + arg2 = (semanage_seuser_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_seuser_set_name", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_seuser_set_name(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_get_sename(int argc, VALUE *argv, VALUE self) { + semanage_seuser_t *arg1 = (semanage_seuser_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_get_sename", 1, argv[0] )); + } + arg1 = (semanage_seuser_t *)(argp1); + result = (char *)semanage_seuser_get_sename((struct semanage_seuser const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_set_sename(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t *arg2 = (semanage_seuser_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_set_sename", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_t *","semanage_seuser_set_sename", 2, argv[1] )); + } + arg2 = (semanage_seuser_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_seuser_set_sename", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_seuser_set_sename(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_get_mlsrange(int argc, VALUE *argv, VALUE self) { + semanage_seuser_t *arg1 = (semanage_seuser_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_get_mlsrange", 1, argv[0] )); + } + arg1 = (semanage_seuser_t *)(argp1); + result = (char *)semanage_seuser_get_mlsrange((struct semanage_seuser const *)arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_set_mlsrange(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t *arg2 = (semanage_seuser_t *) 0 ; + char *arg3 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_set_mlsrange", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_t *","semanage_seuser_set_mlsrange", 2, argv[1] )); + } + arg2 = (semanage_seuser_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_seuser_set_mlsrange", 3, argv[2] )); + } + arg3 = (char *)(buf3); + result = (int)semanage_seuser_set_mlsrange(arg1,arg2,(char const *)arg3); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t **arg2 = (semanage_seuser_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_seuser_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_seuser_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_seuser, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t *arg2 = (semanage_seuser_t *) 0 ; + semanage_seuser_t **arg3 = (semanage_seuser_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_seuser_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_clone", 2, argv[1] )); + } + arg2 = (semanage_seuser_t *)(argp2); + result = (int)semanage_seuser_clone(arg1,(struct semanage_seuser const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_seuser, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_free(int argc, VALUE *argv, VALUE self) { + semanage_seuser_t *arg1 = (semanage_seuser_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_seuser_t *","semanage_seuser_free", 1, argv[0] )); + } + arg1 = (semanage_seuser_t *)(argp1); + semanage_seuser_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_modify_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_key_t *arg2 = (semanage_seuser_key_t *) 0 ; + semanage_seuser_t *arg3 = (semanage_seuser_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_modify_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_key_t const *","semanage_seuser_modify_local", 2, argv[1] )); + } + arg2 = (semanage_seuser_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_seuser, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_seuser_t const *","semanage_seuser_modify_local", 3, argv[2] )); + } + arg3 = (semanage_seuser_t *)(argp3); + result = (int)semanage_seuser_modify_local(arg1,(struct semanage_seuser_key const *)arg2,(struct semanage_seuser const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_del_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_key_t *arg2 = (semanage_seuser_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_del_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_key_t const *","semanage_seuser_del_local", 2, argv[1] )); + } + arg2 = (semanage_seuser_key_t *)(argp2); + result = (int)semanage_seuser_del_local(arg1,(struct semanage_seuser_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_query_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_key_t *arg2 = (semanage_seuser_key_t *) 0 ; + semanage_seuser_t **arg3 = (semanage_seuser_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_seuser_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_query_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_key_t const *","semanage_seuser_query_local", 2, argv[1] )); + } + arg2 = (semanage_seuser_key_t *)(argp2); + result = (int)semanage_seuser_query_local(arg1,(struct semanage_seuser_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_seuser, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_exists_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_key_t *arg2 = (semanage_seuser_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_exists_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_key_t const *","semanage_seuser_exists_local", 2, argv[1] )); + } + arg2 = (semanage_seuser_key_t *)(argp2); + result = (int)semanage_seuser_exists_local(arg1,(struct semanage_seuser_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_count_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_count_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_seuser_count_local(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_iterate_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_seuser_t const *,void *) = (int (*)(semanage_seuser_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_iterate_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_seuser_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_seuser_t const *,void *)","semanage_seuser_iterate_local", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_seuser_iterate_local", 3, argv[2] )); + } + result = (int)semanage_seuser_iterate_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_list_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t ***arg2 = (semanage_seuser_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_seuser_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_list_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_seuser_list_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_query(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_key_t *arg2 = (semanage_seuser_key_t *) 0 ; + semanage_seuser_t **arg3 = (semanage_seuser_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_seuser_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_query", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_key_t const *","semanage_seuser_query", 2, argv[1] )); + } + arg2 = (semanage_seuser_key_t *)(argp2); + result = (int)semanage_seuser_query(arg1,(struct semanage_seuser_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_seuser, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_exists(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_key_t *arg2 = (semanage_seuser_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_exists", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_seuser_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_seuser_key_t const *","semanage_seuser_exists", 2, argv[1] )); + } + arg2 = (semanage_seuser_key_t *)(argp2); + result = (int)semanage_seuser_exists(arg1,(struct semanage_seuser_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_count(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_count", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_seuser_count(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_iterate(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_seuser_t const *,void *) = (int (*)(semanage_seuser_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_iterate", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_seuser_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_seuser_t const *,void *)","semanage_seuser_iterate", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_seuser_iterate", 3, argv[2] )); + } + result = (int)semanage_seuser_iterate(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_seuser_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_seuser_t ***arg2 = (semanage_seuser_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_seuser_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_seuser_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_seuser_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_compare(int argc, VALUE *argv, VALUE self) { + semanage_node_t *arg1 = (semanage_node_t *) 0 ; + semanage_node_key_t *arg2 = (semanage_node_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_compare", 1, argv[0] )); + } + arg1 = (semanage_node_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_key_t const *","semanage_node_compare", 2, argv[1] )); + } + arg2 = (semanage_node_key_t *)(argp2); + result = (int)semanage_node_compare((struct semanage_node const *)arg1,(struct semanage_node_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_compare2(int argc, VALUE *argv, VALUE self) { + semanage_node_t *arg1 = (semanage_node_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_compare2", 1, argv[0] )); + } + arg1 = (semanage_node_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_compare2", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + result = (int)semanage_node_compare2((struct semanage_node const *)arg1,(struct semanage_node const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_key_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + char *arg2 = (char *) 0 ; + char *arg3 = (char *) 0 ; + int arg4 ; + semanage_node_key_t **arg5 = (semanage_node_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + int val4 ; + int ecode4 = 0 ; + semanage_node_key_t *temp5 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg5 = &temp5; + } + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_key_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","semanage_node_key_create", 2, argv[1] )); + } + arg2 = (char *)(buf2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_node_key_create", 3, argv[2] )); + } + arg3 = (char *)(buf3); + ecode4 = SWIG_AsVal_int(argv[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","semanage_node_key_create", 4, argv[3] )); + } + arg4 = (int)(val4); + result = (int)semanage_node_key_create(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg5, SWIGTYPE_p_semanage_node_key, 0)); + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_key_extract(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + semanage_node_key_t **arg3 = (semanage_node_key_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_node_key_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_key_extract", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_key_extract", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + result = (int)semanage_node_key_extract(arg1,(struct semanage_node const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_node_key, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_key_free(int argc, VALUE *argv, VALUE self) { + semanage_node_key_t *arg1 = (semanage_node_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_node_key_t *","semanage_node_key_free", 1, argv[0] )); + } + arg1 = (semanage_node_key_t *)(argp1); + semanage_node_key_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_get_addr(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + char **arg3 = (char **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + char *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_get_addr", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_get_addr", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + result = (int)semanage_node_get_addr(arg1,(struct semanage_node const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(*arg3)); + free(*arg3); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_get_addr_bytes(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + char **arg3 = (char **) 0 ; + size_t *arg4 = (size_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + char *temp3 = NULL ; + size_t temp4 ; + int res4 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + arg4 = &temp4; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_get_addr_bytes", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_get_addr_bytes", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + result = (int)semanage_node_get_addr_bytes(arg1,(struct semanage_node const *)arg2,arg3,arg4); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(*arg3)); + free(*arg3); + } + if (SWIG_IsTmpObj(res4)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_size_t, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_set_addr(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + int arg3 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_set_addr", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t *","semanage_node_set_addr", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","semanage_node_set_addr", 3, argv[2] )); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","semanage_node_set_addr", 4, argv[3] )); + } + arg4 = (char *)(buf4); + result = (int)semanage_node_set_addr(arg1,arg2,arg3,(char const *)arg4); + vresult = SWIG_From_int((int)(result)); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return vresult; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_set_addr_bytes(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + char *arg3 = (char *) 0 ; + size_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + size_t val4 ; + int ecode4 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_set_addr_bytes", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t *","semanage_node_set_addr_bytes", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_node_set_addr_bytes", 3, argv[2] )); + } + arg3 = (char *)(buf3); + ecode4 = SWIG_AsVal_size_t(argv[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","semanage_node_set_addr_bytes", 4, argv[3] )); + } + arg4 = (size_t)(val4); + result = (int)semanage_node_set_addr_bytes(arg1,arg2,(char const *)arg3,arg4); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_get_mask(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + char **arg3 = (char **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + char *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_get_mask", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_get_mask", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + result = (int)semanage_node_get_mask(arg1,(struct semanage_node const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(*arg3)); + free(*arg3); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_get_mask_bytes(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + char **arg3 = (char **) 0 ; + size_t *arg4 = (size_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + char *temp3 = NULL ; + size_t temp4 ; + int res4 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + arg4 = &temp4; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_get_mask_bytes", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_get_mask_bytes", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + result = (int)semanage_node_get_mask_bytes(arg1,(struct semanage_node const *)arg2,arg3,arg4); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_FromCharPtr(*arg3)); + free(*arg3); + } + if (SWIG_IsTmpObj(res4)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg4))); + } else { + int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_size_t, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_set_mask(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + int arg3 ; + char *arg4 = (char *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int val3 ; + int ecode3 = 0 ; + int res4 ; + char *buf4 = 0 ; + int alloc4 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_set_mask", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t *","semanage_node_set_mask", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), Ruby_Format_TypeError( "", "int","semanage_node_set_mask", 3, argv[2] )); + } + arg3 = (int)(val3); + res4 = SWIG_AsCharPtrAndSize(argv[3], &buf4, NULL, &alloc4); + if (!SWIG_IsOK(res4)) { + SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char const *","semanage_node_set_mask", 4, argv[3] )); + } + arg4 = (char *)(buf4); + result = (int)semanage_node_set_mask(arg1,arg2,arg3,(char const *)arg4); + vresult = SWIG_From_int((int)(result)); + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return vresult; +fail: + if (alloc4 == SWIG_NEWOBJ) free((char*)buf4); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_set_mask_bytes(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + char *arg3 = (char *) 0 ; + size_t arg4 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int res3 ; + char *buf3 = 0 ; + int alloc3 = 0 ; + size_t val4 ; + int ecode4 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_set_mask_bytes", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t *","semanage_node_set_mask_bytes", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + res3 = SWIG_AsCharPtrAndSize(argv[2], &buf3, NULL, &alloc3); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char const *","semanage_node_set_mask_bytes", 3, argv[2] )); + } + arg3 = (char *)(buf3); + ecode4 = SWIG_AsVal_size_t(argv[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","semanage_node_set_mask_bytes", 4, argv[3] )); + } + arg4 = (size_t)(val4); + result = (int)semanage_node_set_mask_bytes(arg1,arg2,(char const *)arg3,arg4); + vresult = SWIG_From_int((int)(result)); + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return vresult; +fail: + if (alloc3 == SWIG_NEWOBJ) free((char*)buf3); + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_get_proto(int argc, VALUE *argv, VALUE self) { + semanage_node_t *arg1 = (semanage_node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_get_proto", 1, argv[0] )); + } + arg1 = (semanage_node_t *)(argp1); + result = (int)semanage_node_get_proto((struct semanage_node const *)arg1); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_set_proto(int argc, VALUE *argv, VALUE self) { + semanage_node_t *arg1 = (semanage_node_t *) 0 ; + int arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_node_t *","semanage_node_set_proto", 1, argv[0] )); + } + arg1 = (semanage_node_t *)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","semanage_node_set_proto", 2, argv[1] )); + } + arg2 = (int)(val2); + semanage_node_set_proto(arg1,arg2); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_get_proto_str(int argc, VALUE *argv, VALUE self) { + int arg1 ; + int val1 ; + int ecode1 = 0 ; + char *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), Ruby_Format_TypeError( "", "int","semanage_node_get_proto_str", 1, argv[0] )); + } + arg1 = (int)(val1); + result = (char *)semanage_node_get_proto_str(arg1); + vresult = SWIG_FromCharPtr((const char *)result); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_get_con(int argc, VALUE *argv, VALUE self) { + semanage_node_t *arg1 = (semanage_node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_context_t *result = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_get_con", 1, argv[0] )); + } + arg1 = (semanage_node_t *)(argp1); + result = (semanage_context_t *)semanage_node_get_con((struct semanage_node const *)arg1); + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_semanage_context, 0 | 0 ); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_set_con(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + semanage_context_t *arg3 = (semanage_context_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_set_con", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t *","semanage_node_set_con", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_context, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_context_t *","semanage_node_set_con", 3, argv[2] )); + } + arg3 = (semanage_context_t *)(argp3); + result = (int)semanage_node_set_con(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_create(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t **arg2 = (semanage_node_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_node_t *temp2 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_create", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_node_create(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg2, SWIGTYPE_p_semanage_node, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_clone(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t *arg2 = (semanage_node_t *) 0 ; + semanage_node_t **arg3 = (semanage_node_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_node_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_clone", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_clone", 2, argv[1] )); + } + arg2 = (semanage_node_t *)(argp2); + result = (int)semanage_node_clone(arg1,(struct semanage_node const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_node, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_free(int argc, VALUE *argv, VALUE self) { + semanage_node_t *arg1 = (semanage_node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_node_t *","semanage_node_free", 1, argv[0] )); + } + arg1 = (semanage_node_t *)(argp1); + semanage_node_free(arg1); + return Qnil; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_modify_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_key_t *arg2 = (semanage_node_key_t *) 0 ; + semanage_node_t *arg3 = (semanage_node_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_modify_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_key_t const *","semanage_node_modify_local", 2, argv[1] )); + } + arg2 = (semanage_node_key_t *)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_semanage_node, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "semanage_node_t const *","semanage_node_modify_local", 3, argv[2] )); + } + arg3 = (semanage_node_t *)(argp3); + result = (int)semanage_node_modify_local(arg1,(struct semanage_node_key const *)arg2,(struct semanage_node const *)arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_del_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_key_t *arg2 = (semanage_node_key_t *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_del_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_key_t const *","semanage_node_del_local", 2, argv[1] )); + } + arg2 = (semanage_node_key_t *)(argp2); + result = (int)semanage_node_del_local(arg1,(struct semanage_node_key const *)arg2); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_query_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_key_t *arg2 = (semanage_node_key_t *) 0 ; + semanage_node_t **arg3 = (semanage_node_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_node_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_query_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_key_t const *","semanage_node_query_local", 2, argv[1] )); + } + arg2 = (semanage_node_key_t *)(argp2); + result = (int)semanage_node_query_local(arg1,(struct semanage_node_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_node, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_exists_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_key_t *arg2 = (semanage_node_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_exists_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_key_t const *","semanage_node_exists_local", 2, argv[1] )); + } + arg2 = (semanage_node_key_t *)(argp2); + result = (int)semanage_node_exists_local(arg1,(struct semanage_node_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_count_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_count_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_node_count_local(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_iterate_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_node_t const *,void *) = (int (*)(semanage_node_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_iterate_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_node_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_node_t const *,void *)","semanage_node_iterate_local", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_node_iterate_local", 3, argv[2] )); + } + result = (int)semanage_node_iterate_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_list_local(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t ***arg2 = (semanage_node_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_node_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_list_local", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_node_list_local(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_query(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_key_t *arg2 = (semanage_node_key_t *) 0 ; + semanage_node_t **arg3 = (semanage_node_t **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + semanage_node_t *temp3 = NULL ; + int result; + VALUE vresult = Qnil; + + { + arg3 = &temp3; + } + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_query", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_key_t const *","semanage_node_query", 2, argv[1] )); + } + arg2 = (semanage_node_key_t *)(argp2); + result = (int)semanage_node_query(arg1,(struct semanage_node_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj(*arg3, SWIGTYPE_p_semanage_node, 0)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_exists(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_key_t *arg2 = (semanage_node_key_t *) 0 ; + int *arg3 = (int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg3 = &temp3; + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_exists", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_semanage_node_key, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "semanage_node_key_t const *","semanage_node_exists", 2, argv[1] )); + } + arg2 = (semanage_node_key_t *)(argp2); + result = (int)semanage_node_exists(arg1,(struct semanage_node_key const *)arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_count(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + unsigned int *arg2 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int temp2 ; + int res2 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + arg2 = &temp2; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_count", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_node_count(arg1,arg2); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res2)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg2))); + } else { + int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_iterate(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + int (*arg2)(semanage_node_t const *,void *) = (int (*)(semanage_node_t const *,void *)) 0 ; + void *arg3 = (void *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res3 ; + int result; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_iterate", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[1], (void**)(&arg2), SWIGTYPE_p_f_p_q_const__struct_semanage_node_p_void__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), Ruby_Format_TypeError( "", "int (*)(semanage_node_t const *,void *)","semanage_node_iterate", 2, argv[1] )); + } + } + res3 = SWIG_ConvertPtr(argv[2],SWIG_as_voidptrptr(&arg3), 0, 0); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "void *","semanage_node_iterate", 3, argv[2] )); + } + result = (int)semanage_node_iterate(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; +} + + +SWIGINTERN VALUE +_wrap_semanage_node_list(int argc, VALUE *argv, VALUE self) { + semanage_handle_t *arg1 = (semanage_handle_t *) 0 ; + semanage_node_t ***arg2 = (semanage_node_t ***) 0 ; + unsigned int *arg3 = (unsigned int *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + semanage_node_t **temp2 = NULL ; + unsigned int temp3 ; + int res3 = SWIG_TMPOBJ ; + int result; + VALUE vresult = Qnil; + + { + arg2 = &temp2; + } + arg3 = &temp3; + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_semanage_handle, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "semanage_handle_t *","semanage_node_list", 1, argv[0] )); + } + arg1 = (semanage_handle_t *)(argp1); + result = (int)semanage_node_list(arg1,arg2,arg3); + vresult = SWIG_From_int((int)(result)); + if (SWIG_IsTmpObj(res3)) { + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_From_int((*arg3))); + } else { + int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ; + vresult = SWIG_Ruby_AppendOutput(vresult, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_unsigned_int, new_flags)); + } + return vresult; +fail: + return Qnil; +} + + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ + +static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__struct_semanage_bool_p_void__int = {"_p_f_p_q_const__struct_semanage_bool_p_void__int", "int (*)(struct semanage_bool const *,void *)|int (*)(semanage_bool_t const *,void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__struct_semanage_fcontext_p_void__int = {"_p_f_p_q_const__struct_semanage_fcontext_p_void__int", "int (*)(struct semanage_fcontext const *,void *)|int (*)(semanage_fcontext_t const *,void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__struct_semanage_iface_p_void__int = {"_p_f_p_q_const__struct_semanage_iface_p_void__int", "int (*)(struct semanage_iface const *,void *)|int (*)(semanage_iface_t const *,void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__struct_semanage_node_p_void__int = {"_p_f_p_q_const__struct_semanage_node_p_void__int", "int (*)(struct semanage_node const *,void *)|int (*)(semanage_node_t const *,void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__struct_semanage_port_p_void__int = {"_p_f_p_q_const__struct_semanage_port_p_void__int", "int (*)(struct semanage_port const *,void *)|int (*)(semanage_port_t const *,void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__struct_semanage_seuser_p_void__int = {"_p_f_p_q_const__struct_semanage_seuser_p_void__int", "int (*)(struct semanage_seuser const *,void *)|int (*)(semanage_seuser_t const *,void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_q_const__struct_semanage_user_p_void__int = {"_p_f_p_q_const__struct_semanage_user_p_void__int", "int (*)(struct semanage_user const *,void *)|int (*)(semanage_user_t const *,void *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void = {"_p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void", "void (*)(void *,semanage_handle_t *,char const *,...)|void (*)(void *,struct semanage_handle *,char const *,...)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_char = {"_p_p_p_char", "char ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_semanage_bool = {"_p_p_p_semanage_bool", "struct semanage_bool ***|semanage_bool_t ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_semanage_fcontext = {"_p_p_p_semanage_fcontext", "struct semanage_fcontext ***|semanage_fcontext_t ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_semanage_iface = {"_p_p_p_semanage_iface", "struct semanage_iface ***|semanage_iface_t ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_semanage_node = {"_p_p_p_semanage_node", "struct semanage_node ***|semanage_node_t ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_semanage_port = {"_p_p_p_semanage_port", "struct semanage_port ***|semanage_port_t ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_semanage_seuser = {"_p_p_p_semanage_seuser", "struct semanage_seuser ***|semanage_seuser_t ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_p_semanage_user = {"_p_p_p_semanage_user", "struct semanage_user ***|semanage_user_t ***", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_bool = {"_p_p_semanage_bool", "struct semanage_bool **|semanage_bool_t **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_bool_key = {"_p_p_semanage_bool_key", "semanage_bool_key_t **|struct semanage_bool_key **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_context = {"_p_p_semanage_context", "struct semanage_context **|semanage_context_t **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_fcontext = {"_p_p_semanage_fcontext", "struct semanage_fcontext **|semanage_fcontext_t **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_fcontext_key = {"_p_p_semanage_fcontext_key", "semanage_fcontext_key_t **|struct semanage_fcontext_key **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_iface = {"_p_p_semanage_iface", "semanage_iface_t **|struct semanage_iface **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_iface_key = {"_p_p_semanage_iface_key", "semanage_iface_key_t **|struct semanage_iface_key **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_module_info = {"_p_p_semanage_module_info", "struct semanage_module_info **|semanage_module_info_t **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_node = {"_p_p_semanage_node", "struct semanage_node **|semanage_node_t **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_node_key = {"_p_p_semanage_node_key", "semanage_node_key_t **|struct semanage_node_key **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_port = {"_p_p_semanage_port", "struct semanage_port **|semanage_port_t **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_port_key = {"_p_p_semanage_port_key", "semanage_port_key_t **|struct semanage_port_key **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_seuser = {"_p_p_semanage_seuser", "semanage_seuser_t **|struct semanage_seuser **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_seuser_key = {"_p_p_semanage_seuser_key", "semanage_seuser_key_t **|struct semanage_seuser_key **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_user = {"_p_p_semanage_user", "semanage_user_t **|struct semanage_user **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_semanage_user_key = {"_p_p_semanage_user_key", "semanage_user_key_t **|struct semanage_user_key **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_bool = {"_p_semanage_bool", "struct semanage_bool *|semanage_bool_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_bool_key = {"_p_semanage_bool_key", "struct semanage_bool_key *|semanage_bool_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_context = {"_p_semanage_context", "struct semanage_context *|semanage_context_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_fcontext = {"_p_semanage_fcontext", "struct semanage_fcontext *|semanage_fcontext_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_fcontext_key = {"_p_semanage_fcontext_key", "struct semanage_fcontext_key *|semanage_fcontext_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_handle = {"_p_semanage_handle", "semanage_handle_t *|struct semanage_handle *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_iface = {"_p_semanage_iface", "struct semanage_iface *|semanage_iface_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_iface_key = {"_p_semanage_iface_key", "struct semanage_iface_key *|semanage_iface_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_module_info = {"_p_semanage_module_info", "struct semanage_module_info *|semanage_module_info_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_node = {"_p_semanage_node", "struct semanage_node *|semanage_node_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_node_key = {"_p_semanage_node_key", "struct semanage_node_key *|semanage_node_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_port = {"_p_semanage_port", "semanage_port_t *|struct semanage_port *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_port_key = {"_p_semanage_port_key", "struct semanage_port_key *|semanage_port_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_seuser = {"_p_semanage_seuser", "struct semanage_seuser *|semanage_seuser_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_seuser_key = {"_p_semanage_seuser_key", "struct semanage_seuser_key *|semanage_seuser_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_user = {"_p_semanage_user", "struct semanage_user *|semanage_user_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_semanage_user_key = {"_p_semanage_user_key", "struct semanage_user_key *|semanage_user_key_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *", 0, 0, (void*)0, 0}; + +static swig_type_info *swig_type_initial[] = { + &_swigt__p_char, + &_swigt__p_f_p_q_const__struct_semanage_bool_p_void__int, + &_swigt__p_f_p_q_const__struct_semanage_fcontext_p_void__int, + &_swigt__p_f_p_q_const__struct_semanage_iface_p_void__int, + &_swigt__p_f_p_q_const__struct_semanage_node_p_void__int, + &_swigt__p_f_p_q_const__struct_semanage_port_p_void__int, + &_swigt__p_f_p_q_const__struct_semanage_seuser_p_void__int, + &_swigt__p_f_p_q_const__struct_semanage_user_p_void__int, + &_swigt__p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void, + &_swigt__p_int, + &_swigt__p_p_char, + &_swigt__p_p_p_char, + &_swigt__p_p_p_semanage_bool, + &_swigt__p_p_p_semanage_fcontext, + &_swigt__p_p_p_semanage_iface, + &_swigt__p_p_p_semanage_node, + &_swigt__p_p_p_semanage_port, + &_swigt__p_p_p_semanage_seuser, + &_swigt__p_p_p_semanage_user, + &_swigt__p_p_semanage_bool, + &_swigt__p_p_semanage_bool_key, + &_swigt__p_p_semanage_context, + &_swigt__p_p_semanage_fcontext, + &_swigt__p_p_semanage_fcontext_key, + &_swigt__p_p_semanage_iface, + &_swigt__p_p_semanage_iface_key, + &_swigt__p_p_semanage_module_info, + &_swigt__p_p_semanage_node, + &_swigt__p_p_semanage_node_key, + &_swigt__p_p_semanage_port, + &_swigt__p_p_semanage_port_key, + &_swigt__p_p_semanage_seuser, + &_swigt__p_p_semanage_seuser_key, + &_swigt__p_p_semanage_user, + &_swigt__p_p_semanage_user_key, + &_swigt__p_semanage_bool, + &_swigt__p_semanage_bool_key, + &_swigt__p_semanage_context, + &_swigt__p_semanage_fcontext, + &_swigt__p_semanage_fcontext_key, + &_swigt__p_semanage_handle, + &_swigt__p_semanage_iface, + &_swigt__p_semanage_iface_key, + &_swigt__p_semanage_module_info, + &_swigt__p_semanage_node, + &_swigt__p_semanage_node_key, + &_swigt__p_semanage_port, + &_swigt__p_semanage_port_key, + &_swigt__p_semanage_seuser, + &_swigt__p_semanage_seuser_key, + &_swigt__p_semanage_user, + &_swigt__p_semanage_user_key, + &_swigt__p_size_t, + &_swigt__p_unsigned_int, +}; + +static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_q_const__struct_semanage_bool_p_void__int[] = { {&_swigt__p_f_p_q_const__struct_semanage_bool_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_q_const__struct_semanage_fcontext_p_void__int[] = { {&_swigt__p_f_p_q_const__struct_semanage_fcontext_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_q_const__struct_semanage_iface_p_void__int[] = { {&_swigt__p_f_p_q_const__struct_semanage_iface_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_q_const__struct_semanage_node_p_void__int[] = { {&_swigt__p_f_p_q_const__struct_semanage_node_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_q_const__struct_semanage_port_p_void__int[] = { {&_swigt__p_f_p_q_const__struct_semanage_port_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_q_const__struct_semanage_seuser_p_void__int[] = { {&_swigt__p_f_p_q_const__struct_semanage_seuser_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_q_const__struct_semanage_user_p_void__int[] = { {&_swigt__p_f_p_q_const__struct_semanage_user_p_void__int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void[] = { {&_swigt__p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_char[] = { {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_semanage_bool[] = { {&_swigt__p_p_p_semanage_bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_semanage_fcontext[] = { {&_swigt__p_p_p_semanage_fcontext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_semanage_iface[] = { {&_swigt__p_p_p_semanage_iface, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_semanage_node[] = { {&_swigt__p_p_p_semanage_node, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_semanage_port[] = { {&_swigt__p_p_p_semanage_port, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_semanage_seuser[] = { {&_swigt__p_p_p_semanage_seuser, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_p_semanage_user[] = { {&_swigt__p_p_p_semanage_user, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_bool[] = { {&_swigt__p_p_semanage_bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_bool_key[] = { {&_swigt__p_p_semanage_bool_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_context[] = { {&_swigt__p_p_semanage_context, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_fcontext[] = { {&_swigt__p_p_semanage_fcontext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_fcontext_key[] = { {&_swigt__p_p_semanage_fcontext_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_iface[] = { {&_swigt__p_p_semanage_iface, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_iface_key[] = { {&_swigt__p_p_semanage_iface_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_module_info[] = { {&_swigt__p_p_semanage_module_info, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_node[] = { {&_swigt__p_p_semanage_node, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_node_key[] = { {&_swigt__p_p_semanage_node_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_port[] = { {&_swigt__p_p_semanage_port, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_port_key[] = { {&_swigt__p_p_semanage_port_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_seuser[] = { {&_swigt__p_p_semanage_seuser, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_seuser_key[] = { {&_swigt__p_p_semanage_seuser_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_user[] = { {&_swigt__p_p_semanage_user, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_p_semanage_user_key[] = { {&_swigt__p_p_semanage_user_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_bool[] = { {&_swigt__p_semanage_bool, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_bool_key[] = { {&_swigt__p_semanage_bool_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_context[] = { {&_swigt__p_semanage_context, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_fcontext[] = { {&_swigt__p_semanage_fcontext, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_fcontext_key[] = { {&_swigt__p_semanage_fcontext_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_handle[] = { {&_swigt__p_semanage_handle, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_iface[] = { {&_swigt__p_semanage_iface, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_iface_key[] = { {&_swigt__p_semanage_iface_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_module_info[] = { {&_swigt__p_semanage_module_info, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_node[] = { {&_swigt__p_semanage_node, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_node_key[] = { {&_swigt__p_semanage_node_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_port[] = { {&_swigt__p_semanage_port, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_port_key[] = { {&_swigt__p_semanage_port_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_seuser[] = { {&_swigt__p_semanage_seuser, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_seuser_key[] = { {&_swigt__p_semanage_seuser_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_user[] = { {&_swigt__p_semanage_user, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_semanage_user_key[] = { {&_swigt__p_semanage_user_key, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; + +static swig_cast_info *swig_cast_initial[] = { + _swigc__p_char, + _swigc__p_f_p_q_const__struct_semanage_bool_p_void__int, + _swigc__p_f_p_q_const__struct_semanage_fcontext_p_void__int, + _swigc__p_f_p_q_const__struct_semanage_iface_p_void__int, + _swigc__p_f_p_q_const__struct_semanage_node_p_void__int, + _swigc__p_f_p_q_const__struct_semanage_port_p_void__int, + _swigc__p_f_p_q_const__struct_semanage_seuser_p_void__int, + _swigc__p_f_p_q_const__struct_semanage_user_p_void__int, + _swigc__p_f_p_void_p_struct_semanage_handle_p_q_const__char_v_______void, + _swigc__p_int, + _swigc__p_p_char, + _swigc__p_p_p_char, + _swigc__p_p_p_semanage_bool, + _swigc__p_p_p_semanage_fcontext, + _swigc__p_p_p_semanage_iface, + _swigc__p_p_p_semanage_node, + _swigc__p_p_p_semanage_port, + _swigc__p_p_p_semanage_seuser, + _swigc__p_p_p_semanage_user, + _swigc__p_p_semanage_bool, + _swigc__p_p_semanage_bool_key, + _swigc__p_p_semanage_context, + _swigc__p_p_semanage_fcontext, + _swigc__p_p_semanage_fcontext_key, + _swigc__p_p_semanage_iface, + _swigc__p_p_semanage_iface_key, + _swigc__p_p_semanage_module_info, + _swigc__p_p_semanage_node, + _swigc__p_p_semanage_node_key, + _swigc__p_p_semanage_port, + _swigc__p_p_semanage_port_key, + _swigc__p_p_semanage_seuser, + _swigc__p_p_semanage_seuser_key, + _swigc__p_p_semanage_user, + _swigc__p_p_semanage_user_key, + _swigc__p_semanage_bool, + _swigc__p_semanage_bool_key, + _swigc__p_semanage_context, + _swigc__p_semanage_fcontext, + _swigc__p_semanage_fcontext_key, + _swigc__p_semanage_handle, + _swigc__p_semanage_iface, + _swigc__p_semanage_iface_key, + _swigc__p_semanage_module_info, + _swigc__p_semanage_node, + _swigc__p_semanage_node_key, + _swigc__p_semanage_port, + _swigc__p_semanage_port_key, + _swigc__p_semanage_seuser, + _swigc__p_semanage_seuser_key, + _swigc__p_semanage_user, + _swigc__p_semanage_user_key, + _swigc__p_size_t, + _swigc__p_unsigned_int, +}; + + +/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */ + +/* ----------------------------------------------------------------------------- + * Type initialization: + * This problem is tough by the requirement that no dynamic + * memory is used. Also, since swig_type_info structures store pointers to + * swig_cast_info structures and swig_cast_info structures store pointers back + * to swig_type_info structures, we need some lookup code at initialization. + * The idea is that swig generates all the structures that are needed. + * The runtime then collects these partially filled structures. + * The SWIG_InitializeModule function takes these initial arrays out of + * swig_module, and does all the lookup, filling in the swig_module.types + * array with the correct data and linking the correct swig_cast_info + * structures together. + * + * The generated swig_type_info structures are assigned staticly to an initial + * array. We just loop through that array, and handle each type individually. + * First we lookup if this type has been already loaded, and if so, use the + * loaded structure instead of the generated one. Then we have to fill in the + * cast linked list. The cast data is initially stored in something like a + * two-dimensional array. Each row corresponds to a type (there are the same + * number of rows as there are in the swig_type_initial array). Each entry in + * a column is one of the swig_cast_info structures for that type. + * The cast_initial array is actually an array of arrays, because each row has + * a variable number of columns. So to actually build the cast linked list, + * we find the array of casts associated with the type, and loop through it + * adding the casts to the list. The one last trick we need to do is making + * sure the type pointer in the swig_cast_info struct is correct. + * + * First off, we lookup the cast->type name to see if it is already loaded. + * There are three cases to handle: + * 1) If the cast->type has already been loaded AND the type we are adding + * casting info to has not been loaded (it is in this module), THEN we + * replace the cast->type pointer with the type pointer that has already + * been loaded. + * 2) If BOTH types (the one we are adding casting info to, and the + * cast->type) are loaded, THEN the cast info has already been loaded by + * the previous module so we just ignore it. + * 3) Finally, if cast->type has not already been loaded, then we add that + * swig_cast_info to the linked list (because the cast->type) pointer will + * be correct. + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#if 0 +} /* c-mode */ +#endif +#endif + +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + + +SWIGRUNTIME void +SWIG_InitializeModule(void *clientdata) { + size_t i; + swig_module_info *module_head, *iter; + int found, init; + + clientdata = clientdata; + + /* check to see if the circular list has been setup, if not, set it up */ + if (swig_module.next==0) { + /* Initialize the swig_module */ + 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 */ + module_head = SWIG_GetModule(clientdata); + if (!module_head) { + /* This is the first module loaded for this interpreter */ + /* so set the swig module into the interpreter */ + SWIG_SetModule(clientdata, &swig_module); + module_head = &swig_module; + } else { + /* the interpreter has loaded a SWIG module, but has it loaded this one? */ + found=0; + iter=module_head; + do { + if (iter==&swig_module) { + found=1; + break; + } + iter=iter->next; + } while (iter!= module_head); + + /* if the is found in the list, then all is done and we may leave */ + if (found) return; + /* otherwise we must add out module into the list */ + swig_module.next = module_head->next; + 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); +#endif + for (i = 0; i < swig_module.size; ++i) { + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif + + /* if there is another module already loaded */ + if (swig_module.next != &swig_module) { + type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); + } + if (type) { + /* Overwrite clientdata field */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } + } else { + type = swig_module.type_initial[i]; + } + + /* Insert casting types */ + cast = swig_module.cast_initial[i]; + while (cast->type) { + + /* Don't need to add information already in the list */ + ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif + if (swig_module.next != &swig_module) { + ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif + } + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } + } + + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif + if (type->cast) { + type->cast->prev = cast; + cast->next = type->cast; + } + type->cast = cast; + } + cast++; + } + /* Set entry in modules->types array equal to the type */ + swig_module.types[i] = type; + } + swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif +} + +/* This function will propagate the clientdata field of type to +* any new swig_type_info structures that have been added into the list +* of equivalent types. It is like calling +* SWIG_TypeClientData(type, clientdata) a second time. +*/ +SWIGRUNTIME void +SWIG_PropagateClientData(void) { + size_t i; + swig_cast_info *equiv; + static int init_run = 0; + + if (init_run) return; + init_run = 1; + + for (i = 0; i < swig_module.size; i++) { + if (swig_module.types[i]->clientdata) { + equiv = swig_module.types[i]->cast; + while (equiv) { + if (!equiv->converter) { + if (equiv->type && !equiv->type->clientdata) + SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata); + } + equiv = equiv->next; + } + } + } +} + +#ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif +} +#endif + +/* + +*/ +#ifdef __cplusplus +extern "C" +#endif +SWIGEXPORT void Init_semanage(void) { + size_t i; + + SWIG_InitRuntime(); + mSemanage = rb_define_module("Semanage"); + + SWIG_InitializeModule(0); + for (i = 0; i < swig_module.size; i++) { + SWIG_define_class(swig_module.types[i]); + } + + SWIG_RubyInitializeTrackings(); + rb_define_const(mSemanage, "SEMANAGE_MSG_ERR", SWIG_From_int((int)(1))); + rb_define_const(mSemanage, "SEMANAGE_MSG_WARN", SWIG_From_int((int)(2))); + rb_define_const(mSemanage, "SEMANAGE_MSG_INFO", SWIG_From_int((int)(3))); + rb_define_module_function(mSemanage, "semanage_msg_get_level", _wrap_semanage_msg_get_level, -1); + rb_define_module_function(mSemanage, "semanage_msg_get_channel", _wrap_semanage_msg_get_channel, -1); + rb_define_module_function(mSemanage, "semanage_msg_get_fname", _wrap_semanage_msg_get_fname, -1); + rb_define_module_function(mSemanage, "semanage_msg_set_callback", _wrap_semanage_msg_set_callback, -1); + rb_define_module_function(mSemanage, "semanage_handle_create", _wrap_semanage_handle_create, -1); + rb_define_module_function(mSemanage, "semanage_handle_destroy", _wrap_semanage_handle_destroy, -1); + rb_define_const(mSemanage, "SEMANAGE_CON_INVALID", SWIG_From_int((int)(SEMANAGE_CON_INVALID))); + rb_define_const(mSemanage, "SEMANAGE_CON_DIRECT", SWIG_From_int((int)(SEMANAGE_CON_DIRECT))); + rb_define_const(mSemanage, "SEMANAGE_CON_POLSERV_LOCAL", SWIG_From_int((int)(SEMANAGE_CON_POLSERV_LOCAL))); + rb_define_const(mSemanage, "SEMANAGE_CON_POLSERV_REMOTE", SWIG_From_int((int)(SEMANAGE_CON_POLSERV_REMOTE))); + rb_define_module_function(mSemanage, "semanage_select_store", _wrap_semanage_select_store, -1); + rb_define_module_function(mSemanage, "semanage_reload_policy", _wrap_semanage_reload_policy, -1); + rb_define_module_function(mSemanage, "semanage_set_reload", _wrap_semanage_set_reload, -1); + rb_define_module_function(mSemanage, "semanage_set_rebuild", _wrap_semanage_set_rebuild, -1); + rb_define_module_function(mSemanage, "semanage_set_create_store", _wrap_semanage_set_create_store, -1); + rb_define_module_function(mSemanage, "semanage_get_disable_dontaudit", _wrap_semanage_get_disable_dontaudit, -1); + rb_define_module_function(mSemanage, "semanage_set_disable_dontaudit", _wrap_semanage_set_disable_dontaudit, -1); + rb_define_module_function(mSemanage, "semanage_is_managed", _wrap_semanage_is_managed, -1); + rb_define_module_function(mSemanage, "semanage_connect", _wrap_semanage_connect, -1); + rb_define_module_function(mSemanage, "semanage_disconnect", _wrap_semanage_disconnect, -1); + rb_define_module_function(mSemanage, "semanage_begin_transaction", _wrap_semanage_begin_transaction, -1); + rb_define_module_function(mSemanage, "semanage_commit", _wrap_semanage_commit, -1); + rb_define_const(mSemanage, "SEMANAGE_CAN_READ", SWIG_From_int((int)(1))); + rb_define_const(mSemanage, "SEMANAGE_CAN_WRITE", SWIG_From_int((int)(2))); + rb_define_module_function(mSemanage, "semanage_access_check", _wrap_semanage_access_check, -1); + rb_define_module_function(mSemanage, "semanage_is_connected", _wrap_semanage_is_connected, -1); + rb_define_module_function(mSemanage, "semanage_mls_enabled", _wrap_semanage_mls_enabled, -1); + rb_define_module_function(mSemanage, "semanage_module_install", _wrap_semanage_module_install, -1); + rb_define_module_function(mSemanage, "semanage_module_install_file", _wrap_semanage_module_install_file, -1); + rb_define_module_function(mSemanage, "semanage_module_upgrade", _wrap_semanage_module_upgrade, -1); + rb_define_module_function(mSemanage, "semanage_module_upgrade_file", _wrap_semanage_module_upgrade_file, -1); + rb_define_module_function(mSemanage, "semanage_module_install_base", _wrap_semanage_module_install_base, -1); + rb_define_module_function(mSemanage, "semanage_module_install_base_file", _wrap_semanage_module_install_base_file, -1); + rb_define_module_function(mSemanage, "semanage_module_remove", _wrap_semanage_module_remove, -1); + rb_define_module_function(mSemanage, "semanage_module_list", _wrap_semanage_module_list, -1); + rb_define_module_function(mSemanage, "semanage_module_info_datum_destroy", _wrap_semanage_module_info_datum_destroy, -1); + rb_define_module_function(mSemanage, "semanage_module_list_nth", _wrap_semanage_module_list_nth, -1); + rb_define_module_function(mSemanage, "semanage_module_get_name", _wrap_semanage_module_get_name, -1); + rb_define_module_function(mSemanage, "semanage_module_get_version", _wrap_semanage_module_get_version, -1); + rb_define_module_function(mSemanage, "semanage_context_get_user", _wrap_semanage_context_get_user, -1); + rb_define_module_function(mSemanage, "semanage_context_set_user", _wrap_semanage_context_set_user, -1); + rb_define_module_function(mSemanage, "semanage_context_get_role", _wrap_semanage_context_get_role, -1); + rb_define_module_function(mSemanage, "semanage_context_set_role", _wrap_semanage_context_set_role, -1); + rb_define_module_function(mSemanage, "semanage_context_get_type", _wrap_semanage_context_get_type, -1); + rb_define_module_function(mSemanage, "semanage_context_set_type", _wrap_semanage_context_set_type, -1); + rb_define_module_function(mSemanage, "semanage_context_get_mls", _wrap_semanage_context_get_mls, -1); + rb_define_module_function(mSemanage, "semanage_context_set_mls", _wrap_semanage_context_set_mls, -1); + rb_define_module_function(mSemanage, "semanage_context_create", _wrap_semanage_context_create, -1); + rb_define_module_function(mSemanage, "semanage_context_clone", _wrap_semanage_context_clone, -1); + rb_define_module_function(mSemanage, "semanage_context_free", _wrap_semanage_context_free, -1); + rb_define_module_function(mSemanage, "semanage_context_from_string", _wrap_semanage_context_from_string, -1); + rb_define_module_function(mSemanage, "semanage_context_to_string", _wrap_semanage_context_to_string, -1); + rb_define_module_function(mSemanage, "semanage_bool_key_create", _wrap_semanage_bool_key_create, -1); + rb_define_module_function(mSemanage, "semanage_bool_key_extract", _wrap_semanage_bool_key_extract, -1); + rb_define_module_function(mSemanage, "semanage_bool_key_free", _wrap_semanage_bool_key_free, -1); + rb_define_module_function(mSemanage, "semanage_bool_compare", _wrap_semanage_bool_compare, -1); + rb_define_module_function(mSemanage, "semanage_bool_compare2", _wrap_semanage_bool_compare2, -1); + rb_define_module_function(mSemanage, "semanage_bool_get_name", _wrap_semanage_bool_get_name, -1); + rb_define_module_function(mSemanage, "semanage_bool_set_name", _wrap_semanage_bool_set_name, -1); + rb_define_module_function(mSemanage, "semanage_bool_get_value", _wrap_semanage_bool_get_value, -1); + rb_define_module_function(mSemanage, "semanage_bool_set_value", _wrap_semanage_bool_set_value, -1); + rb_define_module_function(mSemanage, "semanage_bool_create", _wrap_semanage_bool_create, -1); + rb_define_module_function(mSemanage, "semanage_bool_clone", _wrap_semanage_bool_clone, -1); + rb_define_module_function(mSemanage, "semanage_bool_free", _wrap_semanage_bool_free, -1); + rb_define_module_function(mSemanage, "semanage_bool_query", _wrap_semanage_bool_query, -1); + rb_define_module_function(mSemanage, "semanage_bool_exists", _wrap_semanage_bool_exists, -1); + rb_define_module_function(mSemanage, "semanage_bool_count", _wrap_semanage_bool_count, -1); + rb_define_module_function(mSemanage, "semanage_bool_iterate", _wrap_semanage_bool_iterate, -1); + rb_define_module_function(mSemanage, "semanage_bool_list", _wrap_semanage_bool_list, -1); + rb_define_module_function(mSemanage, "semanage_bool_modify_local", _wrap_semanage_bool_modify_local, -1); + rb_define_module_function(mSemanage, "semanage_bool_del_local", _wrap_semanage_bool_del_local, -1); + rb_define_module_function(mSemanage, "semanage_bool_query_local", _wrap_semanage_bool_query_local, -1); + rb_define_module_function(mSemanage, "semanage_bool_exists_local", _wrap_semanage_bool_exists_local, -1); + rb_define_module_function(mSemanage, "semanage_bool_count_local", _wrap_semanage_bool_count_local, -1); + rb_define_module_function(mSemanage, "semanage_bool_iterate_local", _wrap_semanage_bool_iterate_local, -1); + rb_define_module_function(mSemanage, "semanage_bool_list_local", _wrap_semanage_bool_list_local, -1); + rb_define_module_function(mSemanage, "semanage_bool_set_active", _wrap_semanage_bool_set_active, -1); + rb_define_module_function(mSemanage, "semanage_bool_query_active", _wrap_semanage_bool_query_active, -1); + rb_define_module_function(mSemanage, "semanage_bool_exists_active", _wrap_semanage_bool_exists_active, -1); + rb_define_module_function(mSemanage, "semanage_bool_count_active", _wrap_semanage_bool_count_active, -1); + rb_define_module_function(mSemanage, "semanage_bool_iterate_active", _wrap_semanage_bool_iterate_active, -1); + rb_define_module_function(mSemanage, "semanage_bool_list_active", _wrap_semanage_bool_list_active, -1); + rb_define_module_function(mSemanage, "semanage_iface_compare", _wrap_semanage_iface_compare, -1); + rb_define_module_function(mSemanage, "semanage_iface_compare2", _wrap_semanage_iface_compare2, -1); + rb_define_module_function(mSemanage, "semanage_iface_key_create", _wrap_semanage_iface_key_create, -1); + rb_define_module_function(mSemanage, "semanage_iface_key_extract", _wrap_semanage_iface_key_extract, -1); + rb_define_module_function(mSemanage, "semanage_iface_key_free", _wrap_semanage_iface_key_free, -1); + rb_define_module_function(mSemanage, "semanage_iface_get_name", _wrap_semanage_iface_get_name, -1); + rb_define_module_function(mSemanage, "semanage_iface_set_name", _wrap_semanage_iface_set_name, -1); + rb_define_module_function(mSemanage, "semanage_iface_get_ifcon", _wrap_semanage_iface_get_ifcon, -1); + rb_define_module_function(mSemanage, "semanage_iface_set_ifcon", _wrap_semanage_iface_set_ifcon, -1); + rb_define_module_function(mSemanage, "semanage_iface_get_msgcon", _wrap_semanage_iface_get_msgcon, -1); + rb_define_module_function(mSemanage, "semanage_iface_set_msgcon", _wrap_semanage_iface_set_msgcon, -1); + rb_define_module_function(mSemanage, "semanage_iface_create", _wrap_semanage_iface_create, -1); + rb_define_module_function(mSemanage, "semanage_iface_clone", _wrap_semanage_iface_clone, -1); + rb_define_module_function(mSemanage, "semanage_iface_free", _wrap_semanage_iface_free, -1); + rb_define_module_function(mSemanage, "semanage_iface_modify_local", _wrap_semanage_iface_modify_local, -1); + rb_define_module_function(mSemanage, "semanage_iface_del_local", _wrap_semanage_iface_del_local, -1); + rb_define_module_function(mSemanage, "semanage_iface_query_local", _wrap_semanage_iface_query_local, -1); + rb_define_module_function(mSemanage, "semanage_iface_exists_local", _wrap_semanage_iface_exists_local, -1); + rb_define_module_function(mSemanage, "semanage_iface_count_local", _wrap_semanage_iface_count_local, -1); + rb_define_module_function(mSemanage, "semanage_iface_iterate_local", _wrap_semanage_iface_iterate_local, -1); + rb_define_module_function(mSemanage, "semanage_iface_list_local", _wrap_semanage_iface_list_local, -1); + rb_define_module_function(mSemanage, "semanage_iface_query", _wrap_semanage_iface_query, -1); + rb_define_module_function(mSemanage, "semanage_iface_exists", _wrap_semanage_iface_exists, -1); + rb_define_module_function(mSemanage, "semanage_iface_count", _wrap_semanage_iface_count, -1); + rb_define_module_function(mSemanage, "semanage_iface_iterate", _wrap_semanage_iface_iterate, -1); + rb_define_module_function(mSemanage, "semanage_iface_list", _wrap_semanage_iface_list, -1); + rb_define_module_function(mSemanage, "semanage_user_key_create", _wrap_semanage_user_key_create, -1); + rb_define_module_function(mSemanage, "semanage_user_key_extract", _wrap_semanage_user_key_extract, -1); + rb_define_module_function(mSemanage, "semanage_user_key_free", _wrap_semanage_user_key_free, -1); + rb_define_module_function(mSemanage, "semanage_user_compare", _wrap_semanage_user_compare, -1); + rb_define_module_function(mSemanage, "semanage_user_compare2", _wrap_semanage_user_compare2, -1); + rb_define_module_function(mSemanage, "semanage_user_get_name", _wrap_semanage_user_get_name, -1); + rb_define_module_function(mSemanage, "semanage_user_set_name", _wrap_semanage_user_set_name, -1); + rb_define_module_function(mSemanage, "semanage_user_get_prefix", _wrap_semanage_user_get_prefix, -1); + rb_define_module_function(mSemanage, "semanage_user_set_prefix", _wrap_semanage_user_set_prefix, -1); + rb_define_module_function(mSemanage, "semanage_user_get_mlslevel", _wrap_semanage_user_get_mlslevel, -1); + rb_define_module_function(mSemanage, "semanage_user_set_mlslevel", _wrap_semanage_user_set_mlslevel, -1); + rb_define_module_function(mSemanage, "semanage_user_get_mlsrange", _wrap_semanage_user_get_mlsrange, -1); + rb_define_module_function(mSemanage, "semanage_user_set_mlsrange", _wrap_semanage_user_set_mlsrange, -1); + rb_define_module_function(mSemanage, "semanage_user_get_num_roles", _wrap_semanage_user_get_num_roles, -1); + rb_define_module_function(mSemanage, "semanage_user_add_role", _wrap_semanage_user_add_role, -1); + rb_define_module_function(mSemanage, "semanage_user_del_role", _wrap_semanage_user_del_role, -1); + rb_define_module_function(mSemanage, "semanage_user_has_role", _wrap_semanage_user_has_role, -1); + rb_define_module_function(mSemanage, "semanage_user_get_roles", _wrap_semanage_user_get_roles, -1); + rb_define_module_function(mSemanage, "semanage_user_set_roles", _wrap_semanage_user_set_roles, -1); + rb_define_module_function(mSemanage, "semanage_user_create", _wrap_semanage_user_create, -1); + rb_define_module_function(mSemanage, "semanage_user_clone", _wrap_semanage_user_clone, -1); + rb_define_module_function(mSemanage, "semanage_user_free", _wrap_semanage_user_free, -1); + rb_define_module_function(mSemanage, "semanage_user_modify_local", _wrap_semanage_user_modify_local, -1); + rb_define_module_function(mSemanage, "semanage_user_del_local", _wrap_semanage_user_del_local, -1); + rb_define_module_function(mSemanage, "semanage_user_query_local", _wrap_semanage_user_query_local, -1); + rb_define_module_function(mSemanage, "semanage_user_exists_local", _wrap_semanage_user_exists_local, -1); + rb_define_module_function(mSemanage, "semanage_user_count_local", _wrap_semanage_user_count_local, -1); + rb_define_module_function(mSemanage, "semanage_user_iterate_local", _wrap_semanage_user_iterate_local, -1); + rb_define_module_function(mSemanage, "semanage_user_list_local", _wrap_semanage_user_list_local, -1); + rb_define_module_function(mSemanage, "semanage_user_query", _wrap_semanage_user_query, -1); + rb_define_module_function(mSemanage, "semanage_user_exists", _wrap_semanage_user_exists, -1); + rb_define_module_function(mSemanage, "semanage_user_count", _wrap_semanage_user_count, -1); + rb_define_module_function(mSemanage, "semanage_user_iterate", _wrap_semanage_user_iterate, -1); + rb_define_module_function(mSemanage, "semanage_user_list", _wrap_semanage_user_list, -1); + rb_define_const(mSemanage, "SEMANAGE_PROTO_UDP", SWIG_From_int((int)(0))); + rb_define_const(mSemanage, "SEMANAGE_PROTO_TCP", SWIG_From_int((int)(1))); + rb_define_module_function(mSemanage, "semanage_port_compare", _wrap_semanage_port_compare, -1); + rb_define_module_function(mSemanage, "semanage_port_compare2", _wrap_semanage_port_compare2, -1); + rb_define_module_function(mSemanage, "semanage_port_key_create", _wrap_semanage_port_key_create, -1); + rb_define_module_function(mSemanage, "semanage_port_key_extract", _wrap_semanage_port_key_extract, -1); + rb_define_module_function(mSemanage, "semanage_port_key_free", _wrap_semanage_port_key_free, -1); + rb_define_module_function(mSemanage, "semanage_port_get_proto", _wrap_semanage_port_get_proto, -1); + rb_define_module_function(mSemanage, "semanage_port_set_proto", _wrap_semanage_port_set_proto, -1); + rb_define_module_function(mSemanage, "semanage_port_get_proto_str", _wrap_semanage_port_get_proto_str, -1); + rb_define_module_function(mSemanage, "semanage_port_get_low", _wrap_semanage_port_get_low, -1); + rb_define_module_function(mSemanage, "semanage_port_get_high", _wrap_semanage_port_get_high, -1); + rb_define_module_function(mSemanage, "semanage_port_set_port", _wrap_semanage_port_set_port, -1); + rb_define_module_function(mSemanage, "semanage_port_set_range", _wrap_semanage_port_set_range, -1); + rb_define_module_function(mSemanage, "semanage_port_get_con", _wrap_semanage_port_get_con, -1); + rb_define_module_function(mSemanage, "semanage_port_set_con", _wrap_semanage_port_set_con, -1); + rb_define_module_function(mSemanage, "semanage_port_create", _wrap_semanage_port_create, -1); + rb_define_module_function(mSemanage, "semanage_port_clone", _wrap_semanage_port_clone, -1); + rb_define_module_function(mSemanage, "semanage_port_free", _wrap_semanage_port_free, -1); + rb_define_module_function(mSemanage, "semanage_port_modify_local", _wrap_semanage_port_modify_local, -1); + rb_define_module_function(mSemanage, "semanage_port_del_local", _wrap_semanage_port_del_local, -1); + rb_define_module_function(mSemanage, "semanage_port_query_local", _wrap_semanage_port_query_local, -1); + rb_define_module_function(mSemanage, "semanage_port_exists_local", _wrap_semanage_port_exists_local, -1); + rb_define_module_function(mSemanage, "semanage_port_count_local", _wrap_semanage_port_count_local, -1); + rb_define_module_function(mSemanage, "semanage_port_iterate_local", _wrap_semanage_port_iterate_local, -1); + rb_define_module_function(mSemanage, "semanage_port_list_local", _wrap_semanage_port_list_local, -1); + rb_define_module_function(mSemanage, "semanage_port_query", _wrap_semanage_port_query, -1); + rb_define_module_function(mSemanage, "semanage_port_exists", _wrap_semanage_port_exists, -1); + rb_define_module_function(mSemanage, "semanage_port_count", _wrap_semanage_port_count, -1); + rb_define_module_function(mSemanage, "semanage_port_iterate", _wrap_semanage_port_iterate, -1); + rb_define_module_function(mSemanage, "semanage_port_list", _wrap_semanage_port_list, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_compare", _wrap_semanage_fcontext_compare, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_compare2", _wrap_semanage_fcontext_compare2, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_key_create", _wrap_semanage_fcontext_key_create, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_key_extract", _wrap_semanage_fcontext_key_extract, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_key_free", _wrap_semanage_fcontext_key_free, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_get_expr", _wrap_semanage_fcontext_get_expr, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_set_expr", _wrap_semanage_fcontext_set_expr, -1); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_ALL", SWIG_From_int((int)(0))); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_REG", SWIG_From_int((int)(1))); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_DIR", SWIG_From_int((int)(2))); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_CHAR", SWIG_From_int((int)(3))); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_BLOCK", SWIG_From_int((int)(4))); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_SOCK", SWIG_From_int((int)(5))); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_LINK", SWIG_From_int((int)(6))); + rb_define_const(mSemanage, "SEMANAGE_FCONTEXT_PIPE", SWIG_From_int((int)(7))); + rb_define_module_function(mSemanage, "semanage_fcontext_get_type", _wrap_semanage_fcontext_get_type, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_get_type_str", _wrap_semanage_fcontext_get_type_str, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_set_type", _wrap_semanage_fcontext_set_type, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_get_con", _wrap_semanage_fcontext_get_con, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_set_con", _wrap_semanage_fcontext_set_con, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_create", _wrap_semanage_fcontext_create, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_clone", _wrap_semanage_fcontext_clone, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_free", _wrap_semanage_fcontext_free, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_modify_local", _wrap_semanage_fcontext_modify_local, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_del_local", _wrap_semanage_fcontext_del_local, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_query_local", _wrap_semanage_fcontext_query_local, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_exists_local", _wrap_semanage_fcontext_exists_local, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_count_local", _wrap_semanage_fcontext_count_local, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_iterate_local", _wrap_semanage_fcontext_iterate_local, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_list_local", _wrap_semanage_fcontext_list_local, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_query", _wrap_semanage_fcontext_query, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_exists", _wrap_semanage_fcontext_exists, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_count", _wrap_semanage_fcontext_count, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_iterate", _wrap_semanage_fcontext_iterate, -1); + rb_define_module_function(mSemanage, "semanage_fcontext_list", _wrap_semanage_fcontext_list, -1); + rb_define_module_function(mSemanage, "semanage_seuser_key_create", _wrap_semanage_seuser_key_create, -1); + rb_define_module_function(mSemanage, "semanage_seuser_key_extract", _wrap_semanage_seuser_key_extract, -1); + rb_define_module_function(mSemanage, "semanage_seuser_key_free", _wrap_semanage_seuser_key_free, -1); + rb_define_module_function(mSemanage, "semanage_seuser_compare", _wrap_semanage_seuser_compare, -1); + rb_define_module_function(mSemanage, "semanage_seuser_compare2", _wrap_semanage_seuser_compare2, -1); + rb_define_module_function(mSemanage, "semanage_seuser_get_name", _wrap_semanage_seuser_get_name, -1); + rb_define_module_function(mSemanage, "semanage_seuser_set_name", _wrap_semanage_seuser_set_name, -1); + rb_define_module_function(mSemanage, "semanage_seuser_get_sename", _wrap_semanage_seuser_get_sename, -1); + rb_define_module_function(mSemanage, "semanage_seuser_set_sename", _wrap_semanage_seuser_set_sename, -1); + rb_define_module_function(mSemanage, "semanage_seuser_get_mlsrange", _wrap_semanage_seuser_get_mlsrange, -1); + rb_define_module_function(mSemanage, "semanage_seuser_set_mlsrange", _wrap_semanage_seuser_set_mlsrange, -1); + rb_define_module_function(mSemanage, "semanage_seuser_create", _wrap_semanage_seuser_create, -1); + rb_define_module_function(mSemanage, "semanage_seuser_clone", _wrap_semanage_seuser_clone, -1); + rb_define_module_function(mSemanage, "semanage_seuser_free", _wrap_semanage_seuser_free, -1); + rb_define_module_function(mSemanage, "semanage_seuser_modify_local", _wrap_semanage_seuser_modify_local, -1); + rb_define_module_function(mSemanage, "semanage_seuser_del_local", _wrap_semanage_seuser_del_local, -1); + rb_define_module_function(mSemanage, "semanage_seuser_query_local", _wrap_semanage_seuser_query_local, -1); + rb_define_module_function(mSemanage, "semanage_seuser_exists_local", _wrap_semanage_seuser_exists_local, -1); + rb_define_module_function(mSemanage, "semanage_seuser_count_local", _wrap_semanage_seuser_count_local, -1); + rb_define_module_function(mSemanage, "semanage_seuser_iterate_local", _wrap_semanage_seuser_iterate_local, -1); + rb_define_module_function(mSemanage, "semanage_seuser_list_local", _wrap_semanage_seuser_list_local, -1); + rb_define_module_function(mSemanage, "semanage_seuser_query", _wrap_semanage_seuser_query, -1); + rb_define_module_function(mSemanage, "semanage_seuser_exists", _wrap_semanage_seuser_exists, -1); + rb_define_module_function(mSemanage, "semanage_seuser_count", _wrap_semanage_seuser_count, -1); + rb_define_module_function(mSemanage, "semanage_seuser_iterate", _wrap_semanage_seuser_iterate, -1); + rb_define_module_function(mSemanage, "semanage_seuser_list", _wrap_semanage_seuser_list, -1); + rb_define_const(mSemanage, "SEMANAGE_PROTO_IP4", SWIG_From_int((int)(0))); + rb_define_const(mSemanage, "SEMANAGE_PROTO_IP6", SWIG_From_int((int)(1))); + rb_define_module_function(mSemanage, "semanage_node_compare", _wrap_semanage_node_compare, -1); + rb_define_module_function(mSemanage, "semanage_node_compare2", _wrap_semanage_node_compare2, -1); + rb_define_module_function(mSemanage, "semanage_node_key_create", _wrap_semanage_node_key_create, -1); + rb_define_module_function(mSemanage, "semanage_node_key_extract", _wrap_semanage_node_key_extract, -1); + rb_define_module_function(mSemanage, "semanage_node_key_free", _wrap_semanage_node_key_free, -1); + rb_define_module_function(mSemanage, "semanage_node_get_addr", _wrap_semanage_node_get_addr, -1); + rb_define_module_function(mSemanage, "semanage_node_get_addr_bytes", _wrap_semanage_node_get_addr_bytes, -1); + rb_define_module_function(mSemanage, "semanage_node_set_addr", _wrap_semanage_node_set_addr, -1); + rb_define_module_function(mSemanage, "semanage_node_set_addr_bytes", _wrap_semanage_node_set_addr_bytes, -1); + rb_define_module_function(mSemanage, "semanage_node_get_mask", _wrap_semanage_node_get_mask, -1); + rb_define_module_function(mSemanage, "semanage_node_get_mask_bytes", _wrap_semanage_node_get_mask_bytes, -1); + rb_define_module_function(mSemanage, "semanage_node_set_mask", _wrap_semanage_node_set_mask, -1); + rb_define_module_function(mSemanage, "semanage_node_set_mask_bytes", _wrap_semanage_node_set_mask_bytes, -1); + rb_define_module_function(mSemanage, "semanage_node_get_proto", _wrap_semanage_node_get_proto, -1); + rb_define_module_function(mSemanage, "semanage_node_set_proto", _wrap_semanage_node_set_proto, -1); + rb_define_module_function(mSemanage, "semanage_node_get_proto_str", _wrap_semanage_node_get_proto_str, -1); + rb_define_module_function(mSemanage, "semanage_node_get_con", _wrap_semanage_node_get_con, -1); + rb_define_module_function(mSemanage, "semanage_node_set_con", _wrap_semanage_node_set_con, -1); + rb_define_module_function(mSemanage, "semanage_node_create", _wrap_semanage_node_create, -1); + rb_define_module_function(mSemanage, "semanage_node_clone", _wrap_semanage_node_clone, -1); + rb_define_module_function(mSemanage, "semanage_node_free", _wrap_semanage_node_free, -1); + rb_define_module_function(mSemanage, "semanage_node_modify_local", _wrap_semanage_node_modify_local, -1); + rb_define_module_function(mSemanage, "semanage_node_del_local", _wrap_semanage_node_del_local, -1); + rb_define_module_function(mSemanage, "semanage_node_query_local", _wrap_semanage_node_query_local, -1); + rb_define_module_function(mSemanage, "semanage_node_exists_local", _wrap_semanage_node_exists_local, -1); + rb_define_module_function(mSemanage, "semanage_node_count_local", _wrap_semanage_node_count_local, -1); + rb_define_module_function(mSemanage, "semanage_node_iterate_local", _wrap_semanage_node_iterate_local, -1); + rb_define_module_function(mSemanage, "semanage_node_list_local", _wrap_semanage_node_list_local, -1); + rb_define_module_function(mSemanage, "semanage_node_query", _wrap_semanage_node_query, -1); + rb_define_module_function(mSemanage, "semanage_node_exists", _wrap_semanage_node_exists, -1); + rb_define_module_function(mSemanage, "semanage_node_count", _wrap_semanage_node_count, -1); + rb_define_module_function(mSemanage, "semanage_node_iterate", _wrap_semanage_node_iterate, -1); + rb_define_module_function(mSemanage, "semanage_node_list", _wrap_semanage_node_list, -1); +} + --- libsemanage-2.0.39.orig/src/Makefile +++ libsemanage-2.0.39/src/Makefile @@ -1,7 +1,7 @@ # Installation directories. PREFIX ?= $(DESTDIR)/usr LIBDIR ?= $(PREFIX)/lib -SHLIBDIR ?= $(DESTDIR)/lib +SHLIBDIR ?= $(PREFIX)/lib INCLUDEDIR ?= $(PREFIX)/include PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]') PYINC ?= /usr/include/${PYLIBVER} @@ -66,7 +66,7 @@ $(CC) $(filter-out -Werror,$(CFLAGS)) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGSO): $(SWIGLOBJ) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -l$(PYLIBVER) -L$(LIBDIR) -Wl,-soname,$@,-z,defs + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@ $(SWIGRUBYSO): $(SWIGRUBYLOBJ) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@ @@ -76,7 +76,7 @@ ranlib $@ $(LIBSO): $(LOBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -lselinux -lbz2 -lustr -L$(LIBDIR) -Wl,-soname,$(LIBSO),--version-script=libsemanage.map,-z,defs + $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ -lsepol -lselinux -lbz2 -lustr -L$(LIBDIR) -Wl,-soname,$(LIBSO),--version-script=libsemanage.map ln -sf $@ $(TARGET) conf-scan.c: conf-scan.l conf-parse.h @@ -137,7 +137,11 @@ rm -f $(OBJS) $(LOBJS) $(LIBA) $(LIBSO) $(SWIGLOBJ) $(SWIGSO) $(TARGET) conf-parse.c conf-parse.h conf-scan.c distclean: clean - rm -f $(SWIGCOUT) $(SWIGFILES) + +maintainer-clean: distclean + rm -f $(SWIGFILES) + rm -f $(SWIGCOUT) + indent: ../../scripts/Lindent $(filter-out $(GENERATED),$(wildcard *.[ch])) --- libsemanage-2.0.39.orig/src/genhomedircon.c +++ libsemanage-2.0.39/src/genhomedircon.c @@ -224,8 +224,8 @@ char *rbuf = NULL; char *path = NULL; long rbuflen; - uid_t temp, minuid = 0; - int minuid_set = 0; + uid_t temp, minuid = 0, maxuid = 0; + int minuid_set = 0, maxuid_set = 0; struct passwd pwstorage, *pwbuf; struct stat buf; int retval; @@ -275,6 +275,16 @@ } free(path); path = NULL; + path = semanage_findval(PATH_ETC_LOGIN_DEFS, "UID_MAX", NULL); + if (path && *path) { + temp = atoi(path); + if (!maxuid_set || temp > maxuid) { + maxuid = temp; + maxuid_set = 1; + } + } + free(path); + path = NULL; path = semanage_findval(PATH_ETC_LIBUSER, "LU_UIDNUMBER", "="); if (path && *path) { @@ -291,6 +301,10 @@ minuid = 500; minuid_set = 1; } + if (!maxuid_set) { + maxuid = 60000; + maxuid_set = 1; + } rbuflen = sysconf(_SC_GETPW_R_SIZE_MAX); if (rbuflen <= 0) @@ -300,7 +314,7 @@ goto fail; setpwent(); while ((retval = getpwent_r(&pwstorage, rbuf, rbuflen, &pwbuf)) == 0) { - if (pwbuf->pw_uid < minuid) + if (pwbuf->pw_uid < minuid || pwbuf->pw_uid > maxuid) continue; if (!semanage_list_find(shells, pwbuf->pw_shell)) continue; @@ -331,7 +345,7 @@ /* NOTE: old genhomedircon printed a warning on match */ if (hand.matched) { - WARN(s->h_semanage, "%s homedir %s or its parent directory conflicts with a file context already specified in the policy. This usually indicates an incorrectly defined system account. If it is a system account please make sure its uid is less than %u or its login shell is /sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid); + WARN(s->h_semanage, "%s homedir %s or its parent directory conflicts with a file context already specified in the policy. This usually indicates an incorrectly defined system account. If it is a system account please make sure its uid is less than %u or greater than %u or its login shell is /sbin/nologin.", pwbuf->pw_name, pwbuf->pw_dir, minuid, maxuid); } else { if (semanage_list_push(&homedir_list, path)) goto fail; --- libsemanage-2.0.39.orig/tests/Makefile +++ libsemanage-2.0.39/tests/Makefile @@ -5,7 +5,7 @@ TESTSRC=../src # Add the required external object files here: -LIBS = ../src/libsemanage.a ../../libselinux/src/libselinux.a ../../libsepol/src/libsepol.a +LIBS = ../src/libsemanage.a /usr/lib/libselinux.a /usr/lib/libsepol.a ########################################################################### --- libsemanage-2.0.39.orig/debian/copyright +++ libsemanage-2.0.39/debian/copyright @@ -0,0 +1,39 @@ +This is the Debian packe for libsemanage, and it is built from sources +obtained from: http://www.nsa.gov/selinux/code/download5.cfm. + +libsemanage is Copyright © 2004-2007 Tresys Technology, LLC + Copyright © 2005 Red Hat, Inc. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1 + +On Debian GNU/Linux systems, the complete text of the Lesser GNU General +Public License can be found in `/usr/share/common-licenses/LGPL'. + +This package is maintained by Manoj Srivastava . + +The Debian specific changes are © 2005-2009, Manoj Srivastava +, and distributed under the terms of the GNU +General Public License, version 2. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. + + A copy of the GNU General Public License is also available at + . You may also obtain + it by writing to the Free Software Foundation, Inc., 51 Franklin + St, Fifth Floor, Boston, MA 02110-1301, USA. + +Manoj Srivastava +arch-tag: d4250e44-a0e0-4ee0-adb9-2bd74f6eeb27 --- libsemanage-2.0.39.orig/debian/postrm +++ libsemanage-2.0.39/debian/postrm @@ -0,0 +1,171 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# postrm --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 12:22:20 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Mon Apr 10 13:50:10 2006 +# Last Machine Used: glaurung.internal.golden-gryphon.com +# Update Count : 11 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: 246eda36-1c3a-40cb-9baf-06992ca032f2 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + + +# Abort if any command returns an error value +set -e + +package_name=libsemanage1 + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + +# This script is called twice during the removal of the package; once +# after the removal of the package's files from the system, and as +# the final step in the removal of this package, after the package's +# conffiles have been removed. +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' overwrit>r> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +# Ensure the menu system is updated +##: [ ! -x /usr/bin/update-menus ] || /usr/bin/update-menus + +case "$1" in + remove) + # This package is being removed, but its configuration has not yet + # been purged. + : + + # Remove diversion + ##: dpkg-divert --package ${package_name} --remove --rename \ + ##: --divert /usr/bin/other.real /usr/bin/other + + ldconfig + + ;; + purge) + # This package has previously been removed and is now having + # its configuration purged from the system. + : + test ! -f /etc/selinux/semanage.conf || rm -f /etc/selinux/semanage.conf + + # we mimic dpkg as closely as possible, so we remove configuration + # files with dpkg backup extensions too: + ### Some of the following is from Tore Anderson: + ##: for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + ##: rm -f /etc/${package_name}.conf$ext + ##: done + + # remove the configuration file itself + ##: rm -f /etc/${package_name}.conf + + # and finally clear it out from the ucf database + ##: ucf --purge /etc/${package_name}.conf + + # Remove symlinks from /etc/rc?.d + ##: update-rc.d ${package_name} remove >/dev/null + + ##: if [ -e /usr/share/debconf/confmodule ]; then + ##: # Purge this package's data from the debconf database. + ##: . /usr/share/debconf/confmodule + ##: db_purge + ##: fi + + # This package has previously been removed and is now having + # its configuration purged from the system. + ##: for flavour in emacs20 emacs21; do + ##: STARTDIR=/etc/$flavour/site-start.d; + ##: STARTFILE="${package_name}-init.el"; + ##: if [ -e "$STARTDIR/20$STARTFILE" ]; then + ##: rm -f "$STARTDIR/20$STARTFILE" + ##: fi + ##: done + + ;; + disappear) + if test "$2" != overwriter; then + echo "$0: undocumented call to \`postrm $*'" 1>&2 + exit 0 + fi + # This package has been completely overwritten by package $3 + # (version $4). All our files are already gone from the system. + # This is a special case: neither "prerm remove" nor "postrm remove" + # have been called, because dpkg didn't know that this package would + # disappear until this stage. + : + + ;; + upgrade) + # About to upgrade FROM THIS VERSION to version $2 of this package. + # "prerm upgrade" has been called for this version, and "preinst + # upgrade" has been called for the new version. Last chance to + # clean up. + : + + ;; + failed-upgrade) + # About to upgrade from version $2 of this package TO THIS VERSION. + # "prerm upgrade" has been called for the old version, and "preinst + # upgrade" has been called for this version. This is only used if + # the previous version's "postrm upgrade" couldn't handle it and + # returned non-zero. (Fix old postrm bugs here.) + : + + ;; + abort-install) + # Back out of an attempt to install this package. Undo the effects of + # "preinst install...". There are two sub-cases. + : + + if test "${2+set}" = set; then + # When the install was attempted, version $2's configuration + # files were still on the system. Undo the effects of "preinst + # install $2". + : + + else + # We were being installed from scratch. Undo the effects of + # "preinst install". + : + + fi ;; + abort-upgrade) + # Back out of an attempt to upgrade this package from version $2 + # TO THIS VERSION. Undo the effects of "preinst upgrade $2". + : + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac + +exit 0 --- libsemanage-2.0.39.orig/debian/libsemanage1.symbols +++ libsemanage-2.0.39/debian/libsemanage1.symbols @@ -0,0 +1,253 @@ +libsemanage.so.1 libsemanage1 #MINVER# + LIBSEMANAGE_1.0@LIBSEMANAGE_1.0 2.0.3 + semanage_access_check@LIBSEMANAGE_1.0 2.0.3 + semanage_begin_transaction@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_compare2@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_compare@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_count@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_count_active@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_count_local@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_create@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_del_local@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_exists@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_exists_active@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_exists_local@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_free@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_get_name@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_get_value@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_iterate@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_iterate_active@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_iterate_local@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_key_create@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_key_extract@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_key_free@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_list@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_list_active@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_list_local@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_modify_local@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_query@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_query_active@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_query_local@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_set_active@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_set_name@LIBSEMANAGE_1.0 2.0.3 + semanage_bool_set_value@LIBSEMANAGE_1.0 2.0.3 + semanage_commit@LIBSEMANAGE_1.0 2.0.3 + semanage_connect@LIBSEMANAGE_1.0 2.0.3 + semanage_context_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_context_create@LIBSEMANAGE_1.0 2.0.3 + semanage_context_free@LIBSEMANAGE_1.0 2.0.3 + semanage_context_from_string@LIBSEMANAGE_1.0 2.0.3 + semanage_context_get_mls@LIBSEMANAGE_1.0 2.0.3 + semanage_context_get_role@LIBSEMANAGE_1.0 2.0.3 + semanage_context_get_type@LIBSEMANAGE_1.0 2.0.3 + semanage_context_get_user@LIBSEMANAGE_1.0 2.0.3 + semanage_context_set_mls@LIBSEMANAGE_1.0 2.0.3 + semanage_context_set_role@LIBSEMANAGE_1.0 2.0.3 + semanage_context_set_type@LIBSEMANAGE_1.0 2.0.3 + semanage_context_set_user@LIBSEMANAGE_1.0 2.0.3 + semanage_context_to_string@LIBSEMANAGE_1.0 2.0.3 + semanage_disconnect@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_compare2@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_compare@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_count@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_count_local@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_create@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_del_local@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_exists@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_exists_local@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_free@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_get_con@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_get_expr@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_get_type@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_get_type_str@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_iterate@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_iterate_local@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_key_create@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_key_extract@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_key_free@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_list@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_list_local@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_modify_local@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_query@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_query_local@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_set_con@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_set_expr@LIBSEMANAGE_1.0 2.0.3 + semanage_fcontext_set_type@LIBSEMANAGE_1.0 2.0.3 + semanage_get_disable_dontaudit@LIBSEMANAGE_1.0 2.0.33 + semanage_handle_create@LIBSEMANAGE_1.0 2.0.3 + semanage_handle_destroy@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_compare2@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_compare@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_count@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_count_local@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_create@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_del_local@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_exists@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_exists_local@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_free@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_get_ifcon@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_get_msgcon@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_get_name@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_iterate@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_iterate_local@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_key_create@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_key_extract@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_key_free@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_list@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_list_local@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_modify_local@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_query@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_query_local@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_set_ifcon@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_set_msgcon@LIBSEMANAGE_1.0 2.0.3 + semanage_iface_set_name@LIBSEMANAGE_1.0 2.0.3 + semanage_is_connected@LIBSEMANAGE_1.0 2.0.3 + semanage_is_managed@LIBSEMANAGE_1.0 2.0.3 + semanage_mls_enabled@LIBSEMANAGE_1.0 2.0.32 + semanage_module_get_name@LIBSEMANAGE_1.0 2.0.3 + semanage_module_get_version@LIBSEMANAGE_1.0 2.0.3 + semanage_module_info_datum_destroy@LIBSEMANAGE_1.0 2.0.3 + semanage_module_install@LIBSEMANAGE_1.0 2.0.3 + semanage_module_install_base@LIBSEMANAGE_1.0 2.0.3 + semanage_module_install_base_file@LIBSEMANAGE_1.0 2.0.32 + semanage_module_install_file@LIBSEMANAGE_1.0 2.0.32 + semanage_module_list@LIBSEMANAGE_1.0 2.0.3 + semanage_module_list_nth@LIBSEMANAGE_1.0 2.0.3 + semanage_module_remove@LIBSEMANAGE_1.0 2.0.3 + semanage_module_upgrade@LIBSEMANAGE_1.0 2.0.3 + semanage_module_upgrade_file@LIBSEMANAGE_1.0 2.0.32 + semanage_msg_get_channel@LIBSEMANAGE_1.0 2.0.3 + semanage_msg_get_fname@LIBSEMANAGE_1.0 2.0.3 + semanage_msg_get_level@LIBSEMANAGE_1.0 2.0.3 + semanage_msg_set_callback@LIBSEMANAGE_1.0 2.0.3 + semanage_node_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_node_compare2@LIBSEMANAGE_1.0 2.0.3 + semanage_node_compare@LIBSEMANAGE_1.0 2.0.3 + semanage_node_count@LIBSEMANAGE_1.0 2.0.3 + semanage_node_count_local@LIBSEMANAGE_1.0 2.0.3 + semanage_node_create@LIBSEMANAGE_1.0 2.0.3 + semanage_node_del_local@LIBSEMANAGE_1.0 2.0.3 + semanage_node_exists@LIBSEMANAGE_1.0 2.0.3 + semanage_node_exists_local@LIBSEMANAGE_1.0 2.0.3 + semanage_node_free@LIBSEMANAGE_1.0 2.0.3 + semanage_node_get_addr@LIBSEMANAGE_1.0 2.0.3 + semanage_node_get_addr_bytes@LIBSEMANAGE_1.0 2.0.3 + semanage_node_get_con@LIBSEMANAGE_1.0 2.0.3 + semanage_node_get_mask@LIBSEMANAGE_1.0 2.0.3 + semanage_node_get_mask_bytes@LIBSEMANAGE_1.0 2.0.3 + semanage_node_get_proto@LIBSEMANAGE_1.0 2.0.3 + semanage_node_get_proto_str@LIBSEMANAGE_1.0 2.0.3 + semanage_node_iterate@LIBSEMANAGE_1.0 2.0.3 + semanage_node_iterate_local@LIBSEMANAGE_1.0 2.0.3 + semanage_node_key_create@LIBSEMANAGE_1.0 2.0.3 + semanage_node_key_extract@LIBSEMANAGE_1.0 2.0.3 + semanage_node_key_free@LIBSEMANAGE_1.0 2.0.3 + semanage_node_list@LIBSEMANAGE_1.0 2.0.3 + semanage_node_list_local@LIBSEMANAGE_1.0 2.0.3 + semanage_node_modify_local@LIBSEMANAGE_1.0 2.0.3 + semanage_node_query@LIBSEMANAGE_1.0 2.0.3 + semanage_node_query_local@LIBSEMANAGE_1.0 2.0.3 + semanage_node_set_addr@LIBSEMANAGE_1.0 2.0.3 + semanage_node_set_addr_bytes@LIBSEMANAGE_1.0 2.0.3 + semanage_node_set_con@LIBSEMANAGE_1.0 2.0.3 + semanage_node_set_mask@LIBSEMANAGE_1.0 2.0.3 + semanage_node_set_mask_bytes@LIBSEMANAGE_1.0 2.0.3 + semanage_node_set_proto@LIBSEMANAGE_1.0 2.0.3 + semanage_port_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_port_compare2@LIBSEMANAGE_1.0 2.0.3 + semanage_port_compare@LIBSEMANAGE_1.0 2.0.3 + semanage_port_count@LIBSEMANAGE_1.0 2.0.3 + semanage_port_count_local@LIBSEMANAGE_1.0 2.0.3 + semanage_port_create@LIBSEMANAGE_1.0 2.0.3 + semanage_port_del_local@LIBSEMANAGE_1.0 2.0.3 + semanage_port_exists@LIBSEMANAGE_1.0 2.0.3 + semanage_port_exists_local@LIBSEMANAGE_1.0 2.0.3 + semanage_port_free@LIBSEMANAGE_1.0 2.0.3 + semanage_port_get_con@LIBSEMANAGE_1.0 2.0.3 + semanage_port_get_high@LIBSEMANAGE_1.0 2.0.3 + semanage_port_get_low@LIBSEMANAGE_1.0 2.0.3 + semanage_port_get_proto@LIBSEMANAGE_1.0 2.0.3 + semanage_port_get_proto_str@LIBSEMANAGE_1.0 2.0.3 + semanage_port_iterate@LIBSEMANAGE_1.0 2.0.3 + semanage_port_iterate_local@LIBSEMANAGE_1.0 2.0.3 + semanage_port_key_create@LIBSEMANAGE_1.0 2.0.3 + semanage_port_key_extract@LIBSEMANAGE_1.0 2.0.3 + semanage_port_key_free@LIBSEMANAGE_1.0 2.0.3 + semanage_port_list@LIBSEMANAGE_1.0 2.0.3 + semanage_port_list_local@LIBSEMANAGE_1.0 2.0.3 + semanage_port_modify_local@LIBSEMANAGE_1.0 2.0.3 + semanage_port_query@LIBSEMANAGE_1.0 2.0.3 + semanage_port_query_local@LIBSEMANAGE_1.0 2.0.3 + semanage_port_set_con@LIBSEMANAGE_1.0 2.0.3 + semanage_port_set_port@LIBSEMANAGE_1.0 2.0.3 + semanage_port_set_proto@LIBSEMANAGE_1.0 2.0.3 + semanage_port_set_range@LIBSEMANAGE_1.0 2.0.3 + semanage_reload_policy@LIBSEMANAGE_1.0 2.0.3 + semanage_select_store@LIBSEMANAGE_1.0 2.0.3 + semanage_set_create_store@LIBSEMANAGE_1.0 2.0.3 + semanage_set_disable_dontaudit@LIBSEMANAGE_1.0 2.0.25 + semanage_set_rebuild@LIBSEMANAGE_1.0 2.0.3 + semanage_set_reload@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_compare2@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_compare@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_count@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_count_local@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_create@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_del_local@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_exists@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_exists_local@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_free@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_get_mlsrange@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_get_name@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_get_sename@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_iterate@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_iterate_local@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_key_create@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_key_extract@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_key_free@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_list@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_list_local@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_modify_local@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_query@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_query_local@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_set_mlsrange@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_set_name@LIBSEMANAGE_1.0 2.0.3 + semanage_seuser_set_sename@LIBSEMANAGE_1.0 2.0.3 + semanage_user_add_role@LIBSEMANAGE_1.0 2.0.3 + semanage_user_clone@LIBSEMANAGE_1.0 2.0.3 + semanage_user_compare2@LIBSEMANAGE_1.0 2.0.3 + semanage_user_compare@LIBSEMANAGE_1.0 2.0.3 + semanage_user_count@LIBSEMANAGE_1.0 2.0.3 + semanage_user_count_local@LIBSEMANAGE_1.0 2.0.3 + semanage_user_create@LIBSEMANAGE_1.0 2.0.3 + semanage_user_del_local@LIBSEMANAGE_1.0 2.0.3 + semanage_user_del_role@LIBSEMANAGE_1.0 2.0.3 + semanage_user_exists@LIBSEMANAGE_1.0 2.0.3 + semanage_user_exists_local@LIBSEMANAGE_1.0 2.0.3 + semanage_user_free@LIBSEMANAGE_1.0 2.0.3 + semanage_user_get_mlslevel@LIBSEMANAGE_1.0 2.0.3 + semanage_user_get_mlsrange@LIBSEMANAGE_1.0 2.0.3 + semanage_user_get_name@LIBSEMANAGE_1.0 2.0.3 + semanage_user_get_num_roles@LIBSEMANAGE_1.0 2.0.3 + semanage_user_get_prefix@LIBSEMANAGE_1.0 2.0.3 + semanage_user_get_roles@LIBSEMANAGE_1.0 2.0.3 + semanage_user_has_role@LIBSEMANAGE_1.0 2.0.3 + semanage_user_iterate@LIBSEMANAGE_1.0 2.0.3 + semanage_user_iterate_local@LIBSEMANAGE_1.0 2.0.3 + semanage_user_key_create@LIBSEMANAGE_1.0 2.0.3 + semanage_user_key_extract@LIBSEMANAGE_1.0 2.0.3 + semanage_user_key_free@LIBSEMANAGE_1.0 2.0.3 + semanage_user_list@LIBSEMANAGE_1.0 2.0.3 + semanage_user_list_local@LIBSEMANAGE_1.0 2.0.3 + semanage_user_modify_local@LIBSEMANAGE_1.0 2.0.3 + semanage_user_query@LIBSEMANAGE_1.0 2.0.3 + semanage_user_query_local@LIBSEMANAGE_1.0 2.0.3 + semanage_user_set_mlslevel@LIBSEMANAGE_1.0 2.0.3 + semanage_user_set_mlsrange@LIBSEMANAGE_1.0 2.0.3 + semanage_user_set_name@LIBSEMANAGE_1.0 2.0.3 + semanage_user_set_prefix@LIBSEMANAGE_1.0 2.0.3 + semanage_user_set_roles@LIBSEMANAGE_1.0 2.0.3 --- libsemanage-2.0.39.orig/debian/rules +++ libsemanage-2.0.39/debian/rules @@ -0,0 +1,67 @@ +#! /usr/bin/make -f +############################ -*- Mode: Makefile; coding: utf-8 -*- ########################### +## rules --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Fri Nov 14 12:33:34 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Tue Nov 18 17:46:22 2003 +## Last Machine Used: glaurung.green-gryphon.com +## Update Count : 70 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : +## +## arch-tag: 9a5063f4-1e20-4fff-b22a-de94c1e3d954 +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +############################################################################### + +# Include dpkg-architecture generated variables +include debian/common/archvars.mk + +ifneq ($(DEB_HOST_ARCH_OS),linux) +$(error This is a linux only package. Aborting build.) +endif + +# Set variables with information extracted from control and changelog files +include debian/common/pkgvars.mk + +# variables useful for perl packages +include debian/common/perlvars.mk + +# Install commands +include debian/common/install_cmds.mk + +include debian/local-vars.mk + +include debian/common/copt.mk + +include debian/common/automake.mk + + + +all: + @echo nothing to be done + +include debian/common/targets.mk + +include debian/local.mk + + +#Local variables: +#mode: makefile +#End: --- libsemanage-2.0.39.orig/debian/control +++ libsemanage-2.0.39/debian/control @@ -0,0 +1,95 @@ +Source: libsemanage +VCS-Git: git://git.debian.org/~srivasta/debian/libsemanage.git +VCS-Browser: http://git.debian.org/git/?p=users/srivasta/debian/libsemanage.git +Priority: optional +Section: libdevel +Maintainer: Manoj Srivastava +Standards-Version: 3.8.3.0 +Build-Depends: bison, flex, libselinux1-dev (>= 2.0.85), + libsepol1-dev (>= 2.0.37), python-all-dev (>= 2.3.5-11), + file, libustr-dev, swig, libbz2-dev, ruby1.8-dev, ruby +XS-Python-Version: >= 2.5 + + +Package: libsemanage1 +Architecture: any +Section: libs +Depends: ${shlibs:Depends} +Description: SELinux policy management library + This package provides the shared libraries SELinux policy management. + It uses libsepol for binary policy manipulation and libselinux for + interacting with the SELinux system. It also exec's helper programs + for loading policy and for checking whether the file_contexts + configuration is valid (load_policy and setfiles from + policycoreutils) presently, although this may change at least for the + bootstrapping case + . + Security-enhanced Linux is a patch of the Linux kernel and a + number of utilities with enhanced security functionality designed to + add mandatory access controls to Linux. The Security-enhanced Linux + kernel contains new architectural components originally developed to + improve the security of the Flask operating system. These + architectural components provide general support for the enforcement + of many kinds of mandatory access control policies, including those + based on the concepts of Type Enforcement, Role-based Access + Control, and Multi-level Security. + +Package: libsemanage1-dev +Architecture: any +Provides: libsemanage-dev +Conflicts: libsemanage-dev +Replaces: python2.4-semanage (<= 1.4-1) +Depends: ${shlibs:Depends}, libsemanage1 (= ${binary:Version}) +Description: Header files and libraries for SELinux policy manipulation + This package provides an API for the management of SELinux policies. + It contains the static libraries and header files needed + for developing applications that manage SELinux policies. + . + Security-enhanced Linux is a patch of the Linux kernel and a + number of utilities with enhanced security functionality designed to + add mandatory access controls to Linux. The Security-enhanced Linux + kernel contains new architectural components originally developed to + improve the security of the Flask operating system. These + architectural components provide general support for the enforcement + of many kinds of mandatory access control policies, including those + based on the concepts of Type Enforcement, Role-based Access + Control, and Multi-level Security. + +Package: libsemanage-ruby1.8 +Architecture: any +Depends: ${shlibs:Depends}, libruby1.8 (>= 1.8.6.114) +Section: ruby +Description: Ruby bindings to for SELinux policymanagement + This package provides the Ruby bindings needed for developing Ruby + applications that manage SELinux policies. + . + Security-enhanced Linux is a patch of the Linux kernel and a + number of utilities with enhanced security functionality designed to + add mandatory access controls to Linux. The Security-enhanced Linux + kernel contains new architectural components originally developed to + improve the security of the Flask operating system. These + architectural components provide general support for the enforcement + of many kinds of mandatory access control policies, including those + based on the concepts of Type Enforcement, Role-based Access + Control, and Multi-level Security. + +Package: python-semanage +Architecture: any +Conflicts: python2.4-semanage (<= 1.7), libsemanage1-dev (<= 1.4-1) +Replaces: python2.4-semanage, libsemanage-dev, libsemanage1-dev (<= 1.4-1) +Depends: ${shlibs:Depends}, ${python:Depends}, python-support (>= 0.7.1) +Provides: ${python:Provides} +Section: python +Description: Python bindings for SELinux policy management + This package provides Python bindings for the management of SELinux + policies. + . + Security-enhanced Linux is a patch of the Linux kernel and a + number of utilities with enhanced security functionality designed to + add mandatory access controls to Linux. The Security-enhanced Linux + kernel contains new architectural components originally developed to + improve the security of the Flask operating system. These + architectural components provide general support for the enforcement + of many kinds of mandatory access control policies, including those + based on the concepts of Type Enforcement, Role-based Access + Control, and Multi-level Security. --- libsemanage-2.0.39.orig/debian/watch +++ libsemanage-2.0.39/debian/watch @@ -0,0 +1,6 @@ +# format version number, currently 2; this line is compulsory! +version=3 + + +http://userspace.selinuxproject.org/releases/current/devel/libsemanage-(.*)\.tar\.gz +#http://www.nsa.gov/selinux/code/download-trunk.cfm ../archives/libsemanage-(.*)\.tgz --- libsemanage-2.0.39.orig/debian/python_prerm +++ libsemanage-2.0.39/debian/python_prerm @@ -0,0 +1,132 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# prerm --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 12:16:39 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Wed Aug 9 22:39:33 2006 +# Last Machine Used: glaurung.internal.golden-gryphon.com +# Update Count : 13 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: 8dc9b331-c463-4f24-9c39-e94168e83cda +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + +# Abort if any command returns an error value +set -e + +package_name=python-semanage + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + + +# This script is called as the first step in removing the package from +# the system. This includes cases where the user explicitly asked for +# the package to be removed, upgrade, automatic removal due to conflicts, +# and deconfiguration due to temporary removal of a depended-on package. + +# Info files should be uninstalled from the dir file in any case. +#install-info --quiet --remove /usr/info/${package_name} + +case "$1" in + remove) + # This package about to be removed. + : + + # Remove package-specific directories from /usr/local. Don't try + # to remove standard directories such as /usr/local/lib. + ##: if test -d /usr/local/lib/${package_name}; then + ##: rmdir /usr/local/lib/${package_name} || true + ##: fi + + # Deactivate menu-methods script. + ##: chmod a-x /etc/menu-methods/${package_name} + + # Withdraw our version of a program. + ##: update-alternatives --remove program /usr/bin/alternative + + # Get rid of the installed docs + ##: if which install-docs >/dev/null 2>&1; then + ##: install-docs -r $package_name + ##: fi + + # Get rid of the byte compiled files + ##: if [ -x /usr/lib/emacsen-common/emacs-package-remove ]; then + ##: /usr/lib/emacsen-common/emacs-package-remove $package_name + ##: fi + + if [ -L /usr/doc/$package_name ]; then + rm -f /usr/doc/$package_name + fi + + if which update-python-modules >/dev/null 2>&1; then + update-python-modules -c -i /usr/share/python-support/${package_name} + fi + # There are two sub-cases: + if test "${2+set}" = set; then + if test "$2" != in-favour; then + echo "$0: undocumented call to \`prerm $*'" 1>&2 + exit 0 + fi + # We are being removed because of a conflict with package $3 + # (version $4), which is now being installed. + : + + else + # The package is being removed in its own right. + : + + fi ;; + deconfigure) + if test "$2" != in-favour || test "$5" != removing; then + echo "$0: undocumented call to \`prerm $*'" 1>&2 + exit 0 + fi + # Package $6 (version $7) which we depend on is being removed due + # to a conflict with package $3 (version $4), and this package is + # being deconfigured until $6 can be reinstalled. + : + + ;; + upgrade) + # Prepare to upgrade FROM THIS VERSION of this package to version $2. + : + + if [ -L /usr/doc/$package_name ]; then + rm -f /usr/doc/$package_name + fi + + ;; + failed-upgrade) + # Prepare to upgrade from version $2 of this package TO THIS VERSION. + # This is only used if the old version's prerm couldn't handle it, + # and returned non-zero. (Fix old prerm bugs here.) + : + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac + +exit 0 --- libsemanage-2.0.39.orig/debian/postinst +++ libsemanage-2.0.39/debian/postinst @@ -0,0 +1,214 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# postinst --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 11:25:07 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Mon Apr 10 13:49:08 2006 +# Last Machine Used: glaurung.internal.golden-gryphon.com +# Update Count : 15 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: d775c5db-ecd3-43f1-9399-ca5d79b469e9 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + +# Abort if any command returns an error value +set -e + +package_name=libsemanage1 + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + +# This script is called as the last step of the installation of the +# package. All the package's files are in place, dpkg has already done +# its automatic conffile handling, and all the packages we depend of +# are already fully installed and configured. +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +# The following idempotent stuff doesn't generally need protecting +# against being run in the abort-* cases. + + +# Create stub directories under /usr/local +##: if test ! -d /usr/local/lib/${package_name}; then +##: if test ! -d /usr/local/lib; then +##: if mkdir /usr/local/lib; then +##: chown root.staff /usr/local/lib || true +##: chmod 2775 /usr/local/lib || true +##: fi +##: fi +##: if mkdir /usr/local/lib/${package_name}; then +##: chown root.staff /usr/local/lib/${package_name} || true +##: chmod 2775 /usr/local/lib/${package_name} || true +##: fi +##: fi + +# Ensure the menu system is updated +##: [ ! -x /usr/bin/update-menus ] || /usr/bin/update-menus + +# Arrange for a daemon to be started at system boot time +##: update-rc.d ${package_name} default >/dev/null + +case "$1" in + configure) + # Configure this package. If the package must prompt the user for + # information, do it here. + # Install emacs lisp files + ##:if [ -x /usr/lib/emacsen-common/emacs-package-install ]; then + ##: /usr/lib/emacsen-common/emacs-package-install $package_name + ##:fi + + + # Activate menu-methods script + ##: chmod a+x /etc/menu-methods/${package_name} + + # Update ld.so cache + ldconfig + + # Make our version of a program available + ##: update-alternatives \ + ##: --install /usr/bin/program program /usr/bin/alternative 50 \ + ##: --slave /usr/man/man1/program.1.gz program.1.gz \ + ##: /usr/man/man1/alternative.1.gz + + # Tell ucf that the file in /usr/share/foo is the latest + # maintainer version, and let it handle how to manage the real + # confuguration file in /etc. This is how a static configuration + # file can be handled: + ##:if which ucf >/dev/null 2>&1; then + ##: ucf /usr/share/${package_name}/configuration /etc/${package_name}.conf + ##:fi + + ### We could also do this on the fly. The following is from Tore + ### Anderson: + + #. /usr/share/debconf/confmodule + + ### find out what the user answered. + # db_get foo/run_on_boot + # run_on_boot=$RET + # db_stop + + ### safely create a temporary file to generate our suggested + ### configuration file. + # tempfile=`tempfile` + # cat << _eof > $tempfile + ### Configuration file for Foo. + + ### this was answered by you, the user in a debconf dialogue + # RUNONBOOT=$run_on_boot + + ### this was not, as it has a sane default value. + # COLOUROFSKY=blue + + #_eof + + ### Note that some versions of debconf do not release stdin, so + ### the following invocation of ucf may not work, since the stdin + ### is never coneected to ucfr. + + ### now, invoke ucf, which will take care of the rest, and ask + ### the user if he wants to update his file, if it is modified. + #ucf $tempfile /etc/foo.conf + + ### done! now we'll just clear up our cruft. + #rm -f $tempfile + + + + # There are three sub-cases: + if test "${2+set}" != set; then + # We're being installed by an ancient dpkg which doesn't remember + # which version was most recently configured, or even whether + # there is a most recently configured version. + : + + elif test -z "$2" || test "$2" = ""; then + # The package has not ever been configured on this system, or was + # purged since it was last configured. + : + + else + # Version $2 is the most recently configured version of this + # package. + : + + fi ;; + abort-upgrade) + # Back out of an attempt to upgrade this package FROM THIS VERSION + # to version $2. Undo the effects of "prerm upgrade $2". + : + + ;; + abort-remove) + if test "$2" != in-favour; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 0 + fi + # Back out of an attempt to remove this package, which was due to + # a conflict with package $3 (version $4). Undo the effects of + # "prerm remove in-favour $3 $4". + : + + ;; + abort-deconfigure) + if test "$2" != in-favour || test "$5" != removing; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 0 + fi + # Back out of an attempt to deconfigure this package, which was + # due to package $6 (version $7) which we depend on being removed + # to make way for package $3 (version $4). Undo the effects of + # "prerm deconfigure in-favour $3 $4 removing $6 $7". + : + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac + +# Install doc base documentation +##:if which install-docs >/dev/null 2>&1; then +##: if [ -e /usr/share/doc-base/${package_name} ]; then +##: install-docs -i /usr/share/doc-base/${package_name} +##: fi +##:fi + +exit 0 --- libsemanage-2.0.39.orig/debian/conffiles +++ libsemanage-2.0.39/debian/conffiles @@ -0,0 +1 @@ +/etc/selinux/semanage.conf --- libsemanage-2.0.39.orig/debian/local-vars.mk +++ libsemanage-2.0.39/debian/local-vars.mk @@ -0,0 +1,80 @@ +############################ -*- Mode: Makefile -*- ########################### +## local-vars.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Sat Nov 15 10:43:00 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Sat Aug 12 02:07:40 2006 +## Last Machine Used: glaurung.internal.golden-gryphon.com +## Update Count : 25 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : +## +## arch-tag: 1a76a87e-7af5-424a-a30d-61660c8f243e +## +############################################################################### + +FILES_TO_CLEAN = debian/files debian/substvars substvars.utils src/semanageswig_ruby_wrap.lo \ + src/_rubysemanage.so +STAMPS_TO_CLEAN = +DIRS_TO_CLEAN = debian/stamp + +# Location of the source dir +SRCTOP := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) +TMPTOP = $(SRCTOP)/debian/$(package) +LINTIANDIR = $(TMPTOP)/usr/share/lintian/overrides + +PREFIX = /usr +BINDIR = $(TMPTOP)$(PREFIX)/bin +LIBDIR = $(TMPTOP)/usr/lib +INCLUDE = $(TMPTOP)$(PREFIX)/include +INCDIR = $(INCLUDE)/semanage +ETCDIR = $(TMPTOP)/etc/selinux + +MANDIR = $(TMPTOP)/usr/share/man/ +MAN1DIR = $(TMPTOP)/usr/share/man/man1 +MAN3DIR = $(TMPTOP)/usr/share/man/man3 +MAN5DIR = $(TMPTOP)/usr/share/man/man5 +MAN7DIR = $(TMPTOP)/usr/share/man/man7 +MAN8DIR = $(TMPTOP)/usr/share/man/man8 +INFODIR = $(TMPTOP)/usr/share/info +DOCTOP = $(TMPTOP)/usr/share/doc +DOCDIR = $(DOCTOP)/$(package) +COMMA = , + +PY_SUPPORT_DIR=$(LIBDIR)/python-support/$(package) + +PY_VERSIONS =>= 2.4 +PYDEFAULT =$(strip $(shell pyversions -vd)) +ALL_PY_VERSIONS:=$(sort $(shell pyversions -vr)) +MIN_PY_VERSIONS:=$(firstword $(sort $(shell pyversions -vr))) +MAX_PY_VERSIONS:=$(lastword $(sort $(shell pyversions -vr))) +STOP_VERSION :=$(shell perl -e '$$ARGV[0] =~ m/^(\d)\.(\d)/;$$maj=$$1;$$min=$$2 +1; print "$$maj.$$min\n";' $(MAX_PY_VERSIONS)) + +PY_VIRTUALS :=$(patsubst %,%-semanage$(strip $(COMMA)),$(sort $(shell pyversions -r))) +PY_PROVIDES :=$(strip $(shell pyversions -r | \ + perl -ple 's/(\d) p/$$1-semanage, p/g; s/$$/-semanage/')) + +MODULES_DIR=$(TMPTOP)/usr/share/python-support/$(package) +EXTENSIONS_DIR=$(TMPTOP)/usr/lib/python-support/$(package) +PYTHONLIBDIRTOP=/usr/lib/python-support/$(package) + +SWIGCOUT= semanageswig_wrap.c +SWIGLOBJ:= $(patsubst %.c,%.lo,$(SWIGCOUT)) +SWIGSO=_semanage.so + +RUBYLIBVER ?= $(shell ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")') +RUBYPLATFORM ?= $(shell ruby -e 'print RUBY_PLATFORM') +RUBYINC ?= $(TMPTOP)/usr/lib/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) +RUBYINSTALL ?= $(TMPTOP)/usr/lib/ruby/$(RUBYLIBVER)/$(RUBYPLATFORM) + + +define checkdir + @test -f debian/rules -a -f src/semanage.conf || \ + (echo Not in correct source directory; exit 1) +endef + +define checkroot + @test $$(id -u) = 0 || (echo need root priviledges; exit 1) +endef --- libsemanage-2.0.39.orig/debian/shlibs +++ libsemanage-2.0.39/debian/shlibs @@ -0,0 +1,2 @@ +# arch-tag: ed25b6f4-5d94-4d23-9018-7eb5ddbe4b44 +libsemanage 1 libsemanage1 (>= 2.0.33) --- libsemanage-2.0.39.orig/debian/changelog +++ libsemanage-2.0.39/debian/changelog @@ -0,0 +1,621 @@ +libsemanage (2.0.39-1) unstable; urgency=low + + * New upstream point release + + Change semodule upgrade behavior to install even if the module + is not present from Dan Walsh. + + Make genhomedircon trim excess '/' from homedirs from Dan Walsh. + + Fix persistent dontaudit support to rebuild policy if the + dontaudit state is changed from Chad Sellers. + The first change is nice, since now you may just isntall a policy + module using semodule, without having to check if the module was + already in policy (ie, no distinction between install/update) + * Bug fix: "/lib shlib links to /usr/lib shlib", thanks to Raphael + Geissert. Moved libsemanage to /usr/lib (Closes: #549610). + * Pass CC, CFLAGS, Ans LDFLAGS along when compiling the python bindings + (should help cross compilation) + + -- Manoj Srivastava Wed, 14 Oct 2009 00:45:52 -0500 + +libsemanage (2.0.36-2) unstable; urgency=low + + * First cut at providing symbols files. + * Check for extra libraries and shlib version numbers. Unless there is + a nocheck option in the deb build options variable, now we look to see + if there are extra libraries we have linked to. Might need to back + this out later, if this causes problems on the buildds. + + -- Manoj Srivastava Tue, 01 Sep 2009 23:30:27 -0500 + +libsemanage (2.0.36-1) unstable; urgency=low + + * New upstream point release + + Changed bzip-blocksize=0 handling to support existing compressed + modules in the store. + + Revert hard linking of files between tmp/active/previous. + + Enable configuration of bzip behavior from Stephen Smalley. + bzip-blocksize=0 to disable compression and decompression support. + bzip-blocksize=1..9 to set the blocksize for compression. + bzip-small=true to reduce memory usage for decompression. + * Also, make package build error out on non linux platforms for now. + + -- Manoj Srivastava Thu, 27 Aug 2009 12:52:52 -0500 + +libsemanage (2.0.33-2) unstable; urgency=low + + * Hmm. More timing issues with building in parallel. With the new + changes, the jobserver no longer seems disabled, which should take + care of this. In any case, I can't reproduce it even when building in + parallel now. + Bug fix: "FTBFS: <stdout>:496: error: expected expression at end + of input", thanks to Lucas Nussbaum (Closes: #542970). + + -- Manoj Srivastava Sat, 22 Aug 2009 17:19:53 -0500 + +libsemanage (2.0.33-1) unstable; urgency=low + + * New upstream release. + + Maintain disable dontaudit state from Christopher Pardy. + + -- Manoj Srivastava Fri, 14 Aug 2009 01:32:45 -0500 + +libsemanage (2.0.32-1) unstable; urgency=low + + * New upstream release + * [dee68bd]: [topic-debian]: Modify makefile to use installed versions + of libraries + * [97f1895]: [libsemanage]: Add a new package providing ruby bindings. + [c00b158]: [7641bb1]: Support for above. + + -- Manoj Srivastava Sat, 20 Jun 2009 12:41:35 -0500 + +libsemanage (2.0.31-1) unstable; urgency=low + + * New upstream release + + Policy module compression (bzip) support from Dan Walsh. + + Hard link files between tmp/active/previous from Dan Walsh. + + Add semanage_mls_enabled() interface from Stephen Smalley. + + Add USER to lines to homedir_template context file from Chris + PeBenito. + + allow fcontext and seuser changes without rebuilding the policy from + Dan Walsh + * [337fae6]: [libsemanage]: Added libbz2-dev as a build dependency + Updated the other version build depends, and the standards version. + + -- Manoj Srivastava Mon, 15 Jun 2009 14:01:31 -0500 + +libsemanage (2.0.27-1) unstable; urgency=low + + * New upstream release + + Modify genhomedircon to skip %groupname entries. + Ultimately we need to expand them to the list of users to support + per-role homedir labeling when using the %groupname syntax. + + Fix bug in genhomedircon fcontext matches logic from Dan Walsh. + Strip any trailing slash before appending /*$. + + -- Manoj Srivastava Wed, 11 Feb 2009 11:57:17 -0600 + +libsemanage (2.0.25-3) unstable; urgency=high + + * [bab6644]: Also check for the uppoer bound on user ids in login.defs + + Some non-Debian packages (like qmail, shudder) create + users not below MIN_UID, but above MAX_UID, in /etc/login.defs + (non-system users are supposed to have uids between MIN_UID and + MAX_UID. + + genhomedircon.c:gethomedirs() checks pwent.pw_uid against MIN_UID in + /etc/login.defs to exclude system users from generating homedir + contexts. But unfortunately it does not check it against MAX_UID + setting from the same file. This gets us lines like the following in + the contexts/files/file_contexts.homedirs file: + ,---- + | # + | # Home Context for user user_u + | # + | /var/qmail/[^/]*/.+ user_u:object_r:user_home_t:s0 + | /var/qmail/[^/]*/\.ssh(/.*)? user_u:object_r:user_home_ssh_t:s0 + | /var/qmail/[^/]*/\.gnupg(/.+)? user_u:object_r:user_gpg_secret_t:s0 + | /var/qmail/[^/]* -d user_u:object_r:user_home_dir_t:s0 + | /var/qmail/lost\+found/.* <> + | /var/qmail -d system_u:object_r:home_root_t:s0 + | /var/qmail/\.journal <> + | /var/qmail/lost\+found -d system_u:object_r:lost_found_t:s0 + | /tmp/gconfd-.* -d user_u:object_r:user_tmp_t:s0 + `---- + This commit adds checking uid value againt MAX_UID too. + + Bug fix: "login.defs:MAX_UID have no effect on generating list of + valid users, but MIN_UID does have.", thanks to root + (Closes: #510134). + + -- Manoj Srivastava Mon, 05 Jan 2009 16:53:48 -0600 + +libsemanage (2.0.25-2) unstable; urgency=high + + * Bug fix: "Python errors during upgrade", thanks to Frans Pop. This is + a serious bug. (Closes: #499023). + + -- Manoj Srivastava Tue, 16 Sep 2008 01:24:25 -0500 + +libsemanage (2.0.25-1) unstable; urgency=low + + * Non-maintainer upload. + * New version needed for the latest policy. + + -- Russell Coker Sat, 12 Jul 2008 00:09:33 +1000 + +libsemanage (2.0.24-2) unstable; urgency=low + + * Record the new location of the repository for this package (moved to a + new git repository) + * Move to the new, make -j friendly targets in debian/rules. + * Bug fix: "python-semanage: depends on python2.4 *and python2.5", + thanks to Jean-Charles Bagneris I have no idea why that happened, but + it seems to have gone away now. (Closes: #476799). + + -- Manoj Srivastava Sun, 01 Jun 2008 12:29:22 -0500 + +libsemanage (2.0.24-1) unstable; urgency=low + + * New upstream release + * make swigify + * Use vfork rather than fork for libsemanage helpers to reduce memory + overhead as suggested by Todd Miller. + * Free policydb before fork from Joshua Brindle. + * Drop the base module immediately after expanding to permit memory + re-use from Stephen Smalley. + * Use sepol_set_expand_consume_base to reduce peak memory usage when + using semodule from Joshua Brindle. + * Fix genhomedircon to not override a file context with a homedir + context from Todd Miller. + * Fix spurious out of memory error reports. + * Merged second version of fix for genhomedircon handling from Caleb Case. + * Merged fix for genhomedircon handling of missing HOME_DIR or + HOME_ROOT templates from Caleb Case. + * Fix genhomedircon handling of shells and missing user context + template from Dan Walsh. + * Copy the store path in semanage_select_store from Dan Walsh. + * Call rmdir() rather than remove() on directory removal so that errno + isn't polluted from Stephen Smalley. + * Allow handle_unknown in base to be overridden by semanage.conf from + Stephen Smalley. + * ustr cleanups from James Antill. + * Ensure that /root gets labeled even if using the default context + from Dan Walsh. + * Fix ordering of file_contexts.homedirs from Todd Miller and Dan Walsh. + * Fix error checking on getpw*_r functions from Todd Miller. + * Make genhomedircon skip invalid homedir contexts from Todd Miller. + * Set default user and prefix from seusers from Dan Walsh. + * Add swigify Makefile target from Dan Walsh. + + -- Manoj Srivastava Tue, 18 Mar 2008 01:12:13 -0500 + +libsemanage (2.0.9-2) unstable; urgency=low + + * Add swig to build dependencies. Closes: #465053 + + -- Manoj Srivastava Thu, 21 Feb 2008 11:58:40 -0600 + +libsemanage (2.0.9-1) unstable; urgency=low + + * New upstream release + * Pass CFLAGS to CC even on link command, per Dennis Gilmore. + * Clear errno on non-fatal errors to avoid reporting them upon a + later error that does not set errno. + * Improve reporting of system errors, e.g. full filesystem or + read-only filesystem from Stephen Smalley. + * Change to use getpw* function calls to the _r versions from Todd Miller. + * Replace genhomedircon script with equivalent functionality within + libsemanage and introduce disable-genhomedircon option in + semanage.conf from Todd Miller. + Note: Depends on ustr. + * Allow dontaudits to be turned off via semanage interface when + updating policy from Joshua Brindle. + * The changes cause an shlib bump. Also, update build dependencies. + + -- Manoj Srivastava Wed, 06 Feb 2008 13:42:27 -0600 + +libsemanage (2.0.3-1) unstable; urgency=low + + * New upstream SVN HEAD + + Merged optimizations from Stephen Smalley. + - do not set all booleans upon commit, only those whose values have + changed + - only install the sandbox upon commit if something was rebuilt + + Fix to libsemanage man patches so whatis will work better from Dan + Walsh + + -- Manoj Srivastava Sun, 6 May 2007 17:26:26 -0500 + +libsemanage (2.0.1-1) unstable; urgency=low + + * New upstream release. This is the trunk, or development, version. + * Merged Makefile test target patch from Caleb Case. + * Merged get_commit_number function rename patch from Caleb Case. + * Merged strnlen -> strlen patch from Todd Miller. + * Merged dbase_file_flush patch from Dan Walsh. This removes any + mention of specific tools (e.g. semanage) from the comment header of + the auto-generated files, since there are multiple front-end tools. + + -- Manoj Srivastava Thu, 19 Apr 2007 17:20:26 -0500 + +libsemanage (1.10.3-1) unstable; urgency=low + + * New upstream release + * Merged dbase_file_flush patch from Dan Walsh. + This removes any mention of specific tools (e.g. semanage) + from the comment header of the auto-generated files, + since there are multiple front-end tools. + * Merged Makefile test target patch from Caleb Case. + * Merged get_commit_number function rename patch from Caleb Case. + * Merged strnlen -> strlen patch from Todd Miller. + * Merged python binding fix from Dan Walsh. + * Updated version for stable branch. + * Merged patch to optionally reduce disk usage by removing + the backup module store and linked policy from Karl MacMillan + * Merged patch to correctly propagate return values in libsemanage + * Merged patch to compile wit -fPIC instead of -fpic from + Manoj Srivastava to prevent hitting the global offest table + limit. Patch changed to include libselinux and libsemanage in + addition to libsepol. + * Added XS-VCS-Arch and XS-VCS-Browse to debian/control + * Bumped shlibs, and reset depends for the latest version + + -- Manoj Srivastava Thu, 19 Apr 2007 00:13:33 -0500 + +libsemanage (1.8-1) unstable; urgency=low + + * New upstream release + * Merged patch to skip reload if no active store exists and the store + path doesn't match the active store path from Dan Walsh. + * Merged patch to not destroy sepol handle on error path of connect + from James Athey. + * Merged patch to add genhomedircon path to semanage.conf from James + Athey. + * Updated version for release. + * Bug fix: "'Conflicts: python2.4-semanage' has incorrect version", + thanks to Max Bowsher (Closes: #391596). + + -- Manoj Srivastava Fri, 20 Oct 2006 13:21:59 -0500 + +libsemanage (1.6.16-3) unstable; urgency=low + + * Set the policy version compiled to version 20, the highest supported + by kernel version 2.6.17, which is the latest currently released one. + (Closes: #386928) + + -- Manoj Srivastava Tue, 12 Sep 2006 03:09:04 -0500 + +libsemanage (1.6.16-2) unstable; urgency=low + + * Update with new builddepends, to compile with the newest libsepol + + -- Manoj Srivastava Mon, 11 Sep 2006 15:57:58 -0500 + +libsemanage (1.6.16-1) unstable; urgency=low + + * New upstream point release + * Make most copy errors fatal, but allow exceptions for + file_contexts.local, seusers, and netfilter_contexts if the source + file does not exist in the store. + * Add md5sums + * Bug fix: "libsemanage: .version file for python package + (python-semanage) contains spaces", thanks to Rudolph Pereira + (Closes: #385098). + + -- Manoj Srivastava Thu, 7 Sep 2006 01:02:45 -0500 + +libsemanage (1.6.15-2) unstable; urgency=low + + * Fix wrong directory the extensions were installed in. + * Bug fix: "python-semanage: Description says "Python2.4 + bindings" but it's both 2.3 and 2.4", thanks to Erich Schubert + (Closes: #382878). + + -- Manoj Srivastava Tue, 15 Aug 2006 00:32:55 -0500 + +libsemanage (1.6.15-1) unstable; urgency=low + + * New upstream point release + * Merged separate local file contexts patch from Chris PeBenito. + * Merged patch to make most copy errors non-fatal from Dan Walsh. + + -- Manoj Srivastava Sun, 13 Aug 2006 00:36:51 -0500 + +libsemanage (1.6.13-1) unstable; urgency=low + + * New upstream point release + * Merged netfilter contexts support from Chris PeBenito. + * Moved the package over to the new python policy. This means that the old + python2.4-semanage package is now a virtual package, and now we provide + python packages for all supported versions of python, determining the + depends and the provides relationships of the python package + dynamically. The build depends has been changed to acoomodate it. The + package uses the python-support utility to help with byte compilation + and other modules handling. (Closes: #380865) + * Python transition (#2): you are building a private python module ! + * Bug fix: "setup.py file for building the python extension", thanks to + Matthias Klose. Thanks for the hint about -z,defs; however, I have + elected to stick close to the upstream Makefile and not use setup.py. + (Closes: #382581). + + -- Manoj Srivastava Sat, 12 Aug 2006 01:05:45 -0500 + +libsemanage (1.6.12-1) unstable; urgency=low + + * New upstream point release + * Merged support for read operations on read-only fs from + Caleb Case (Tresys Technology). + * Lindent. + * Merged setfiles location check patch from Dan Walsh. + * Merged several fixes from Serge Hallyn: + dbase_file_cache: deref of uninit data on error path. + dbase_policydb_cache: clear fp to avoid double fclose + semanage_fc_sort: destroy temp on error paths + * Updated default location for setfiles to /sbin to + match policycoreutils. This can also be adjusted via + semanage.conf using the syntax: + [setfiles] + path = /path/to/setfiles + args = -q -c $@ $< + [end] + * Merged fix warnings patch from Karl MacMillan. + * Merged updated file context sorting patch from Christopher + Ashworth, with bug fix for escaped character flag. + * Merged file context sorting code from Christopher Ashworth + (Tresys Technology), based on fc_sort.c code in refpolicy. + * Merged python binding t_output_helper removal patch from Dan Walsh. + * Regenerated swig files. + * Merged corrected fix for descriptor leak from Dan Walsh. + * Merged Makefile PYLIBVER definition patch from Dan Walsh. + * Merged man page reorganization from Ivan Gyurdiev. + + -- Manoj Srivastava Wed, 19 Jul 2006 17:46:54 -0500 + +libsemanage (1.6-1) unstable; urgency=low + + * New upstream release + * Updated version for release. + * Merged abort early on merge errors patch from Ivan Gyurdiev. + * Cleaned up error handling in semanage_split_fc based on a patch + by Serge Hallyn (IBM) and suggestions by Ivan Gyurdiev. + * Merged MLS handling fixes from Ivan Gyurdiev. + * Merged bug fix for fcontext validate handler from Ivan Gyurdiev. + * Merged base_merge_components changes from Ivan Gyurdiev. + * Merged paths array patch from Ivan Gyurdiev. + * Merged bug fix patch from Ivan Gyurdiev. + * Merged improve bindings patch from Ivan Gyurdiev. + * Merged use PyList patch from Ivan Gyurdiev. + * Merged memory leak fix patch from Ivan Gyurdiev. + * Merged nodecon support patch from Ivan Gyurdiev. + * Merged cleanups patch from Ivan Gyurdiev. + * Merged split swig patch from Ivan Gyurdiev. + * Merged optionals in base patch from Joshua Brindle. + * Merged treat seusers/users_extra as optional sections patch from + Ivan Gyurdiev. + * Merged parse_optional fixes from Ivan Gyurdiev. + * Merged seuser/user_extra support patch from Joshua Brindle. + * Merged remote system dbase patch from Ivan Gyurdiev. + * Merged clone record on set_con patch from Ivan Gyurdiev. + * Merged fname parameter patch from Ivan Gyurdiev. + * Merged more size_t -> unsigned int fixes from Ivan Gyurdiev. + * Merged seusers.system patch from Ivan Gyurdiev. + * Merged improve port/fcontext API patch from Ivan Gyurdiev. + * Merged seuser -> seuser_local rename patch from Ivan Gyurdiev. + * Merged set_create_store, access_check, and is_connected interfaces + from Joshua Brindle. + * Regenerate python wrappers. + * Merged pywrap Makefile diff from Dan Walsh. + * Merged cache management patch from Ivan Gyurdiev. + * Merged bugfix for dbase_llist_clear from Ivan Gyurdiev. + * Merged remove apply_local function patch from Ivan Gyurdiev. + * Merged only do read locking in direct case patch from Ivan Gyurdiev. + * Merged cache error path memory leak fix from Ivan Gyurdiev. + * Merged auto-generated file header patch from Ivan Gyurdiev. + * Merged pywrap test update from Ivan Gyurdiev. + * Merged hidden defs update from Ivan Gyurdiev. + * Merged disallow port overlap patch from Ivan Gyurdiev. + * Merged join prereq and implementation patches from Ivan Gyurdiev. + * Merged join user extra data part 2 patch from Ivan Gyurdiev. + * Merged bugfix patch from Ivan Gyurdiev. + * Merged remove add_local/set_local patch from Ivan Gyurdiev. + * Merged user extra data part 1 patch from Ivan Gyurdiev. + * Merged size_t -> unsigned int patch from Ivan Gyurdiev. + * Merged calloc check in semanage_store patch from Ivan Gyurdiev, + bug noticed by Steve Grubb. + * Merged cleanups after add/set removal patch from Ivan Gyurdiev. + * Merged fcontext compare fix from Ivan Gyurdiev. + * Fixed commit to return the commit number aka policy sequence number. + * Merged const in APIs patch from Ivan Gyurdiev. + * Merged validation of local file contexts patch from Ivan Gyurdiev. + * Merged compare2 function patch from Ivan Gyurdiev. + * Merged hidden def/proto update patch from Ivan Gyurdiev. + * Re-applied string and file optimization patch from Russell Coker, + with bug fix. + * Reverted string and file optimization patch from Russell Coker. + * Clarified error messages from parse_module_headers and + parse_base_headers for base/module mismatches. + * Merged string and file optimization patch from Russell Coker. + * Merged swig header reordering patch from Ivan Gyurdiev. + * Merged toggle modify on add patch from Ivan Gyurdiev. + * Merged ports parser bugfix patch from Ivan Gyurdiev. + * Merged fcontext swig patch from Ivan Gyurdiev. + * Merged remove add/modify/delete for active booleans patch from Ivan Gyurdiev. + * Merged man pages for dbase functions patch from Ivan Gyurdiev. + * Merged pywrap tests patch from Ivan Gyurdiev. + + -- Manoj Srivastava Wed, 22 Mar 2006 23:34:44 -0600 + +libsemanage (1.4-4) unstable; urgency=low + + * Bug fix: "python2.4-semanage: Cannot be installed. Conflicting file + with libsemanage-dev", thanks to Tomasz Rybak (Closes: #348050). + + -- Manoj Srivastava Mon, 23 Jan 2006 13:49:56 -0600 + +libsemanage (1.4-3) unstable; urgency=low + + * Split out python2.4-semanage into a separate package, since the python + bindings should not be in a -dev package. + + -- Manoj Srivastava Sun, 1 Jan 2006 09:19:05 -0600 + +libsemanage (1.4-2) unstable; urgency=low + + * Fix dependencies to facilitate backports. + * Bug fix: "libsemanage: Build dependencies shouldn't contain debian + revision numbers", thanks to Erich Schubert (Closes: #345461). + + -- Manoj Srivastava Sat, 31 Dec 2005 14:01:41 -0600 + +libsemanage (1.4-1) unstable; urgency=low + + * New upstream release + * Updated version for release. + * Changed semanage_handle_create() to set do_reload based on + is_selinux_enabled(). This prevents improper attempts to + load policy on a non-SELinux system. + * Dropped handle from user_del_role interface. + * Removed defrole interfaces. + * Merged Makefile python definitions patch from Dan Walsh. + * Removed is_selinux_mls_enabled() conditionals in seusers and users + file parsers. + * Merged wrap char*** for user_get_roles patch from Joshua Brindle. + * Merged remove defrole from sepol patch from Ivan Gyurdiev. + * Merged swig wrappers for modifying users and seusers from Joshua Brindle. + * Fixed free->key_free bug. + * Merged clear obsolete patch from Ivan Gyurdiev. + * Merged modified swigify patch from Dan Walsh + (original patch from Joshua Brindle). + * Merged move genhomedircon call patch from Chad Sellers. + * Merged move seuser validation patch from Ivan Gyurdiev. + * Merged hidden declaration fixes from Ivan Gyurdiev, + with minor corrections. + * Merged cleanup patch from Ivan Gyurdiev. + This renames semanage_module_conn to semanage_direct_handle, + and moves sepol handle create/destroy into semanage handle + create/destroy to allow use even when disconnected (for the + record interfaces). + * Clear modules modified flag upon disconnect and commit. + * Added tracking of module modifications and use it to + determine whether expand-time checks should be applied + on commit. + * Reverted semanage_set_reload_bools() interface. + * Disabled calls to port dbase for merge and commit and stubbed + out calls to sepol_port interfaces since they are not exported. + * Merged rename instead of copy patch from Joshua Brindle (Tresys). + * Added hidden_def/hidden_proto for exported symbols used within + libsemanage to eliminate relocations. Wrapped type definitions + in exported headers as needed to avoid conflicts. Added + src/context_internal.h and src/iface_internal.h. + * Added semanage_is_managed() interface to allow detection of whether + the policy is managed via libsemanage. This enables proper handling + in setsebool for non-managed systems. + * Merged semanage_set_reload_bools() interface from Ivan Gyurdiev, + to enable runtime control over preserving active boolean values + versus reloading their saved settings upon commit. + * Merged seuser parser resync, dbase tracking and cleanup, strtol + bug, copyright, and assert space patches from Ivan Gyurdiev. + * Added src/*_internal.h in preparation for other changes. + * Added hidden/hidden_proto/hidden_def to src/debug.[hc] and + src/seusers.[hc]. + * Merged interface parse/print, context_to_string interface change, + move assert_noeof, and order preserving patches from Ivan Gyurdiev. + * Added src/dso.h in preparation for other changes. + * Merged install seusers, handle/error messages, MLS parsing, + and seusers validation patches from Ivan Gyurdiev. + * Merged record interface, dbase flush, common database code, + and record bugfix patches from Ivan Gyurdiev. + * Merged dbase policydb list and count change from Ivan Gyurdiev. + * Merged enable dbase and set relay patches from Ivan Gyurdiev. + * Merged query APIs and dbase_file_set patches from Ivan Gyurdiev. + * Merged sepol handle passing, seusers support, and policydb cache + patches from Ivan Gyurdiev. + * Merged resync to sepol changes and booleans fixes/improvements + patches from Ivan Gyurdiev. + * Merged support for genhomedircon/homedir template, store selection, + explicit policy reload, and semanage.conf relocation from Joshua + Brindle. + * Merged resync to sepol changes and transaction fix patches from + Ivan Gyurdiev. + * Merged reorganize users patch from Ivan Gyurdiev. + * Merged remove unused relay functions patch from Ivan Gyurdiev. + * Fixed policy file leaks in semanage_load_module and + semanage_write_module. + * Merged further database work from Ivan Gyurdiev. + * Fixed bug in semanage_direct_disconnect. + * Merged interface renaming patch from Ivan Gyurdiev. + * Merged policy component patch from Ivan Gyurdiev. + * Renamed 'check=' configuration value to 'expand-check=' for + clarity. + * Changed semanage_commit_sandbox to check for and report errors + on rename(2) calls performed during rollback. + * Added optional check= configuration value to semanage.conf + and updated call to sepol_expand_module to pass its value + to control assertion and hierarchy checking on module expansion. + * Merged fixes for make DESTDIR= builds from Joshua Brindle. + * Merged default database from Ivan Gyurdiev. + * Merged removal of connect requirement in policydb backend from + Ivan Gyurdiev. + * Merged commit locking fix and lock rename from Joshua Brindle. + * Merged transaction rollback in lock patch from Joshua Brindle. + * Changed default args for load_policy to be null, as it no longer + takes a pathname argument and we want to preserve booleans. + * Merged move local dbase initialization patch from Ivan Gyurdiev. + * Merged acquire/release read lock in databases patch from Ivan Gyurdiev. + * Merged rename direct -> policydb as appropriate patch from Ivan Gyurdiev. + * Added calls to sepol_policy_file_set_handle interface prior + to invoking sepol operations on policy files. + * Updated call to sepol_policydb_from_image to pass the handle. + * Merged user and port APIs - policy database patch from Ivan + Gyurdiev. + * Converted calls to sepol link_packages and expand_module interfaces + from using buffers to using sepol handles for error reporting, and + changed direct_connect/disconnect to create/destroy sepol handles. + * Merged bugfix patch from Ivan Gyurdiev. + * Merged seuser database patch from Ivan Gyurdiev. + Merged direct user/port databases to the handle from Ivan Gyurdiev. + * Removed obsolete include/semanage/commit_api.h (leftover). + Merged seuser record patch from Ivan Gyurdiev. + * Merged boolean and interface databases from Ivan Gyurdiev. + * Updated to use get interfaces for hidden sepol_module_package type. + * Changed semanage_expand_sandbox and semanage_install_active + to generate/install the latest policy version supported by libsepol + by default (unless overridden by semanage.conf), since libselinux + will now downgrade automatically for load_policy. + * Merged new callback-based error reporting system and ongoing + database work from Ivan Gyurdiev. + * Fixed semanage_install_active() to use the same logic for + selecting a policy version as semanage_expand_sandbox(). Dropped + dead code from semanage_install_sandbox(). + * Updated for changes to libsepol, and to only use types and interfaces + provided by the shared libsepol. + * Merged further database work from Ivan Gyurdiev. + * Merged iterate, redistribute, and dbase split patches from + Ivan Gyurdiev. + * Merged patch series from Ivan Gyurdiev. + (pointer typedef elimination, file renames, dbase work, backend + separation) + * Split interfaces from semanage.[hc] into handle.[hc], modules.[hc]. + * Separated handle create from connect interface. + * Added a constructor for initialization. + * Moved up src/include/*.h to src. + * Created a symbol map file; dropped dso.h and hidden markings. + * Merged major update to libsemanage organization and functionality + from Karl MacMillan (Tresys). + * Merged dbase redesign patch from Ivan Gyurdiev. + * Merged boolean record, stub record handler, and status codes + patches from Ivan Gyurdiev. + * Merged stub iterator functionality from Ivan Gyurdiev. + * Merged interface record patch from Ivan Gyurdiev. + * Merged stub functionality for managing user and port records, + and record table code from Ivan Gyurdiev. + + -- Manoj Srivastava Sun, 11 Dec 2005 00:53:26 -0600 + +libsemanage (1.2-1) unstable; urgency=low + + * New package. + + -- Manoj Srivastava Wed, 14 Sep 2005 23:21:42 -0500 + --- libsemanage-2.0.39.orig/debian/local.mk +++ libsemanage-2.0.39/debian/local.mk @@ -0,0 +1,246 @@ +############################ -*- Mode: Makefile -*- ########################### +## local.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Sat Nov 15 10:42:10 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Tue Sep 1 23:29:47 2009 +## Last Machine Used: anzu.internal.golden-gryphon.com +## Update Count : 61 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : +## +## arch-tag: b07b1015-30ba-4b46-915f-78c776a808f4 +## +############################################################################### + +testdir: + $(testdir) + +debian/stamp/BUILD/libsemanage1: debian/stamp/build/libsemanage1 +debian/stamp/INST/libsemanage1: debian/stamp/install/libsemanage1 +debian/stamp/BIN/libsemanage1: debian/stamp/binary/libsemanage1 + +debian/stamp/INST/libsemanage1-dev: debian/stamp/install/libsemanage1-dev +debian/stamp/BIN/libsemanage1-dev: debian/stamp/binary/libsemanage1-dev + +debian/stamp/INST/python-semanage: debian/stamp/install/python-semanage +debian/stamp/BIN/python-semanage: debian/stamp/binary/python-semanage + +debian/stamp/BUILD/libsemanage-ruby1.8: debian/stamp/build/libsemanage-ruby1.8 +debian/stamp/INST/libsemanage-ruby1.8: debian/stamp/install/libsemanage-ruby1.8 +debian/stamp/BIN/libsemanage-ruby1.8: debian/stamp/binary/libsemanage-ruby1.8 + + +CLN-common:: + $(REASON) + -test ! -f Makefile || $(MAKE) $(NUMJOBS) clean + +CLEAN/libsemanage1-dev:: + test ! -d $(TMPTOP) || rm -rf $(TMPTOP) + +CLEAN/libsemanage1:: + test ! -d $(TMPTOP) || rm -rf $(TMPTOP) + +CLEAN/python-semanage:: + test ! -d $(TMPTOP) || rm -rf $(TMPTOP) + +CLEAN/libsemanage-ruby1.8:: + test ! -d $(TMPTOP) || rm -rf $(TMPTOP) + +debian/stamp/build/libsemanage1: + $(checkdir) + $(REASON) + @test -d debian/stamp/build || mkdir -p debian/stamp/build + $(MAKE) $(NUMJOBS) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" all + $(check-libraries) +ifeq (,$(strip $(filter nocheck,$(DEB_BUILD_OPTIONS)))) + ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + $(SHELL) debian/common/get_shlib_ver + endif +endif + @echo done > $@ + +debian/stamp/build/libsemanage-ruby1.8: + $(checkdir) + $(REASON) + @test -d debian/stamp/build || mkdir -p debian/stamp/build + $(MAKE) $(NUMJOBS) -C src CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" rubywrap + $(check-libraries) + @echo done > $@ + +debian/stamp/install/libsemanage1: + $(checkdir) + $(REASON) + $(TESTROOT) + rm -rf $(TMPTOP) + $(make_directory) $(TMPTOP) + $(make_directory) $(DOCDIR) + $(make_directory) $(LIBDIR) + $(MAKE) $(NUMJOBS) DESTDIR=$(TMPTOP) -C src install + chmod 0644 $(LIBDIR)/libsemanage.so.1 + rm -f $(LIBDIR)/libsemanage.so + rm -f $(LIBDIR)/libsemanage.a + $(install_file) debian/changelog $(DOCDIR)/changelog.Debian + $(install_file) ChangeLog $(DOCDIR)/changelog + gzip -9fqr $(DOCDIR)/ +# Make sure the copyright file is not compressed + $(install_file) debian/copyright $(DOCDIR)/copyright + $(strip-lib) + @test -d debian/stamp/install || mkdir -p debian/stamp/install + @echo done > $@ + + +debian/stamp/install/libsemanage1-dev: + $(checkdir) + $(REASON) + $(TESTROOT) + rm -rf $(TMPTOP) + $(make_directory) $(TMPTOP) + $(make_directory) $(DOCDIR) + $(make_directory) $(LIBDIR) + $(make_directory) $(INCDIR) + $(make_directory) $(ETCDIR) + $(MAKE) $(NUMJOBS) DESTDIR=$(TMPTOP) install + mv $(ETCDIR)/semanage.conf $(DOCDIR)/ + rm -rf $(TMPTOP)/etc + rm -f $(LIBDIR)/libsemanage.so.1 $(LIBDIR)/libsemanage.so + ln -s libsemanage.so.1 $(LIBDIR)/libsemanage.so + $(install_file) debian/changelog $(DOCDIR)/changelog.Debian + $(install_file) ChangeLog $(DOCDIR)/changelog + gzip -9fqr $(DOCDIR)/ + gzip -9fqr $(MANDIR)/ +# Make sure the copyright file is not compressed + $(install_file) debian/copyright $(DOCDIR)/copyright + $(strip-exec) + $(strip-lib) + @test -d debian/stamp/install || mkdir -p debian/stamp/install + @echo done > $@ + + +debian/stamp/install/python-semanage: + $(checkdir) + $(REASON) + $(TESTROOT) + rm -rf $(TMPTOP) + $(make_directory) $(TMPTOP) + $(make_directory) $(DOCDIR) + $(make_directory) $(LIBDIR) + $(make_directory) $(PY_SUPPORT_DIR) + $(make_directory) $(MODULES_DIR) + $(make_directory) $(EXTENSIONS_DIR) + for version in $(ALL_PY_VERSIONS); do \ + rm -f src/$(SWIGSO) src/$(SWIGLOBJ); \ + test -d $(EXTENSIONS_DIR)/python$$version || \ + mkdir -p $(EXTENSIONS_DIR)/python$$version/site-packages; \ + $(MAKE) -C src DESTDIR=$(TMPTOP) PYLIBVER=python$$version \ + PYLIBDIR=$(EXTENSIONS_DIR)/python$$version \ + CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \ + $(NUMJOBS) pywrap install-pywrap; \ + chmod -x $(EXTENSIONS_DIR)/python$$version/site-packages/*; \ + mv -f $(EXTENSIONS_DIR)/python$$version/site-packages/*.py \ + $(MODULES_DIR)/; \ + mv -f $(EXTENSIONS_DIR)/python$$version/site-packages/* \ + $(EXTENSIONS_DIR)/python$$version/; \ + rmdir $(EXTENSIONS_DIR)/python$$version/site-packages; \ + if [ -z "$$versions" ]; then versions="$$version"; \ + else versions="$$versions,$$version"; \ + fi; \ + done; echo "$$versions" > $(MODULES_DIR)/.version + $(install_file) debian/changelog $(DOCDIR)/changelog.Debian + $(install_file) ChangeLog $(DOCDIR)/changelog + gzip -9fqr $(DOCDIR)/ +# Make sure the copyright file is not compressed + $(install_file) debian/copyright $(DOCDIR)/copyright + $(strip-lib) + @test -d debian/stamp/install || mkdir -p debian/stamp/install + @echo done > $@ + +debian/stamp/install/libsemanage-ruby1.8: + $(checkdir) + $(REASON) + $(TESTROOT) + rm -rf $(TMPTOP) + $(make_directory) $(TMPTOP) + $(make_directory) $(DOCDIR) + $(make_directory) $(RUBYINSTALL) + $(MAKE) -C src $(NUMJOBS) DESTDIR=$(TMPTOP) RUBYINSTALL=$(RUBYINSTALL) install-rubywrap; + $(install_file) debian/changelog $(DOCDIR)/changelog.Debian + $(install_file) ChangeLog $(DOCDIR)/changelog + gzip -9fqr $(DOCDIR)/ +# Make sure the copyright file is not compressed + $(install_file) debian/copyright $(DOCDIR)/copyright + $(strip-lib) + @test -d debian/stamp/install || mkdir -p debian/stamp/install + @echo done > $@ + +debian/stamp/binary/libsemanage1: + $(checkdir) + $(REASON) + $(TESTROOT) + $(make_directory) $(TMPTOP)/DEBIAN + $(install_script) debian/postrm $(TMPTOP)/DEBIAN/postrm + $(install_script) debian/postinst $(TMPTOP)/DEBIAN/postinst + $(install_file) debian/shlibs $(TMPTOP)/DEBIAN + $(install_file) debian/conffiles $(TMPTOP)/DEBIAN + dpkg-gensymbols -p$(package) -P$(TMPTOP) -c4 + $(get-shlib-deps) + dpkg-gencontrol -p$(package) -isp -P$(TMPTOP) + $(create_md5sum) $(TMPTOP) + chown -R root:root $(TMPTOP) + chmod -R u+w,go=rX $(TMPTOP) + dpkg --build $(TMPTOP) .. + @test -d debian/stamp/binary || mkdir -p debian/stamp/binary + @echo done > $@ + +debian/stamp/binary/python-semanage: + $(checkdir) + $(REASON) + $(TESTROOT) + $(make_directory) $(TMPTOP)/DEBIAN + $(install_script) debian/python_prerm $(TMPTOP)/DEBIAN/prerm + $(install_script) debian/python_postinst $(TMPTOP)/DEBIAN/postinst + $(get-shlib-deps) + if dpkg --compare-versions $(MIN_PY_VERSIONS) le $(PYDEFAULT); then \ + echo 'python:Depends=python (>= $(MIN_PY_VERSIONS)), python (<< $(STOP_VERSION))' >> debian/substvars; \ + else \ + echo 'python:Depends=python (>= $(MIN_PY_VERSIONS)) | python$(MIN_PY_VERSIONS), python (<< $(STOP_VERSION))'\ + >> debian/substvars; \ + fi + echo 'python:Provides=$(PY_PROVIDES)' >> debian/substvars + dpkg-gencontrol -p$(package) -isp -P$(TMPTOP) + $(create_md5sum) $(TMPTOP) + chown -R root:root $(TMPTOP) + chmod -R u+w,go=rX $(TMPTOP) + dpkg --build $(TMPTOP) .. + @test -d debian/stamp/binary || mkdir -p debian/stamp/binary + @echo done > $@ + +debian/stamp/binary/libsemanage1-dev: + $(checkdir) + $(REASON) + $(TESTROOT) + $(make_directory) $(TMPTOP)/DEBIAN + dpkg-gencontrol -p$(package) -isp -P$(TMPTOP) + $(create_md5sum) $(TMPTOP) + chown -R root:root $(TMPTOP) + chmod -R u+w,go=rX $(TMPTOP) + dpkg --build $(TMPTOP) .. + @test -d debian/stamp/binary || mkdir -p debian/stamp/binary + @echo done > $@ + +debian/stamp/binary/libsemanage-ruby1.8: + $(checkdir) + $(REASON) + $(TESTROOT) + $(make_directory) $(TMPTOP)/DEBIAN + $(get-shlib-deps) + dpkg-gencontrol -p$(package) -isp -P$(TMPTOP) + find $(TMPTOP) -type f -name \*.so -exec chmod 0644 {} \; + $(create_md5sum) $(TMPTOP) + chown -R root:root $(TMPTOP) + chmod -R u+w,go=rX $(TMPTOP) + dpkg --build $(TMPTOP) .. + @test -d debian/stamp/binary || mkdir -p debian/stamp/binary + @echo done > $@ --- libsemanage-2.0.39.orig/debian/python_postinst +++ libsemanage-2.0.39/debian/python_postinst @@ -0,0 +1,221 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# postinst --- +# Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +# Created On : Fri Nov 14 11:25:07 2003 +# Created On Node : glaurung.green-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Wed Aug 9 22:54:49 2006 +# Last Machine Used: glaurung.internal.golden-gryphon.com +# Update Count : 16 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: 8c502749-1a6e-44fb-a655-48b21e245130 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# + +# Abort if any command returns an error value +set -e + +package_name=python-semanage + +if [ -z "$package_name" ]; then + print >&2 "Internal Error. Please report a bug." + exit 1; +fi + +# This script is called as the last step of the installation of the +# package. All the package's files are in place, dpkg has already done +# its automatic conffile handling, and all the packages we depend of +# are already fully installed and configured. +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +# The following idempotent stuff doesn't generally need protecting +# against being run in the abort-* cases. + +# Install info files into the dir file +##: install-info --quiet --section "section pattern" "Section Title" \ +##: --description="Name of the document" /usr/info/${package_name}.info + +# Create stub directories under /usr/local +##: if test ! -d /usr/local/lib/${package_name}; then +##: if test ! -d /usr/local/lib; then +##: if mkdir /usr/local/lib; then +##: chown root.staff /usr/local/lib || true +##: chmod 2775 /usr/local/lib || true +##: fi +##: fi +##: if mkdir /usr/local/lib/${package_name}; then +##: chown root.staff /usr/local/lib/${package_name} || true +##: chmod 2775 /usr/local/lib/${package_name} || true +##: fi +##: fi + +# Ensure the menu system is updated +##: [ ! -x /usr/bin/update-menus ] || /usr/bin/update-menus + +# Arrange for a daemon to be started at system boot time +##: update-rc.d ${package_name} default >/dev/null + +case "$1" in + configure) + # Configure this package. If the package must prompt the user for + # information, do it here. + # Install emacs lisp files + ##:if [ -x /usr/lib/emacsen-common/emacs-package-install ]; then + ##: /usr/lib/emacsen-common/emacs-package-install $package_name + ##:fi + + + # Activate menu-methods script + ##: chmod a+x /etc/menu-methods/${package_name} + + # Update ld.so cache + #ldconfig + + if which update-python-modules >/dev/null 2>&1; then + update-python-modules -i /usr/share/python-support/${package_name} + fi + + # Make our version of a program available + ##: update-alternatives \ + ##: --install /usr/bin/program program /usr/bin/alternative 50 \ + ##: --slave /usr/man/man1/program.1.gz program.1.gz \ + ##: /usr/man/man1/alternative.1.gz + + # Tell ucf that the file in /usr/share/foo is the latest + # maintainer version, and let it handle how to manage the real + # confuguration file in /etc. This is how a static configuration + # file can be handled: + ##:if which ucf >/dev/null 2>&1; then + ##: ucf /usr/share/${package_name}/configuration /etc/${package_name}.conf + ##:fi + + ### We could also do this on the fly. The following is from Tore + ### Anderson: + + #. /usr/share/debconf/confmodule + + ### find out what the user answered. + # db_get foo/run_on_boot + # run_on_boot=$RET + # db_stop + + ### safely create a temporary file to generate our suggested + ### configuration file. + # tempfile=`tempfile` + # cat << _eof > $tempfile + ### Configuration file for Foo. + + ### this was answered by you, the user in a debconf dialogue + # RUNONBOOT=$run_on_boot + + ### this was not, as it has a sane default value. + # COLOUROFSKY=blue + + #_eof + + ### Note that some versions of debconf do not release stdin, so + ### the following invocation of ucf may not work, since the stdin + ### is never coneected to ucfr. + + ### now, invoke ucf, which will take care of the rest, and ask + ### the user if he wants to update his file, if it is modified. + #ucf $tempfile /etc/foo.conf + + ### done! now we'll just clear up our cruft. + #rm -f $tempfile + + + + # There are three sub-cases: + if test "${2+set}" != set; then + # We're being installed by an ancient dpkg which doesn't remember + # which version was most recently configured, or even whether + # there is a most recently configured version. + : + + elif test -z "$2" || test "$2" = ""; then + # The package has not ever been configured on this system, or was + # purged since it was last configured. + : + + else + # Version $2 is the most recently configured version of this + # package. + : + + fi ;; + abort-upgrade) + # Back out of an attempt to upgrade this package FROM THIS VERSION + # to version $2. Undo the effects of "prerm upgrade $2". + : + + ;; + abort-remove) + if test "$2" != in-favour; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 0 + fi + # Back out of an attempt to remove this package, which was due to + # a conflict with package $3 (version $4). Undo the effects of + # "prerm remove in-favour $3 $4". + : + + ;; + abort-deconfigure) + if test "$2" != in-favour || test "$5" != removing; then + echo "$0: undocumented call to \`postinst $*'" 1>&2 + exit 0 + fi + # Back out of an attempt to deconfigure this package, which was + # due to package $6 (version $7) which we depend on being removed + # to make way for package $3 (version $4). Undo the effects of + # "prerm deconfigure in-favour $3 $4 removing $6 $7". + : + + ;; + *) echo "$0: didn't understand being called with \`$1'" 1>&2 + exit 0;; +esac + +# Install doc base documentation +##:if which install-docs >/dev/null 2>&1; then +##: if [ -e /usr/share/doc-base/${package_name} ]; then +##: install-docs -i /usr/share/doc-base/${package_name} +##: fi +##:fi + +exit 0 --- libsemanage-2.0.39.orig/debian/common/targets.mk +++ libsemanage-2.0.39/debian/common/targets.mk @@ -0,0 +1,525 @@ +############################ -*- Mode: Makefile -*- ########################### +## targets.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Sat Nov 15 01:10:05 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Sat Apr 26 22:33:09 2008 +## Last Machine Used: anzu.internal.golden-gryphon.com +## Update Count : 131 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : The top level targets mandated by policy, as well as +## their dependencies. +## +## arch-tag: a81086a7-00f7-4355-ac56-8f38396935f4 +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +## +############################################################################### + +####################################################################### +####################################################################### +############### Miscellaneous ############### +####################################################################### +####################################################################### +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +define TESTROOT + @test $$(id -u) = 0 || (echo need root priviledges; exit 1) +endef + +testroot: + $(TESTROOT) + +checkpo: + $(CHECKPO) + +# arch-buildpackage likes to call this +prebuild: + +# OK. We have two sets of rules here, one for arch dependent packages, +# and one for arch independent packages. We have already calculated a +# list of each of these packages. + +# In each set, we may need to do things in five steps: configure, +# build, install, package, and clean. Now, there can be a common +# actions to be taken for all the packages, all arch dependent +# packages, all all independent packages, and each package +# individually at each stage. + +########################################################################### +# The current code does a number of things: It ensures that the highest # +# dependency at any stage (usually the -Common target) depends on the # +# stamp-STAGE of the previous stage; so no work on a succeeding stage can # +# start before the previous stage is all done. # +########################################################################### + +################################################################################# +# In the following, the do_* targets make sure all the real non-generic work is # +# done, but are not in the direct line of dependencies. This makes sure # +# that previous step in the order is all up to date before any of the per # +# package target dependencies are run. # +################################################################################# + + +####################################################################### +####################################################################### +############### Configuration ############### +####################################################################### +####################################################################### +# Just a dummy target to make sure that the stamp directory exists +debian/stamp/dummy-config-common: + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +# Configuration tasks common to arch and arch indep packages go here +debian/stamp/pre-config-common: debian/stamp/dummy-config-common + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +# Do not add dependencies to this rule +debian/stamp/do-pre-config-common: debian/stamp/dummy-config-common + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/pre-config-common + @echo done > $@ + +# Arch specific and arch independent tasks go here +debian/stamp/pre-config-arch: debian/stamp/do-pre-config-common + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +# Do not add dependencies to this rule +debian/stamp/do-pre-config-arch: debian/stamp/do-pre-config-common + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/pre-config-arch + @echo done > $@ + + +debian/stamp/pre-config-indep: debian/stamp/do-pre-config-common + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +# Do not add dependencies to this rule +debian/stamp/do-pre-config-indep: debian/stamp/do-pre-config-common + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/pre-config-indep + @echo done > $@ + +# Per package work happens as an added dependency of this rule. +$(patsubst %,debian/stamp/CONFIG/%,$(DEB_ARCH_PACKAGES)) : debian/stamp/CONFIG/% : debian/stamp/do-pre-config-arch + $(REASON) + $(checkdir) + @test -d debian/stamp/CONFIG || mkdir -p debian/stamp/CONFIG + @echo done > $@ +$(patsubst %,debian/stamp/CONFIG/%,$(DEB_INDEP_PACKAGES)) : debian/stamp/CONFIG/% : debian/stamp/do-pre-config-indep + $(REASON) + $(checkdir) + @test -d debian/stamp/CONFIG || mkdir -p debian/stamp/CONFIG + @echo done > $@ + +# Do not add dependencies to this rule +debian/stamp/dep-configure-arch: debian/stamp/do-pre-config-arch $(patsubst %,debian/stamp/CONFIG/%,$(DEB_ARCH_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +# Do not add dependencies to this rule +debian/stamp/dep-configure-indep: debian/stamp/do-pre-config-indep $(patsubst %,debian/stamp/CONFIG/%,$(DEB_INDEP_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +debian/stamp/do-configure-arch: debian/stamp/do-pre-config-arch + $(REASON) + @test -d debian/stamp/CONFIG || mkdir -p debian/stamp/CONFIG + $(MAKE) -f debian/rules debian/stamp/dep-configure-arch + @echo done > $@ +debian/stamp/do-configure-indep: debian/stamp/do-pre-config-indep + $(REASON) + @test -d debian/stamp/CONFIG || mkdir -p debian/stamp/CONFIG + $(MAKE) -f debian/rules debian/stamp/dep-configure-indep + @echo done > $@ + +# These three targets are required by policy +configure-arch: debian/stamp/do-configure-arch + $(REASON) +configure-indep: debian/stamp/do-configure-indep + $(REASON) +configure: debian/stamp/do-configure-arch debian/stamp/do-configure-indep + $(REASON) + +####################################################################### +####################################################################### +############### Build ############### +####################################################################### +####################################################################### +# tasks common to arch and arch indep packages go here +debian/stamp/pre-build-common: + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +# Arch specific and arch independent tasks go here +debian/stamp/pre-build-arch: debian/stamp/do-configure-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-pre-build-arch: debian/stamp/do-configure-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @test -e debian/stamp/pre-build-common || $(MAKE) -f debian/rules debian/stamp/pre-build-common + $(MAKE) -f debian/rules debian/stamp/pre-build-arch + @echo done > $@ + +debian/stamp/pre-build-indep: debian/stamp/do-configure-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-pre-build-indep: debian/stamp/do-configure-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @test -e debian/stamp/pre-build-common || $(MAKE) -f debian/rules debian/stamp/pre-build-common + $(MAKE) -f debian/rules debian/stamp/pre-build-indep + @echo done > $@ + +# Per package work happens as an added dependency of this rule. +$(patsubst %,debian/stamp/BUILD/%,$(DEB_ARCH_PACKAGES)) : debian/stamp/BUILD/% : debian/stamp/do-pre-build-arch + $(REASON) + $(checkdir) + @test -d debian/stamp/BUILD || mkdir -p debian/stamp/BUILD + @echo done > $@ + +$(patsubst %,debian/stamp/BUILD/%,$(DEB_INDEP_PACKAGES)) : debian/stamp/BUILD/% : debian/stamp/do-pre-build-indep + $(REASON) + $(checkdir) + @test -d debian/stamp/BUILD || mkdir -p debian/stamp/BUILD + @echo done > $@ + +# These do targeta make sure all the per package configuration is +# done, but is not in the direct line of dependencies. This makes sure +# that pre-config targets are all up to date before any of the per +# package target dependencies are run. +debian/stamp/dep-build-arch: debian/stamp/do-pre-build-arch $(patsubst %,debian/stamp/BUILD/%,$(DEB_ARCH_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +debian/stamp/dep-build-indep: debian/stamp/do-pre-build-indep $(patsubst %,debian/stamp/BUILD/%,$(DEB_INDEP_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +debian/stamp/do-build-arch: debian/stamp/do-pre-build-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/dep-build-arch + @echo done > $@ +debian/stamp/do-build-indep: debian/stamp/do-pre-build-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/dep-build-indep + @echo done > $@ + +# required +build-arch: debian/stamp/do-build-arch + $(REASON) +build-indep: debian/stamp/do-build-indep + $(REASON) +build: debian/stamp/do-build-arch debian/stamp/do-build-indep + $(REASON) + +# Work here +debian/stamp/post-build-arch: debian/stamp/do-build-arch + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-post-build-arch: debian/stamp/do-build-arch + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/post-build-arch + @echo done > $@ + +debian/stamp/post-build-indep: debian/stamp/do-build-indep + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-post-build-indep: debian/stamp/do-build-indep + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/post-build-indep + @echo done > $@ + +####################################################################### +####################################################################### +############### Install ############### +####################################################################### +####################################################################### +# tasks common to arch and arch indep packages go here +debian/stamp/pre-inst-common: + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +# Arch specific and arch independent tasks go here +debian/stamp/pre-inst-arch: debian/stamp/do-post-build-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-pre-inst-arch: debian/stamp/do-post-build-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @test -e debian/stamp/INST-common || $(MAKE) -f debian/rules debian/stamp/pre-inst-common + $(MAKE) -f debian/rules debian/stamp/pre-inst-arch + @echo done > $@ + +debian/stamp/pre-inst-indep: debian/stamp/do-post-build-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-pre-inst-indep: debian/stamp/do-post-build-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @test -e debian/stamp/INST-common || $(MAKE) -f debian/rules debian/stamp/pre-inst-common + $(MAKE) -f debian/rules debian/stamp/pre-inst-indep + @echo done > $@ + + +# Per package work happens as an added dependency of this rule +$(patsubst %,debian/stamp/INST/%,$(DEB_ARCH_PACKAGES)) : debian/stamp/INST/% : debian/stamp/do-pre-inst-arch + $(REASON) + $(checkdir) + @test -d debian/stamp/INST || mkdir -p debian/stamp/INST + @echo done > $@ +$(patsubst %,debian/stamp/INST/%,$(DEB_INDEP_PACKAGES)) : debian/stamp/INST/% : debian/stamp/do-pre-inst-indep + $(REASON) + $(checkdir) + @test -d debian/stamp/INST || mkdir -p debian/stamp/INST + @echo done > $@ + +# These do targeta make sure all the per package configuration is +# done, but is not in the direct line of dependencies. This makes sure +# that pre-config targets are all up to date before any of the per +# package target dependencies are run. +debian/stamp/dep-install-arch: debian/stamp/do-pre-inst-arch $(patsubst %,debian/stamp/INST/%,$(DEB_ARCH_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +debian/stamp/dep-install-indep: debian/stamp/do-pre-inst-indep $(patsubst %,debian/stamp/INST/%,$(DEB_INDEP_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + + +debian/stamp/do-install-arch: debian/stamp/do-pre-inst-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/dep-install-arch + @echo done > $@ +debian/stamp/do-install-indep: debian/stamp/do-pre-inst-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/dep-install-indep + @echo done > $@ + +#required +install-arch: debian/stamp/do-install-arch + $(REASON) + $(TESTROOT) +install-indep: debian/stamp/do-install-indep + $(REASON) + $(TESTROOT) +install: debian/stamp/do-install-arch debian/stamp/do-install-indep + $(REASON) + $(TESTROOT) + +####################################################################### +####################################################################### +############### Package ############### +####################################################################### +####################################################################### +# tasks common to arch and arch indep packages go here +debian/stamp/pre-bin-common: + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +# Arch specific and arch independent tasks go here +debian/stamp/pre-bin-arch: debian/stamp/do-install-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-pre-bin-arch: debian/stamp/do-install-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @test -e debian/stamp/BIN-common || $(MAKE) -f debian/rules debian/stamp/pre-bin-common + $(MAKE) -f debian/rules debian/stamp/pre-bin-arch + @echo done > $@ + +debian/stamp/pre-bin-indep: debian/stamp/do-install-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ +debian/stamp/do-pre-bin-indep: debian/stamp/do-install-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + @test -e debian/stamp/BIN-common || $(MAKE) -f debian/rules debian/stamp/pre-bin-common + $(MAKE) -f debian/rules debian/stamp/pre-bin-indep + @echo done > $@ + +# Per package work happens as an added dependency of this rule +$(patsubst %,debian/stamp/BIN/%,$(DEB_ARCH_PACKAGES)) : debian/stamp/BIN/% : debian/stamp/do-pre-bin-arch + $(REASON) + $(checkdir) + @test -d debian/stamp/BIN || mkdir -p debian/stamp/BIN + @echo done > $@ + +$(patsubst %,debian/stamp/BIN/%,$(DEB_INDEP_PACKAGES)) : debian/stamp/BIN/% : debian/stamp/do-pre-bin-indep + $(REASON) + $(checkdir) + @test -d debian/stamp/BIN || mkdir -p debian/stamp/BIN + @echo done > $@ + +# These do targeta make sure all the per package work is done, but is +# not in the direct line of dependencies. This makes sure that +# pre-config targets are all up to date before any of the per package +# target dependencies are run. +debian/stamp/dep-binary-arch: debian/stamp/pre-bin-arch $(patsubst %,debian/stamp/BIN/%,$(DEB_ARCH_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +debian/stamp/dep-binary-indep: debian/stamp/pre-bin-indep $(patsubst %,debian/stamp/BIN/%,$(DEB_INDEP_PACKAGES)) + $(REASON) + @test -d debian/stamp || mkdir -p debian/stamp + @echo done > $@ + +debian/stamp/do-binary-arch: debian/stamp/do-pre-bin-arch + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/dep-binary-arch + @echo done > $@ +debian/stamp/do-binary-indep: debian/stamp/do-pre-bin-indep + $(REASON) + $(checkdir) + @test -d debian/stamp || mkdir -p debian/stamp + $(MAKE) -f debian/rules debian/stamp/dep-binary-indep + @echo done > $@ +# required +binary-arch: debian/stamp/do-binary-arch + $(REASON) + $(TESTROOT) +binary-indep: debian/stamp/do-binary-indep + $(REASON) + $(TESTROOT) +binary: debian/stamp/do-binary-arch debian/stamp/do-binary-indep + $(REASON) + $(TESTROOT) + @echo arch package = $(DEB_ARCH_PACKAGES) + @echo indep packages = $(DEB_INDEP_PACKAGES) + +####################################################################### +####################################################################### +############### Clean ############### +####################################################################### +####################################################################### +# Work here +CLN-common:: + $(REASON) + $(checkdir) + +# sync Work here +CLN-arch:: CLN-common + $(REASON) + $(checkdir) +CLN-indep:: CLN-common + $(REASON) + $(checkdir) +# Work here +$(patsubst %,CLEAN/%,$(DEB_ARCH_PACKAGES)) :: CLEAN/% : CLN-arch + $(REASON) + $(checkdir) +$(patsubst %,CLEAN/%,$(DEB_INDEP_PACKAGES)) :: CLEAN/% : CLN-indep + $(REASON) + $(checkdir) + +clean-arch: CLN-arch $(patsubst %,CLEAN/%,$(DEB_ARCH_PACKAGES)) + $(REASON) +clean-indep: CLN-indep $(patsubst %,CLEAN/%,$(DEB_INDEP_PACKAGES)) + $(REASON) +clean: clean-indep clean-arch + $(REASON) + -test -f Makefile && $(MAKE) distclean + -rm -f $(FILES_TO_CLEAN) $(STAMPS_TO_CLEAN) + -rm -rf $(DIRS_TO_CLEAN) debian/stamp + -rm -f core TAGS \ + `find . ! -regex '.*/\.git/.*' ! -regex '.*/\{arch\}/.*' \ + ! -regex '.*/CVS/.*' ! -regex '.*/\.arch-ids/.*' \ + ! -regex '.*/\.svn/.*' \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' -o \ + -name '*.bak' -o -name '#*#' -o -name '.*.orig' -o \ + -name '.*.rej' -o -name '.SUMS' \) \ + -print` + + +####################################################################### +####################################################################### +############### ############### +####################################################################### +####################################################################### +.PHONY: configure-arch configure-indep configure \ + build-arch build-indep build \ + install-arch install-indep install \ + binary-arch binary-indep binary \ + CLN-common CLN-indep CLN-arch clean-arch clean-indep clean \ + $(patsubst %,CLEAN/%, $(DEB_INDEP_PACKAGES)) $(patsubst %,CLEAN/%, $(DEB_ARCH_PACKAGES)) \ + implode explode prebuild checkpo + + +#Local variables: +#mode: makefile +#End: --- libsemanage-2.0.39.orig/debian/common/install_cmds.mk +++ libsemanage-2.0.39/debian/common/install_cmds.mk @@ -0,0 +1,58 @@ +######################### -*- Mode: Makefile-Gmake -*- ######################## +## install_cmds.mk --- +## Author : Manoj Srivastava ( srivasta@golden-gryphon.com ) +## Created On : Fri Jun 16 14:40:20 2006 +## Created On Node : glaurung.internal.golden-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Wed Sep 6 11:43:05 2006 +## Last Machine Used: glaurung.internal.golden-gryphon.com +## Update Count : 9 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : +## +## arch-tag: a38b6a93-2539-4034-9060-ae94d5c8a071 +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## +############################################################################### + +# install commands +INSTALL = install +ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif +install_file = $(INSTALL) -p -o root -g root -m 644 +install_program = $(INSTALL) -p -o root -g root -m 755 +install_script = $(INSTALL) -p -o root -g root -m 755 +make_directory = $(INSTALL) -p -d -o root -g root -m 755 + +define create_md5sum + create_md5sums_fn () { \ + cd $$1 ; \ + find . -type f \ + ! -regex './DEBIAN/.*' \ + ! -regex './var/.*' $(EXTRA_MD5SUM_EXCLUDE) \ + -printf '%P\0' | xargs -r0 md5sum > DEBIAN/md5sums ; \ + if [ -z "DEBIAN/md5sums" ] ; then \ + rm -f "DEBIAN/md5sums" ; \ + fi ; \ + } ; \ + create_md5sums_fn +endef + +#Local variables: +#mode: makefile +#End: --- libsemanage-2.0.39.orig/debian/common/ChangeLog +++ libsemanage-2.0.39/debian/common/ChangeLog @@ -0,0 +1,59 @@ +2008-02-06 Manoj Srivastava + + * copt.mk: + srivasta@debian.org--lenny/skeleton-make-rules--main--0.1--patch-4 + The cross building support in Debian has been rewritten + to stop overriding the CC variable to $(MAKE) in order + to correctly support those packages that build internal + tools with the native compiler during the build. This + means that other packages that assume that CC will be + overridden by the cross-compiling build scripts now fail + to build. The patch is simply to set CC to + $(DEB_HOST_GNU_TYPE)-gcc only if a cross-build is + detected. + +2007-10-09 Manoj Srivastava + + * targets.mk: + srivasta@debian.org--lenny/skeleton-make-rules--main--0.1--patch-1 + fix dependency tree for targets, allow parralel + compilatoin. Many changes, thanks to dot. + +2007-09-20 Manoj Srivastava + + * targets.mk (stamp-clean): + srivasta@debian.org--lenny/skeleton-make-rules--main--0.1--base-0 + make clean not remove zero sized files. removed the part + that cleaned out zero sized files; since there are uses + for zero sized files (like, to nuke out files in + upstream sources and not inflate the diff. Any zero + sized files can still be nuked in the local.mk file. + +2006-10-02 Manoj Srivastava + + * checklibs: + srivasta@debian.org--etch/skeleton-make-rules--main--0.1--patch-15 + New file, to detect if there are unneeded library + dependencies + +2006-10-01 Manoj Srivastava + + * archvars.mk (doit): + srivasta@debian.org--etch/skeleton-make-rules--main--0.1--patch-14 + Add a macro to execute $(shell ...) macos verbosely to + help debugging. + +2006-09-15 Manoj Srivastava + + * targets.mk (stamp-clean): + srivasta@debian.org--etch/skeleton-make-rules--main--0.1--patch-13 + Exclude version control directories from the generic + clean command. + + +2006-08-23 Manoj Srivastava + + * pkgvars.mk (DEB_DISTRIBUTION): + srivasta@debian.org--etch/skeleton-make-rules--main--0.1--patch-6 + Add variable that contains the distribution information + --- libsemanage-2.0.39.orig/debian/common/targets.dot +++ libsemanage-2.0.39/debian/common/targets.dot @@ -0,0 +1,293 @@ +strict digraph Targets { + //ranksep=0.750; + //nodesep=0.500; + + // Nodes attributes: filled == Double-colon targt (most work is done here) + // Oval == Target based on a time stamp + // Octagon == Phony target + // Double lines denote a mandatory target (periperies=2) + + // Edge attributes: Dotted line indicates the target is called using $(MAKE) + + "debian/stamp/dummy-config-common" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-config-common" [ style="filled", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-config-common" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-config-arch" [ style="filled", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-config-arch" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-config-indep" [ style="filled", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-config-indep" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/CONFIG/foo-arch" [ style="filled", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/CONFIG/bar-indep" [ style="filled", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-configure-arch" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-configure-indep" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-configure-arch" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-configure-indep" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10] + "configure-arch" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "configure-indep" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "configure" [ style="bold", color="#DEE3FF", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + + "debian/stamp/pre-build-common" [ style="filled", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-build-arch" [ style="filled", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-build-arch" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-build-indep" [ style="filled", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-build-indep" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/BUILD/foo-arch" [ style="filled", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/BUILD/bar-indep" [ style="filled", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-build-arch" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-build-indep" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-build-arch" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-build-indep" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "build-arch" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10, shape="octagon", peripheries=2] + "build-indep" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10, shape="octagon", peripheries=2] + "build" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10, shape="octagon", peripheries=2] + "debian/stamp/post-build-arch" [ style="filled", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/post-build-indep" [ style="filled", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-post-build-arch" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-post-build-indep" [ style="bold", color="#74A5ED", fontcolor="NavyBlue", fontsize=10] + + "debian/stamp/pre-inst-common" [ style="filled", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-inst-arch" [ style="filled", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-inst-arch" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-inst-indep" [ style="filled", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-inst-indep" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/INST/foo-arch" [ style="filled", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/INST/bar-indep" [ style="filled", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-install-arch" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-install-indep" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-install-arch" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-install-indep" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10] + "install-arch" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "install-indep" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "install" [ style="bold", color="#F8DFDB", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + + "debian/stamp/pre-bin-common" [ style="filled", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-bin-arch" [ style="filled", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-bin-arch" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/pre-bin-indep" [ style="filled", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-pre-bin-indep" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/BIN/foo-arch" [ style="filled", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/BIN/bar-indep" [ style="filled", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-binary-arch" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/dep-binary-indep" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-binary-arch" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "debian/stamp/do-binary-indep" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10] + "binary-arch" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10, shape="octagon", peripheries=2] + "binary-indep" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10, shape="octagon", peripheries=2] + "binary" [ style="bold", color="#CEFFC0", fontcolor="NavyBlue", fontsize=10, shape="octagon", peripheries=2] + + + "CLN-common" [ style="filled" , color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "CLN-arch" [ style="filled" , color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "CLN-indep" [ style="filled" , color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "CLEAN/foo-arch" [ style="filled" , color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "CLEAN/bar-indep" [ style="filled" , color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "clean-arch" [ style="bold", color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "clean-indep" [ style="bold", color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon"] + "clean" [ style="bold", color="#E2E8C3", fontcolor="NavyBlue", fontsize=10, shape="octagon", peripheries=2] + + + "CLN-common" -> "CLN-arch" [dir=back] + "CLN-common" -> "CLN-indep" [dir=back] + "CLN-arch" -> "CLEAN/foo-arch" [dir=back] + "CLN-indep" -> "CLEAN/bar-indep" [dir=back] + "CLN-arch" -> "clean-arch" [dir=back] + "CLEAN/foo-arch" -> "clean-arch" [dir=back] + "CLN-indep" -> "clean-indep" [dir=back] + "CLEAN/bar-indep" -> "clean-indep" [dir=back] + "clean-indep" -> "clean" [dir=back] + "clean-arch" -> "clean" [dir=back] + +// "debian/stamp/dummy-config-common" -> "debian/stamp/pre-config-common" [dir=back] + "debian/stamp/dummy-config-common" -> "debian/stamp/do-pre-config-common" [dir=back] + "debian/stamp/pre-config-common" -> "debian/stamp/do-pre-config-common" [dir=back color="Red"] +// "CUSTOM-1" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-1" -> "debian/stamp/pre-config-common" [dir=back] +// "debian/stamp/do-pre-config-common" -> "debian/stamp/pre-config-arch" [dir=back] + "debian/stamp/do-pre-config-common" -> "debian/stamp/do-pre-config-arch" [dir=back] + "debian/stamp/pre-config-arch" -> "debian/stamp/do-pre-config-arch" [dir=back color="Red"] +// "CUSTOM-2" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-2" -> "debian/stamp/pre-config-arch" [dir=back] +// "debian/stamp/do-pre-config-common" -> "debian/stamp/pre-config-indep" [dir=back] + "debian/stamp/do-pre-config-common" -> "debian/stamp/do-pre-config-indep" [dir=back] + "debian/stamp/pre-config-indep" -> "debian/stamp/do-pre-config-indep" [dir=back color="Red"] +// "CUSTOM-3" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-3" -> "debian/stamp/pre-config-indep" [dir=back] +// "debian/stamp/do-pre-config-arch" -> "debian/stamp/CONFIG/foo-arch" [dir=back] +// "debian/stamp/do-pre-config-indep" -> "debian/stamp/CONFIG/bar-indep" [dir=back] +// "debian/stamp/do-pre-config-arch" -> "debian/stamp/dep-configure-arch" [dir=back] + "debian/stamp/CONFIG/foo-arch" -> "debian/stamp/dep-configure-arch" [dir=back] +// "debian/stamp/do-pre-config-indep" -> "debian/stamp/dep-configure-indep" [dir=back] + "debian/stamp/CONFIG/bar-indep" -> "debian/stamp/dep-configure-indep" [dir=back] + + "debian/stamp/do-pre-config-arch" -> "debian/stamp/do-configure-arch" [dir=back] + "debian/stamp/dep-configure-arch" -> "debian/stamp/do-configure-arch" [dir=back color="Red"] +// "CUSTOM-4" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-4" -> "debian/stamp/CONFIG/foo-arch" [dir=back] + "debian/stamp/do-pre-config-indep" -> "debian/stamp/do-configure-indep" [dir=back] + "debian/stamp/dep-configure-indep" -> "debian/stamp/do-configure-indep" [dir=back color="Red"] +// "CUSTOM-5" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-5" -> "debian/stamp/CONFIG/bar-indep" [dir=back] + "debian/stamp/do-configure-arch" -> "configure-arch" [dir=back] + "debian/stamp/do-configure-indep" -> "configure-indep" [dir=back] + "debian/stamp/do-configure-arch" -> "configure" [dir=back] + "debian/stamp/do-configure-indep" -> "configure" [dir=back] + +// "debian/stamp/do-configure-arch" -> "debian/stamp/pre-build-arch" [dir=back] + "debian/stamp/do-configure-arch" -> "debian/stamp/do-pre-build-arch" [dir=back] + "debian/stamp/pre-build-common" -> "debian/stamp/do-pre-build-arch" [dir=back color="Red"] +// "CUSTOM-6" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-6" -> "debian/stamp/pre-build-common" [dir=back] + "debian/stamp/pre-build-arch" -> "debian/stamp/do-pre-build-arch" [dir=back color="Red"] +// "CUSTOM-7" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-7" -> "debian/stamp/pre-build-arch" [dir=back] + "debian/stamp/pre-build-common" -> "debian/stamp/do-pre-build-indep" [dir=back color="Red"] + "debian/stamp/do-configure-indep" -> "debian/stamp/do-pre-build-indep" [dir=back] +// "debian/stamp/do-configure-indep" -> "debian/stamp/pre-build-indep" [dir=back] + "debian/stamp/pre-build-indep" -> "debian/stamp/do-pre-build-indep" [dir=back color="Red"] +// "CUSTOM-8" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-8" -> "debian/stamp/pre-build-indep" [dir=back] +// "debian/stamp/do-pre-build-arch" -> "debian/stamp/BUILD/foo-arch" [dir=back] +// "debian/stamp/do-pre-build-indep" -> "debian/stamp/BUILD/bar-indep" [dir=back] +// "debian/stamp/do-pre-build-arch" -> "debian/stamp/dep-build-arch" [dir=back] + "debian/stamp/BUILD/foo-arch" -> "debian/stamp/dep-build-arch" [dir=back] +// "debian/stamp/do-pre-build-indep" -> "debian/stamp/dep-build-indep" [dir=back] + "debian/stamp/BUILD/bar-indep" -> "debian/stamp/dep-build-indep" [dir=back] + "debian/stamp/do-pre-build-arch" -> "debian/stamp/do-build-arch" [dir=back] + "debian/stamp/dep-build-arch" -> "debian/stamp/do-build-arch" [dir=back color="Red"] +// "CUSTOM-9" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-9" -> "debian/stamp/BUILD/foo-arch" [dir=back] + "debian/stamp/do-pre-build-indep" -> "debian/stamp/do-build-indep" [dir=back] + "debian/stamp/dep-build-indep" -> "debian/stamp/do-build-indep" [dir=back color="Red"] +// "CUSTOM-10" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-10" -> "debian/stamp/BUILD/bar-indep" [dir=back] + "debian/stamp/do-build-arch" -> "build-arch" [dir=back] + "debian/stamp/do-build-indep" -> "build-indep" [dir=back] + "debian/stamp/do-build-arch" -> "build" [dir=back] + "debian/stamp/do-build-indep" -> "build" [dir=back] +// "debian/stamp/do-build-arch" -> "debian/stamp/post-build-arch" [dir=back] + "debian/stamp/do-build-arch" -> "debian/stamp/do-post-build-arch" [dir=back] + "debian/stamp/do-build-indep" -> "debian/stamp/do-post-build-indep" [dir=back] + "debian/stamp/post-build-arch" -> "debian/stamp/do-post-build-arch" [dir=back color="Red"] +// "CUSTOM-11" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-11" -> "debian/stamp/post-build-arch" [dir=back] + "debian/stamp/post-build-indep" -> "debian/stamp/do-post-build-indep" [dir=back color="Red"] +// "CUSTOM-12" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-12" -> "debian/stamp/post-build-indep" [dir=back] +// "debian/stamp/do-post-build-arch" -> "debian/stamp/pre-inst-arch" [dir=back] + "debian/stamp/pre-inst-common" -> "debian/stamp/do-pre-inst-arch" [dir=back color="Red"] +// "CUSTOM-13" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-13" -> "debian/stamp/pre-inst-common" [dir=back] + "debian/stamp/do-post-build-arch" -> "debian/stamp/do-pre-inst-arch" [dir=back] + "debian/stamp/pre-inst-arch" -> "debian/stamp/do-pre-inst-arch" [dir=back color="Red"] +// "CUSTOM-14" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-14" -> "debian/stamp/pre-inst-arch" [dir=back] +// "debian/stamp/do-post-build-indep" -> "debian/stamp/pre-inst-indep" [dir=back] + "debian/stamp/pre-inst-common" -> "debian/stamp/do-pre-inst-indep" [dir=back color="Red"] + "debian/stamp/do-post-build-indep" -> "debian/stamp/do-pre-inst-indep" [dir=back] + "debian/stamp/pre-inst-indep" -> "debian/stamp/do-pre-inst-indep" [dir=back color="Red"] +// "CUSTOM-15" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-15" -> "debian/stamp/pre-inst-indep" [dir=back] +// "debian/stamp/do-pre-inst-arch" -> "debian/stamp/INST/foo-arch" [dir=back] +// "debian/stamp/do-pre-inst-indep" -> "debian/stamp/INST/bar-indep" [dir=back] +// "debian/stamp/do-pre-inst-arch" -> "debian/stamp/dep-install-arch" [dir=back] + "debian/stamp/INST/foo-arch" -> "debian/stamp/dep-install-arch" [dir=back] +// "debian/stamp/do-pre-inst-indep" -> "debian/stamp/dep-install-indep" [dir=back] + "debian/stamp/INST/bar-indep" -> "debian/stamp/dep-install-indep" [dir=back] + "debian/stamp/do-pre-inst-arch" -> "debian/stamp/do-install-arch" [dir=back] + "debian/stamp/dep-install-arch" -> "debian/stamp/do-install-arch" [dir=back color="Red"] +// "CUSTOM-16" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-16" -> "debian/stamp/INST/foo-arch" [dir=back] + "debian/stamp/do-pre-inst-indep" -> "debian/stamp/do-install-indep" [dir=back] + "debian/stamp/dep-install-indep" -> "debian/stamp/do-install-indep" [dir=back color="Red"] +// "CUSTOM-17" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-17" -> "debian/stamp/INST/bar-indep" [dir=back] + "debian/stamp/do-install-arch" -> "install-arch" [dir=back] + "debian/stamp/do-install-indep" -> "install-indep" [dir=back] + "debian/stamp/do-install-arch" -> "install" [dir=back] + "debian/stamp/do-install-indep" -> "install" [dir=back] +// "debian/stamp/do-install-arch" -> "debian/stamp/pre-bin-arch" [dir=back] + "debian/stamp/do-install-arch" -> "debian/stamp/do-pre-bin-arch" [dir=back] + "debian/stamp/pre-bin-common" -> "debian/stamp/do-pre-bin-arch" [dir=back color="Red"] +// "CUSTOM-18" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-18" -> "debian/stamp/pre-bin-common" [dir=back] + "debian/stamp/pre-bin-arch" -> "debian/stamp/do-pre-bin-arch" [dir=back color="Red"] +// "CUSTOM-19" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-19" -> "debian/stamp/pre-bin-arch" [dir=back] +// "debian/stamp/do-install-indep" -> "debian/stamp/pre-bin-indep" [dir=back] + "debian/stamp/pre-bin-common" -> "debian/stamp/do-pre-bin-indep" [dir=back color="Red"] + "debian/stamp/do-install-indep" -> "debian/stamp/do-pre-bin-indep" [dir=back] + "debian/stamp/pre-bin-indep" -> "debian/stamp/do-pre-bin-indep" [dir=back color="Red"] +// "CUSTOM-20" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-20" -> "debian/stamp/pre-bin-indep" [dir=back] +// "debian/stamp/do-pre-bin-arch" -> "debian/stamp/BIN/foo-arch" [dir=back] +// "debian/stamp/do-pre-bin-indep" -> "debian/stamp/BIN/bar-indep" [dir=back] +// "debian/stamp/pre-bin-arch" -> "debian/stamp/dep-binary-arch" [dir=back] + "debian/stamp/BIN/foo-arch" -> "debian/stamp/dep-binary-arch" [dir=back] +// "debian/stamp/do-pre-bin-indep" -> "debian/stamp/dep-binary-indep" [dir=back] + "debian/stamp/BIN/bar-indep" -> "debian/stamp/dep-binary-indep" [dir=back] + "debian/stamp/do-pre-bin-arch" -> "debian/stamp/do-binary-arch" [dir=back] + "debian/stamp/dep-binary-arch" -> "debian/stamp/do-binary-arch" [dir=back color="Red"] +// "CUSTOM-21" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-21" -> "debian/stamp/BIN/foo-arch" [dir=back] + "debian/stamp/do-pre-bin-indep" -> "debian/stamp/do-binary-indep" [dir=back] + "debian/stamp/dep-binary-indep" -> "debian/stamp/do-binary-indep" [dir=back color="Red"] +// "CUSTOM-22" [ style="filled", color="#FFE4B5", fontcolor="NavyBlue", fontsize=10, shape="diamond"] +// "CUSTOM-22" -> "debian/stamp/BIN/bar-indep" [dir=back] + "debian/stamp/do-binary-arch" -> "binary-arch" [dir=back] + "debian/stamp/do-binary-indep" -> "binary-indep" [dir=back] + "debian/stamp/do-binary-arch" -> "binary" [dir=back] + "debian/stamp/do-binary-indep" -> "binary" [dir=back] + + + "debian/stamp/dummy-config-common" -> "debian/stamp/pre-config-common" [style="invis"] + "debian/stamp/do-pre-config-common" -> "debian/stamp/pre-config-arch" [style="invis"] + "debian/stamp/do-pre-config-common" -> "debian/stamp/pre-config-indep" [style="invis"] + "debian/stamp/do-pre-config-arch" -> "debian/stamp/CONFIG/foo-arch" [style="invis"] + "debian/stamp/do-pre-config-indep" -> "debian/stamp/CONFIG/bar-indep" [style="invis"] + + "debian/stamp/dep-configure-arch" -> "configure" [style="invis"] + "debian/stamp/dep-configure-indep" -> "configure" [style="invis"] + "debian/stamp/dep-configure-arch" -> "configure-arch" [style="invis"] + "debian/stamp/dep-configure-indep" -> "configure-arch" [style="invis"] + "debian/stamp/dep-configure-arch" -> "configure-indep" [style="invis"] + "debian/stamp/dep-configure-indep" -> "configure-indep" [style="invis"] + "configure-arch" -> "configure" [style="invis"] + "configure-indep" -> "configure" [style="invis"] + "configure" -> "debian/stamp/pre-build-common" [style="invis"] + + + "debian/stamp/pre-build-common" -> "debian/stamp/pre-build-indep" [style="invis"] + "debian/stamp/pre-build-common" -> "debian/stamp/pre-build-arch" [style="invis"] + + "debian/stamp/do-pre-build-arch" -> "debian/stamp/BUILD/foo-arch" [style="invis"] + "debian/stamp/do-pre-build-indep" -> "debian/stamp/BUILD/bar-indep" [style="invis"] + "debian/stamp/do-build-arch" -> "debian/stamp/post-build-arch" [style="invis"] + "debian/stamp/do-build-indep" -> "debian/stamp/post-build-indep" [style="invis"] + "debian/stamp/do-post-build-arch" -> "build-arch" [style="invis"] + "debian/stamp/do-post-build-arch" -> "build" [style="invis"] + "debian/stamp/do-post-build-indep" -> "build-indep" [style="invis"] + "debian/stamp/do-post-build-indep" -> "build" [style="invis"] + "build-arch" -> "build" [style="invis"] + "build-indep" -> "build" [style="invis"] + + "build" -> "debian/stamp/pre-inst-common" [style="invis"] + + "debian/stamp/pre-inst-common" -> "debian/stamp/pre-inst-indep" [style="invis"] + "debian/stamp/pre-inst-common" -> "debian/stamp/pre-inst-arch" [style="invis"] + "debian/stamp/do-pre-inst-arch" -> "debian/stamp/INST/foo-arch" [style="invis"] + "debian/stamp/do-pre-inst-indep" -> "debian/stamp/INST/bar-indep" [style="invis"] + + "install-arch" -> "install" [style="invis"] + "install-indep" -> "install" [style="invis"] + + "debian/stamp/pre-bin-common" -> "debian/stamp/pre-bin-indep" [style="invis"] + "debian/stamp/pre-bin-common" -> "debian/stamp/pre-bin-arch" [style="invis"] + + "install" -> "debian/stamp/pre-bin-common" [style="invis"] + "debian/stamp/do-pre-bin-arch" -> "debian/stamp/BIN/foo-arch" [style="invis"] + "debian/stamp/do-pre-bin-indep" -> "debian/stamp/BIN/bar-indep" [style="invis"] + + "binary-arch" -> "binary" [style="invis"] + "binary-indep" -> "binary" [style="invis"] + +} --- libsemanage-2.0.39.orig/debian/common/README +++ libsemanage-2.0.39/debian/common/README @@ -0,0 +1,78 @@ +# This file provides a quick overview of this build system. The idea is +# to convert ./debian/rules into a framework, which abstracts most of +# the work required to create a Debian package into this common set of +# make snippets. + +# The rules file would look like this: + +## Include dpkg-architecture generated variables +# This make snippet uses dpkg-architecture to set the various +# DEB_BUILD* and DEB_HOST* variables. It also adds a couple of DEBUG +# macros for use in the rules file. +include debian/common/archvars.mk + +## variables useful for perl packages +# This sets things like the installed location of the private lib, +# arch dependent lib, and vendor library directories. +include debian/common/perlvars.mk + +## Install commands +# This sets the convenience macros install_{file,script,program} and +# a make directory macro, all run as root, for the install and binary +# targets. It also includes a macro to create the md5sum for +# installed files. +include debian/common/install_cmds.mk + +## Per package variable settings. +# This file sets the Make variables on a per package basis. Things +# like include files, C, C++, and LD flags are set here, as well as +# installation paths or, really, anything else that would be needed +# during packaging operations +include debian/local-vars.mk + +## Setting C compiler flags. +# This file takes care of setting C compiler flags, setting the +# compiler if a cross compilation effort is detected, and either +# arranges for binaries to be stripped or not based on +# DEB_BUILD_OPTIONS. +include debian/common/copt.mk + +## Set automake configuration flags +# This file sets confflags variable with the proper --host and +# --build options if it detects a cross compilation effort underway. +include debian/common/automake.mk + +# Set up the default target. +all: + @echo nothing to be done + +## Include the common targets +# This file sets up the flow of control during a Debian package build +# process, taking into account policy requirements (mandatory +# targets, ordering targets). It sets up rules for each package found +# in ./debian/control file in the package, and arranges package build +# to follow the order of configuration, building, installation, and +# binary package creation (and of course, clean). + +# The details of the targets can be seen visually by running dot on +# the accompanying targets.dot file. In the figure, the legend is: +# Nodes attributes: +# filled == Work target (most work is done in dependencies added +# to these targets). These are the targets referred to +# in the local.mk file +# Octagon == Phony target +# Oval == Real target based on a time stamp +# Double lines denote a mandatory target +# +# Edge attributes: A Red line indicates the target is called using +# $(MAKE) -f ./debian/rules . So the targets connected by the +# red lines are run after all the dependencies have been updated, but +# before anything else is done. + +include debian/common/targets.mk + +## The bulk of packaging +# This file adds dependencies to the double-colon rules set up in +# targets.mk above, and perform the bulk of the packaging. +include debian/local.mk + --- libsemanage-2.0.39.orig/debian/common/pkgvars.mk +++ libsemanage-2.0.39/debian/common/pkgvars.mk @@ -0,0 +1,167 @@ +############################ -*- Mode: Makefile -*- ########################### +## pkgvars.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Sat Nov 15 02:56:30 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Thu Jun 15 12:05:46 2006 +## Last Machine Used: glaurung.internal.golden-gryphon.com +## Update Count : 11 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : This is what allows us toseparate out the top level +## targets, by determining which packages needto be built. +## +## arch-tag: 75fcc720-7389-4eaa-a7ac-c556d3eac331 +## +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## +############################################################################### + +# The maintainer information. +maintainer := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Maintainer: | \ + sed 's/^Maintainer: *//') +email := srivasta@debian.org + +# Priority of this version (or urgency, as dchanges would call it) +urgency := $(shell LC_ALL=C dpkg-parsechangelog | grep ^Urgency: | \ + sed 's/^Urgency: *//') + +# Common useful variables +DEB_SOURCE_PACKAGE := $(strip $(shell egrep '^Source: ' debian/control | \ + cut -f 2 -d ':')) +DEB_VERSION := $(strip $(shell LC_ALL=C dpkg-parsechangelog | \ + egrep '^Version:' | cut -f 2 -d ' ')) +DEB_ISNATIVE := $(strip $(shell LC_ALL=C dpkg-parsechangelog | \ + perl -ne 'print if (m/^Version:/g && ! m/^Version:.*\-/);')) +DEB_DISTRIBUTION := $(strip $(shell LC_ALL=C dpkg-parsechangelog | \ + egrep '^Distribution:' | cut -f 2 -d ' ')) + +DEB_PACKAGES := $(shell perl -e ' \ + $$/=""; \ + while(<>){ \ + $$p=$$1 if m/^Package:\s*(\S+)/; \ + die "duplicate package $$p" if $$seen{$$p}; \ + $$seen{$$p}++; print "$$p " if $$p; \ + }' debian/control ) + +DEB_INDEP_PACKAGES := $(shell perl -e ' \ + $$/=""; \ + while(<>){ \ + $$p=$$1 if m/^Package:\s*(\S+)/; \ + die "duplicate package $$p" if $$seen{$$p}; \ + $$seen{$$p}++; \ + $$a=$$1 if m/^Architecture:\s*(\S+)/m; \ + next unless ($$a eq "all"); \ + print "$$p " if $$p; \ + }' debian/control ) + +DEB_ARCH_PACKAGES := $(shell perl -e ' \ + $$/=""; \ + while(<>){ \ + $$p=$$1 if m/^Package:\s*(\S+)/; \ + die "duplicate package $$p" if $$seen{$$p}; \ + $$seen{$$p}++; \ + $$c=""; \ + if (/^Architecture:\s*(.*?)\s*$$/sm) { \ + @a = split /\s+/, $$1 }; \ + for my $$b (@a) { \ + next unless ($$b eq "$(DEB_HOST_ARCH)" || \ + $$b eq "any"); \ + $$c="$$p"; \ + } \ + print "$$c " if $$c; \ + }' debian/control ) + +# This package is what we get after removing the psuedo dirs we use in rules +package = $(notdir $@) + +ifeq (,$(filter parallel=%,$(FAILS_PARALLEL_BUILD))) + ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,-j%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + endif +endif + +# Define canned sequences used to strip executables and libraries, +# keeping in mind the directives in DEB_BUILD_OPTIONS +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) +define strip-exec +find $(TMPTOP) -type f | while read i; do \ + if file -b $$i | egrep -q "^ELF.*executable"; then \ + strip --strip-all --remove-section=.comment --remove-section=.note $$i; \ + fi; \ + done +endef + +define strip-lib +find $(TMPTOP) -type f | while read i; do \ + if file -b $$i | egrep -q "^ELF.*shared object"; then \ + strip --strip-unneeded --remove-section=.comment --remove-section=.note $$i; \ + fi; \ +done +endef +else +define strip-exec +@echo Not strippping executables as asked +endef + +define strip-lib +@echo Not strippping libraries as asked +endef + +endif + +# this canned command specifies how to run dpkg-shlibs to add things +# to debian/substvars by scanning executables and libraries; this +# should suffice for the common case. Some rules files might need some +# changes to the command sequence, though +define get-shlib-deps +k=`find $(TMPTOP) -type f | ( while read i; do \ + if file -b $$i | \ + egrep -q "^ELF.*(executable.*dynamically linked|shared object)"; then \ + j="$$j $$i"; \ + fi; \ +done; echo $$j; )`; if [ -n "$$k" ]; then dpkg-shlibdeps $$k; fi +endef + +# This canned sequence checks to see if all the libraries we link to +# actually provide some symbols needed by some executable ot library +# in the package itself. +ifeq (,$(strip $(filter nocheck,$(DEB_BUILD_OPTIONS)))) + ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) +define check-libraries +echo Checking libs +xtra=$$($(SHELL) debian/common/checklibs); \ +if [ -n "$$extra" ]; then \ + echo "Extra libraries: $$extra"; \ + exit 1; \ +fi +endef + else +define check-libraries +echo Not checking libs +endef + endif +else +define check-libraries +echo Not checking libs +endef +endif + + +#Local variables: +#mode: makefile +#End: --- libsemanage-2.0.39.orig/debian/common/copt.mk +++ libsemanage-2.0.39/debian/common/copt.mk @@ -0,0 +1,44 @@ +############################ -*- Mode: Makefile -*- ########################### +## copt.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Sat Nov 15 02:48:40 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Sat Nov 15 02:49:07 2003 +## Last Machine Used: glaurung.green-gryphon.com +## Update Count : 1 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : +## +## arch-tag: a0045c20-f1b3-4852-9a4b-1a33ebd7c1b8 +## +############################################################################### + +PREFIX := /usr +# set CC to $(DEB_HOST_GNU_TYPE)-gcc only if a cross-build is detected +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) + CC=$(DEB_HOST_GNU_TYPE)-gcc +else + CC = cc +endif + +# Policy 10.1 says to make this the default +CFLAGS = -Wall -g + +ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +## ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) +## endif + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIP += -s + LDFLAGS += -s + INT_INSTALL_TARGET = install +else + INT_INSTALL_TARGET = install +endif --- libsemanage-2.0.39.orig/debian/common/perlvars.mk +++ libsemanage-2.0.39/debian/common/perlvars.mk @@ -0,0 +1,27 @@ +############################ -*- Mode: Makefile -*- ########################### +## perlvars.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Sat Nov 15 02:55:47 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Sat Dec 13 13:50:58 2003 +## Last Machine Used: glaurung.green-gryphon.com +## Update Count : 3 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : +## +## arch-tag: a97a01ba-d08d-404d-aa81-572717c03e6c +## +############################################################################### + +# Perl variables +PERL = /usr/bin/perl + +INSTALLPRIVLIB = $(TMPTOP)/$(shell \ + perl -e 'use Config; print "$$Config{'installprivlib'}\n";') +INSTALLARCHLIB = $(TMPTOP)/$(shell \ + perl -e 'use Config; print "$$Config{'installarchlib'}\n";') +INSTALLVENDORLIB =$(TMPTOP)/$(shell \ + perl -e 'use Config; print "$$Config{'vendorlibexp'}\n";') +CONFIG = INSTALLDIRS=vendor --- libsemanage-2.0.39.orig/debian/common/archvars.mk +++ libsemanage-2.0.39/debian/common/archvars.mk @@ -0,0 +1,118 @@ +############################ -*- Mode: Makefile -*- ########################### +## archvars.mk --- +## Author : Manoj Srivastava ( srivasta@golden-gryphon.com ) +## Created On : Sat Nov 15 02:40:56 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Tue Nov 16 23:36:15 2004 +## Last Machine Used: glaurung.internal.golden-gryphon.com +## Update Count : 5 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : calls dpkg-architecture and sets up various arch +## related variables +## +## arch-tag: e16dd848-0fd6-4c0e-ae66-bef20d1f7c63 +## +## This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +## +############################################################################### + + +DPKG_ARCH := dpkg-architecture + +ifeq ($(strip $(KPKG_ARCH)),um) + MAKING_VIRTUAL_IMAGE:=YES +endif +ifeq ($(strip $(KPKG_ARCH)),xen) + MAKING_VIRTUAL_IMAGE:=YES +endif + +ifneq ($(strip $(CONFIG_UM)),) + MAKING_VIRTUAL_IMAGE:=YES + KPKG_ARCH=um +endif + +ifneq ($(strip $(CONFIG_XEN)),) + MAKING_VIRTUAL_IMAGE:=YES + ifneq ($(strip $(CONFIG_X86_XEN)$(CONFIG_X86_64_XEN)),) + KPKG_SUBARCH=xen + else + KPKG_ARCH=xen + ifeq ($(strip $(CONFIG_XEN_PRIVILEGED_GUEST)),) + KPKG_SUBARCH=xenu + else + KPKG_SUBARCH=xen0 + endif + endif +endif + +ifdef KPKG_ARCH + ifeq ($(strip $(MAKING_VIRTUAL_IMAGE)),) + ifneq ($(CROSS_COMPILE),-) + ha:=-a$(KPKG_ARCH) + endif + endif +endif + +# set the dpkg-architecture vars +export DEB_BUILD_ARCH := $(shell $(DPKG_ARCH) -qDEB_BUILD_ARCH) +export DEB_BUILD_GNU_CPU := $(shell $(DPKG_ARCH) -qDEB_BUILD_GNU_CPU) +export DEB_BUILD_GNU_SYSTEM:= $(shell $(DPKG_ARCH) -qDEB_BUILD_GNU_SYSTEM) +export DEB_BUILD_GNU_TYPE := $(shell $(DPKG_ARCH) -qDEB_BUILD_GNU_TYPE) +export DEB_HOST_ARCH := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_ARCH) +export DEB_HOST_ARCH_OS := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_ARCH_OS \ + 2>/dev/null|| true) +export DEB_HOST_ARCH_CPU := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_ARCH_CPU \ + 2>/dev/null|| true) +export DEB_HOST_GNU_CPU := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_CPU) +export DEB_HOST_GNU_SYSTEM := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_SYSTEM) +export DEB_HOST_GNU_TYPE := $(shell $(DPKG_ARCH) $(ha) -qDEB_HOST_GNU_TYPE) + +# arrgh. future proofing +ifeq ($(DEB_HOST_GNU_SYSTEM), linux) + DEB_HOST_GNU_SYSTEM=linux-gnu +endif +ifeq ($(DEB_HOST_ARCH_OS),) + ifeq ($(DEB_HOST_GNU_SYSTEM), linux-gnu) + DEB_HOST_ARCH_OS := linux + endif + ifeq ($(DEB_HOST_GNU_SYSTEM), kfreebsd-gnu) + DEB_HOST_ARCH_OS := kfreebsd + endif +endif + +REASON = @if [ -f $@ ]; then \ + echo "====== making $(notdir $@) because of $(notdir $?) ======";\ + else \ + echo "====== making target $@ [new prereqs: $(notdir $?)]======"; \ + fi + +OLDREASON = @if [ -f $@ ]; then \ + echo "====== making $(notdir $@) because of $(notdir $?) ======";\ + else \ + echo "====== making (creating) $(notdir $@) ======"; \ + fi + +LIBREASON = @echo "====== making $(notdir $@)($(notdir $%))because of $(notdir $?)======" + + +# macro outputing $(1) if DEBUG_DEBIAN_RULES is set, and resolving it +# in all cases usage $(call doit,some shell command) +doit = $(if $(DEBUG_DEBIAN_RULES),$(warning DEBUG: $(1)))$(shell $(1)) + +#Local variables: +#mode: makefile +#End: --- libsemanage-2.0.39.orig/debian/common/checklibs +++ libsemanage-2.0.39/debian/common/checklibs @@ -0,0 +1,78 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# checklibs.sh --- +# Author : Manoj Srivastava ( srivasta@glaurung.internal.golden-gryphon.com ) +# Created On : Fri Sep 29 15:36:22 2006 +# Created On Node : glaurung.internal.golden-gryphon.com +# Last Modified By : Manoj Srivastava +# Last Modified On : Wed Sep 2 01:16:46 2009 +# Last Machine Used: anzu.internal.golden-gryphon.com +# Update Count : 47 +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# +# arch-tag: 8ba11489-77fa-45a0-92c4-9c5b162ee119 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# Make sure we abort on error +set -e +progname="$(basename \"$0\")" + +trap 'rm -f search_patterns.txt;' ALRM HUP INT PIPE TERM ABRT FPE BUS QUIT SEGV ILL EXIT + +# Find all undefined symbols in all ELF objects in this tree +readelf -s -D -W $(find . -type f -print0 | xargs -0r file | grep " ELF" | \ + awk '{print $1}' | sed -e 's/:$//') | grep UND | grep -v LOCAL | + perl -ple 's/.*\s(\S+)\s*$/\^$1\$/g' | sort -u > search_patterns.txt; + +LOCAL_LIBS=$(find . -type f -print0 | xargs -0r file | egrep "ELF.*shared object" | \ + awk '{print $1}' | sed -e 's/:$//' -e 's,/[^/]*$,,') + +# Find all the libraries needed in this tree +objdump -T --private-headers $(find . -type f -print0 | \ + xargs -0r file | egrep "ELF.*(shared object|executable)" | \ + awk '{print $1}' | sed -e 's/:$//') | grep NEEDED | sort -u | awk '{print $2}' | + while read lib; do + # For each library, see where it lives on the file system + LIB= + for library_dir in "/lib" "/usr/lib" $LOCAL_LIBS $EXTRA_LIBRARY_PATHS; do + if [ -e "$library_dir/$lib" ]; then + LIB="$library_dir/$lib"; + break + fi + done + if [ -z "$LIB" ]; then + echo >&2 "Can't find $lib" + continue + fi + # If we fond the library, find what symbols it defines, and if these symbols + # are some that we need + if readelf -s -D -W $LIB | grep -v UND | perl -ple 's/.*\s(\S+)\s*$/$1/g' | \ + sort -u | grep -q -f search_patterns.txt ; then + # Library provides at least some symbols we need + if [ -n "$DEBUG" ]; then echo "Found $LIB"; fi + else + # Library does not provide any symbols we need + echo "$LIB" ; + fi +done + +# Get rid of the intermediate file +rm -f search_patterns.txt; +exit 0 + --- libsemanage-2.0.39.orig/debian/common/get_shlib_ver +++ libsemanage-2.0.39/debian/common/get_shlib_ver @@ -0,0 +1,40 @@ +#! /bin/sh +# -*- Mode: Sh -*- +# get_shlib_ver --- +# Author : Manoj Srivastava ( srivasta@golden-gryphon.com ) +# Created On : Tue Sep 1 15:27:07 2009 +# Created On Node : anzu.internal.golden-gryphon.com +# Last Modified By : Manoj Srivastava +# Status : Unknown, Use with caution! +# HISTORY : +# Description : +# If there is a symbols file preent, get the most recent version a +# symbol was added in. +# + + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# Make sure we abort on error +set -e +progname="$(basename \"$0\")" + +test ! -d debian || \ + find debian -wholename 'debian/*\.symbols' | while read lib; do + echo -n "Shlib info for" ${lib%%.symbols} ": "; + sort -n -k 2,2b $lib | grep '^ ' | tail -n 1 | awk '{print $2;}'; +done + --- libsemanage-2.0.39.orig/debian/common/automake.mk +++ libsemanage-2.0.39/debian/common/automake.mk @@ -0,0 +1,37 @@ +############################ -*- Mode: Makefile -*- ########################### +## automake.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.green-gryphon.com ) +## Created On : Sat Nov 15 02:47:23 2003 +## Created On Node : glaurung.green-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Sat Nov 15 02:47:53 2003 +## Last Machine Used: glaurung.green-gryphon.com +## Update Count : 1 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : +## +## arch-tag: 1fabe69b-7cc8-4ecc-9411-bc5906b19857 +## +############################################################################### + +AUTOCONF_VERSION:=$(shell if [ -e configure ]; then \ + grep "Generated automatically using autoconf" \ + configure | sed -e 's/^.*autoconf version //g'; \ + fi) +HAVE_NEW_AUTOMAKE:=$(shell if [ "X$(AUTOCONF_VERSION)" != "X2.13" ]; then \ + echo 'YES' ; fi) + +ifneq ($(strip $(HAVE_NEW_AUTOMAKE)),) + ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += --build $(DEB_BUILD_GNU_TYPE) + else + confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) + endif +else + ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) + confflags += $(DEB_HOST_GNU_TYPE) + else + confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) + endif +endif --- libsemanage-2.0.39.orig/debian/common/debconf.mk +++ libsemanage-2.0.39/debian/common/debconf.mk @@ -0,0 +1,42 @@ +############################ -*- Mode: Makefile -*- ########################### +## debconf.mk --- +## Author : Manoj Srivastava ( srivasta@glaurung.internal.golden-gryphon.com ) +## Created On : Fri Mar 12 11:11:31 2004 +## Created On Node : glaurung.internal.golden-gryphon.com +## Last Modified By : Manoj Srivastava +## Last Modified On : Mon Apr 11 13:19:10 2005 +## Last Machine Used: glaurung.internal.golden-gryphon.com +## Update Count : 20 +## Status : Unknown, Use with caution! +## HISTORY : +## Description : helps with using debconf +## +## arch-tag: 32b933a9-05ad-4c03-97a8-8644745b832a +## +############################################################################### + +# The idea behind this scheme is that the maintainer (or whoever's +# building the package for upload to unstable) has to build on a +# machine with po-debconf installed, but nobody else does. + +# Also, make sure that debian/control has ${debconf-depends} in the +# appropriate Depends: line., and use the following in the binary +# target: +# dpkg-gencontrol -V'debconf-depends=debconf (>= $(MINDEBCONFVER))' +# + +# WARNING!! You need to create the debian/templates file before this +# all works. + +# Run debconf-updatepo whenever the template file changes. +# the tool podebconf-report-po is also a great friend to have in such +# circumstances +define CHECKPO + @for i in debian/po/*.po; do \ + if [ -f $$i ]; then \ + echo \"Checking: $$i\"; \ + msgmerge -U $$i debian/po/templates.pot; \ + msgfmt -o /dev/null -c --statistics $$i; \ + fi; \ + done +endef