764e71
diff -up setools-3.3.7/configure.ac.python setools-3.3.7/configure.ac
764e71
--- setools-3.3.7/configure.ac.python	2010-04-30 10:25:48.000000000 -0400
764e71
+++ setools-3.3.7/configure.ac	2010-07-30 15:02:10.000000000 -0400
764e71
@@ -194,7 +194,7 @@ AC_ARG_ENABLE(swig-java,
764e71
               enable_jswig="$enableval")
764e71
 if test "x${enable_jswig}" = xyes; then
764e71
    if test ${do_swigify} = no; then
764e71
-      AC_PROG_SWIG(1.3.28)
764e71
+      AC_PROG_SWIG(2.0.0)
764e71
    fi
764e71
    AC_JAVA_OPTIONS
764e71
    if test "x$JAVAPREFIX" = x; then
764e71
@@ -216,21 +216,23 @@ if test "x${enable_jswig}" = xyes; then
00fe00
    do_swigify_java=yes
00fe00
    do_swigify=yes
00fe00
 fi
00fe00
+
277093
+AM_PATH_PYTHON(2.7)
00fe00
+
00fe00
 AC_ARG_ENABLE(swig-python,
00fe00
               AC_HELP_STRING([--enable-swig-python],
00fe00
                              [build SWIG interfaces for Python]),
764e71
               enable_pyswig="$enableval")
764e71
 if test "x${enable_pyswig}" = xyes; then
00fe00
    if test ${do_swigify} = no; then
764e71
-      AC_PROG_SWIG(1.3.28)
764e71
+      AC_PROG_SWIG(2.0.0)
00fe00
    fi
00fe00
-   AM_PATH_PYTHON(2.3)
00fe00
    SWIG_PYTHON
00fe00
    do_swigify_python=yes
00fe00
    do_swigify=yes
764e71
 fi
764e71
 if test ${do_swigify} = "yes"; then
764e71
-   AC_PROG_SWIG(1.3.28)
764e71
+   AC_PROG_SWIG(2.0.0)
764e71
 fi
764e71
 build_apol=yes
764e71
 AC_ARG_ENABLE(swig-tcl,
764e71
@@ -239,7 +241,7 @@ AC_ARG_ENABLE(swig-tcl,
764e71
               enable_tclswig="$enableval", enable_tclswig="yes")
764e71
 if test "x${enable_tclswig}" = xyes; then
764e71
    if test ${do_swigify} = no; then
764e71
-      AC_PROG_SWIG(1.3.28)
764e71
+      AC_PROG_SWIG(2.0.0)
764e71
    fi
764e71
    TEA_INIT(3.5)
764e71
    TEA_PATH_TCLCONFIG
764e71
@@ -888,6 +890,8 @@ AC_CONFIG_FILES([Makefile VERSION \
00fe00
                  sediff/Makefile \
00fe00
                  man/Makefile \
00fe00
                  debian/Makefile \
00fe00
+   		 python/Makefile \
00fe00
+   		 python/setools/Makefile \
00fe00
                  packages/Makefile packages/rpm/Makefile \
00fe00
                  packages/libqpol.pc packages/libapol.pc packages/libpoldiff.pc packages/libseaudit.pc packages/libsefs.pc])
00fe00
 
764e71
diff -up setools-3.3.7/Makefile.am.python setools-3.3.7/Makefile.am
764e71
--- setools-3.3.7/Makefile.am.python	2008-02-22 14:06:28.000000000 -0500
764e71
+++ setools-3.3.7/Makefile.am	2010-07-30 15:02:10.000000000 -0400
00fe00
@@ -10,7 +10,7 @@ if BUILD_GUI
00fe00
 endif
00fe00
 # sediffx is also built conditionally, from sediffx/Makefile.am
00fe00
 
00fe00
-SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI)
00fe00
+SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI) python
00fe00
 
00fe00
 #old indent opts
00fe00
 #INDENT_OPTS = -npro -nbad -bap -sob -ss -l132 -di1 -nbc -br -nbbb -c40 -cd40 -ncdb -ce -cli0 -cp40 -ncs -d0 -nfc1 -nfca -i8 -ts8 -ci8 -lp -ip0 -npcs -npsl -sc
764e71
diff -up setools-3.3.7/Makefile.in.python setools-3.3.7/Makefile.in
764e71
--- setools-3.3.7/Makefile.in.python	2010-05-12 10:01:09.000000000 -0400
764e71
+++ setools-3.3.7/Makefile.in	2010-07-30 15:02:47.000000000 -0400
00fe00
@@ -79,7 +79,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGE
00fe00
 ETAGS = etags
00fe00
 CTAGS = ctags
00fe00
 DIST_SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds \
00fe00
-	sechecker sediff man packages debian apol seaudit
00fe00
+	sechecker sediff man packages debian apol seaudit python
00fe00
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
00fe00
 distdir = $(PACKAGE)-$(VERSION)
00fe00
 top_distdir = $(distdir)
764e71
@@ -385,7 +385,7 @@ AUTOMAKE_OPTIONS = dist-bzip2
00fe00
 @BUILD_APOL_TRUE@MAYBE_APOL = apol
00fe00
 @BUILD_GUI_TRUE@MAYBE_GUI = seaudit
00fe00
 # sediffx is also built conditionally, from sediffx/Makefile.am
00fe00
-SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI)
00fe00
+SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI) python
00fe00
 
00fe00
 #old indent opts
00fe00
 #INDENT_OPTS = -npro -nbad -bap -sob -ss -l132 -di1 -nbc -br -nbbb -c40 -cd40 -ncdb -ce -cli0 -cp40 -ncs -d0 -nfc1 -nfca -i8 -ts8 -ci8 -lp -ip0 -npcs -npsl -sc
764e71
diff -up setools-3.3.7/python/Makefile.am.python setools-3.3.7/python/Makefile.am
764e71
--- setools-3.3.7/python/Makefile.am.python	2010-07-30 15:02:10.000000000 -0400
764e71
+++ setools-3.3.7/python/Makefile.am	2010-07-30 15:02:10.000000000 -0400
d7380e
@@ -0,0 +1 @@
00fe00
+SUBDIRS = setools
764e71
diff -up setools-3.3.7/python/Makefile.in.python setools-3.3.7/python/Makefile.in
764e71
--- setools-3.3.7/python/Makefile.in.python	2010-07-30 15:02:10.000000000 -0400
764e71
+++ setools-3.3.7/python/Makefile.in	2010-07-30 15:02:46.000000000 -0400
764e71
@@ -0,0 +1,716 @@
764e71
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
00fe00
+# @configure_input@
00fe00
+
00fe00
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
00fe00
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
00fe00
+# Inc.
00fe00
+# This Makefile.in is free software; the Free Software Foundation
00fe00
+# gives unlimited permission to copy and/or distribute it,
00fe00
+# with or without modifications, as long as this notice is preserved.
00fe00
+
00fe00
+# This program is distributed in the hope that it will be useful,
00fe00
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
00fe00
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
00fe00
+# PARTICULAR PURPOSE.
00fe00
+
00fe00
+@SET_MAKE@
00fe00
+VPATH = @srcdir@
00fe00
+pkgdatadir = $(datadir)/@PACKAGE@
00fe00
+pkgincludedir = $(includedir)/@PACKAGE@
00fe00
+pkglibdir = $(libdir)/@PACKAGE@
00fe00
+pkglibexecdir = $(libexecdir)/@PACKAGE@
00fe00
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
00fe00
+install_sh_DATA = $(install_sh) -c -m 644
00fe00
+install_sh_PROGRAM = $(install_sh) -c
00fe00
+install_sh_SCRIPT = $(install_sh) -c
00fe00
+INSTALL_HEADER = $(INSTALL_DATA)
00fe00
+transform = $(program_transform_name)
00fe00
+NORMAL_INSTALL = :
00fe00
+PRE_INSTALL = :
00fe00
+POST_INSTALL = :
00fe00
+NORMAL_UNINSTALL = :
00fe00
+PRE_UNINSTALL = :
00fe00
+POST_UNINSTALL = :
00fe00
+build_triplet = @build@
00fe00
+host_triplet = @host@
00fe00
+subdir = python
00fe00
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
00fe00
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
00fe00
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
00fe00
+	$(top_srcdir)/m4/ac_java_options.m4 \
00fe00
+	$(top_srcdir)/m4/ac_pkg_swig.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_jar.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_java.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_java_works.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_javac.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_javac_works.m4 \
00fe00
+	$(top_srcdir)/m4/ac_python_devel.m4 $(top_srcdir)/m4/c.m4 \
00fe00
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
00fe00
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
00fe00
+	$(top_srcdir)/m4/lt~obsolete.m4 \
00fe00
+	$(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/m4/tcl.m4 \
00fe00
+	$(top_srcdir)/configure.ac
00fe00
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
00fe00
+	$(ACLOCAL_M4)
00fe00
+mkinstalldirs = $(install_sh) -d
00fe00
+CONFIG_HEADER = $(top_builddir)/config.h
00fe00
+CONFIG_CLEAN_FILES =
00fe00
+CONFIG_CLEAN_VPATH_FILES =
00fe00
+SOURCES =
00fe00
+DIST_SOURCES =
00fe00
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
00fe00
+	html-recursive info-recursive install-data-recursive \
00fe00
+	install-dvi-recursive install-exec-recursive \
00fe00
+	install-html-recursive install-info-recursive \
00fe00
+	install-pdf-recursive install-ps-recursive install-recursive \
00fe00
+	installcheck-recursive installdirs-recursive pdf-recursive \
00fe00
+	ps-recursive uninstall-recursive
00fe00
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
00fe00
+  distclean-recursive maintainer-clean-recursive
00fe00
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
00fe00
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
00fe00
+	distdir
00fe00
+ETAGS = etags
00fe00
+CTAGS = ctags
00fe00
+DIST_SUBDIRS = $(SUBDIRS)
00fe00
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
00fe00
+am__relativize = \
00fe00
+  dir0=`pwd`; \
00fe00
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
00fe00
+  sed_rest='s,^[^/]*/*,,'; \
00fe00
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
00fe00
+  sed_butlast='s,/*[^/]*$$,,'; \
00fe00
+  while test -n "$$dir1"; do \
00fe00
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
00fe00
+    if test "$$first" != "."; then \
00fe00
+      if test "$$first" = ".."; then \
00fe00
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
00fe00
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
00fe00
+      else \
00fe00
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
00fe00
+        if test "$$first2" = "$$first"; then \
00fe00
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
00fe00
+        else \
00fe00
+          dir2="../$$dir2"; \
00fe00
+        fi; \
00fe00
+        dir0="$$dir0"/"$$first"; \
00fe00
+      fi; \
00fe00
+    fi; \
00fe00
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
00fe00
+  done; \
00fe00
+  reldir="$$dir2"
00fe00
+ACLOCAL = @ACLOCAL@
00fe00
+AMTAR = @AMTAR@
00fe00
+APOL_CFLAGS = @APOL_CFLAGS@
00fe00
+APOL_LIB_FLAG = @APOL_LIB_FLAG@
00fe00
+AR = @AR@
00fe00
+AUTOCONF = @AUTOCONF@
00fe00
+AUTOHEADER = @AUTOHEADER@
00fe00
+AUTOMAKE = @AUTOMAKE@
00fe00
+AWK = @AWK@
00fe00
+BWIDGET_DESTDIR = @BWIDGET_DESTDIR@
00fe00
+CC = @CC@
00fe00
+CCDEPMODE = @CCDEPMODE@
00fe00
+CFLAGS = @CFLAGS@
00fe00
+CPP = @CPP@
00fe00
+CPPFLAGS = @CPPFLAGS@
00fe00
+CUNIT_LIB_FLAG = @CUNIT_LIB_FLAG@
00fe00
+CXX = @CXX@
00fe00
+CXXCPP = @CXXCPP@
00fe00
+CXXDEPMODE = @CXXDEPMODE@
00fe00
+CXXFLAGS = @CXXFLAGS@
00fe00
+CYGPATH = @CYGPATH@
00fe00
+CYGPATH_W = @CYGPATH_W@
00fe00
+DEBUGCFLAGS = @DEBUGCFLAGS@
00fe00
+DEBUGCXXFLAGS = @DEBUGCXXFLAGS@
00fe00
+DEBUGJFLAGS = @DEBUGJFLAGS@
00fe00
+DEBUGLDFLAGS = @DEBUGLDFLAGS@
00fe00
+DEFS = @DEFS@
00fe00
+DEPDIR = @DEPDIR@
00fe00
+DSYMUTIL = @DSYMUTIL@
00fe00
+DUMPBIN = @DUMPBIN@
00fe00
+ECHO_C = @ECHO_C@
00fe00
+ECHO_N = @ECHO_N@
00fe00
+ECHO_T = @ECHO_T@
00fe00
+EGREP = @EGREP@
00fe00
+EXEEXT = @EXEEXT@
00fe00
+FGREP = @FGREP@
00fe00
+GLADE_CFLAGS = @GLADE_CFLAGS@
00fe00
+GLADE_LIBS = @GLADE_LIBS@
00fe00
+GREP = @GREP@
00fe00
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
00fe00
+GTHREAD_LIBS = @GTHREAD_LIBS@
00fe00
+GTK_CFLAGS = @GTK_CFLAGS@
00fe00
+GTK_LIBS = @GTK_LIBS@
00fe00
+INSTALL = @INSTALL@
00fe00
+INSTALL_DATA = @INSTALL_DATA@
00fe00
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
00fe00
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
00fe00
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
00fe00
+JAR = @JAR@
00fe00
+JAVA = @JAVA@
00fe00
+JAVAC = @JAVAC@
00fe00
+JAVACFLAGS = @JAVACFLAGS@
00fe00
+JAVAFLAGS = @JAVAFLAGS@
00fe00
+JAVAPREFIX = @JAVAPREFIX@
00fe00
+LD = @LD@
00fe00
+LDFLAGS = @LDFLAGS@
00fe00
+LEX = @LEX@
00fe00
+LEXLIB = @LEXLIB@
00fe00
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
00fe00
+LIBOBJS = @LIBOBJS@
00fe00
+LIBS = @LIBS@
00fe00
+LIBTOOL = @LIBTOOL@
00fe00
+LIPO = @LIPO@
00fe00
+LN_S = @LN_S@
00fe00
+LTLIBOBJS = @LTLIBOBJS@
00fe00
+MAKEINFO = @MAKEINFO@
00fe00
+MKDIR_P = @MKDIR_P@
00fe00
+NM = @NM@
00fe00
+NMEDIT = @NMEDIT@
00fe00
+OBJDUMP = @OBJDUMP@
00fe00
+OBJEXT = @OBJEXT@
00fe00
+OTOOL = @OTOOL@
00fe00
+OTOOL64 = @OTOOL64@
00fe00
+PACKAGE = @PACKAGE@
00fe00
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
00fe00
+PACKAGE_NAME = @PACKAGE_NAME@
00fe00
+PACKAGE_STRING = @PACKAGE_STRING@
00fe00
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
764e71
+PACKAGE_URL = @PACKAGE_URL@
00fe00
+PACKAGE_VERSION = @PACKAGE_VERSION@
00fe00
+PATH_SEPARATOR = @PATH_SEPARATOR@
00fe00
+PIXBUF_CFLAGS = @PIXBUF_CFLAGS@
00fe00
+PIXBUF_LIBS = @PIXBUF_LIBS@
00fe00
+PKG_CFLAGS = @PKG_CFLAGS@
00fe00
+PKG_HEADERS = @PKG_HEADERS@
00fe00
+PKG_INCLUDES = @PKG_INCLUDES@
00fe00
+PKG_LIBS = @PKG_LIBS@
00fe00
+PKG_LIB_FILE = @PKG_LIB_FILE@
00fe00
+PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
00fe00
+PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
00fe00
+PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
00fe00
+PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
00fe00
+POLDIFF_CFLAGS = @POLDIFF_CFLAGS@
00fe00
+POLDIFF_LIB_FLAG = @POLDIFF_LIB_FLAG@
00fe00
+PROFILECFLAGS = @PROFILECFLAGS@
00fe00
+PROFILELDFLAGS = @PROFILELDFLAGS@
00fe00
+PYTHON = @PYTHON@
00fe00
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
00fe00
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
00fe00
+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
00fe00
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
00fe00
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
00fe00
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
00fe00
+PYTHON_PREFIX = @PYTHON_PREFIX@
00fe00
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
00fe00
+PYTHON_VERSION = @PYTHON_VERSION@
00fe00
+QPOL_CFLAGS = @QPOL_CFLAGS@
00fe00
+QPOL_LIB_FLAG = @QPOL_LIB_FLAG@
00fe00
+RANLIB = @RANLIB@
00fe00
+SEAUDIT_CFLAGS = @SEAUDIT_CFLAGS@
00fe00
+SEAUDIT_LIB_FLAG = @SEAUDIT_LIB_FLAG@
00fe00
+SED = @SED@
00fe00
+SEFS_CFLAGS = @SEFS_CFLAGS@
00fe00
+SEFS_LIB_FLAG = @SEFS_LIB_FLAG@
00fe00
+SELINUX_CFLAGS = @SELINUX_CFLAGS@
00fe00
+SELINUX_LIB_FLAG = @SELINUX_LIB_FLAG@
00fe00
+SET_MAKE = @SET_MAKE@
00fe00
+SHELL = @SHELL@
00fe00
+SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
00fe00
+SQLITE3_LIBS = @SQLITE3_LIBS@
00fe00
+STRIP = @STRIP@
00fe00
+SWIG = @SWIG@
00fe00
+SWIG_JAVA_CFLAGS = @SWIG_JAVA_CFLAGS@
00fe00
+SWIG_JAVA_OPT = @SWIG_JAVA_OPT@
00fe00
+SWIG_LIB = @SWIG_LIB@
00fe00
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
00fe00
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
00fe00
+SWIG_TCL_CFLAGS = @SWIG_TCL_CFLAGS@
00fe00
+SWIG_TCL_OPT = @SWIG_TCL_OPT@
00fe00
+TCLSH_PROG = @TCLSH_PROG@
00fe00
+TCL_AUTOPATH = @TCL_AUTOPATH@
00fe00
+TCL_BIN_DIR = @TCL_BIN_DIR@
00fe00
+TCL_DEFS = @TCL_DEFS@
00fe00
+TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
00fe00
+TCL_INCLUDES = @TCL_INCLUDES@
00fe00
+TCL_LD_FLAGS = @TCL_LD_FLAGS@
00fe00
+TCL_LIBS = @TCL_LIBS@
00fe00
+TCL_LIB_FILE = @TCL_LIB_FILE@
00fe00
+TCL_LIB_FLAG = @TCL_LIB_FLAG@
00fe00
+TCL_LIB_SPEC = @TCL_LIB_SPEC@
00fe00
+TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
00fe00
+TCL_SRC_DIR = @TCL_SRC_DIR@
00fe00
+TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
00fe00
+TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@
00fe00
+TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
00fe00
+TCL_VERSION = @TCL_VERSION@
00fe00
+TK_BIN_DIR = @TK_BIN_DIR@
00fe00
+TK_INCLUDES = @TK_INCLUDES@
00fe00
+TK_LIBS = @TK_LIBS@
00fe00
+TK_LIB_FILE = @TK_LIB_FILE@
00fe00
+TK_LIB_FLAG = @TK_LIB_FLAG@
00fe00
+TK_LIB_SPEC = @TK_LIB_SPEC@
00fe00
+TK_SRC_DIR = @TK_SRC_DIR@
00fe00
+TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
00fe00
+TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@
00fe00
+TK_STUB_LIB_SPEC = @TK_STUB_LIB_SPEC@
00fe00
+TK_VERSION = @TK_VERSION@
00fe00
+TK_XINCLUDES = @TK_XINCLUDES@
00fe00
+VERSION = @VERSION@
00fe00
+WARNCFLAGS = @WARNCFLAGS@
00fe00
+WARNCXXFLAGS = @WARNCXXFLAGS@
00fe00
+WARNJFLAGS = @WARNJFLAGS@
00fe00
+WARNLDFLAGS = @WARNLDFLAGS@
00fe00
+WISH_PROG = @WISH_PROG@
00fe00
+XMKMF = @XMKMF@
00fe00
+XML_CFLAGS = @XML_CFLAGS@
00fe00
+XML_LIBS = @XML_LIBS@
00fe00
+YACC = @YACC@
00fe00
+YFLAGS = @YFLAGS@
00fe00
+abs_builddir = @abs_builddir@
00fe00
+abs_srcdir = @abs_srcdir@
00fe00
+abs_top_builddir = @abs_top_builddir@
00fe00
+abs_top_srcdir = @abs_top_srcdir@
00fe00
+ac_ct_CC = @ac_ct_CC@
00fe00
+ac_ct_CXX = @ac_ct_CXX@
00fe00
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
00fe00
+am__include = @am__include@
00fe00
+am__leading_dot = @am__leading_dot@
00fe00
+am__quote = @am__quote@
00fe00
+am__tar = @am__tar@
00fe00
+am__untar = @am__untar@
00fe00
+bindir = @bindir@
00fe00
+build = @build@
00fe00
+build_alias = @build_alias@
00fe00
+build_cpu = @build_cpu@
00fe00
+build_os = @build_os@
00fe00
+build_vendor = @build_vendor@
00fe00
+builddir = @builddir@
00fe00
+datadir = @datadir@
00fe00
+datarootdir = @datarootdir@
00fe00
+docdir = @docdir@
00fe00
+dvidir = @dvidir@
00fe00
+exec_prefix = @exec_prefix@
00fe00
+has_pkg_config = @has_pkg_config@
00fe00
+host = @host@
00fe00
+host_alias = @host_alias@
00fe00
+host_cpu = @host_cpu@
00fe00
+host_os = @host_os@
00fe00
+host_vendor = @host_vendor@
00fe00
+htmldir = @htmldir@
00fe00
+includedir = @includedir@
00fe00
+infodir = @infodir@
00fe00
+install_sh = @install_sh@
00fe00
+javadir = @javadir@
00fe00
+libapol_jswig_soname = @libapol_jswig_soname@
00fe00
+libapol_pyswig_soname = @libapol_pyswig_soname@
00fe00
+libapol_soname = @libapol_soname@
00fe00
+libapol_soversion = @libapol_soversion@
00fe00
+libapol_tswig_soname = @libapol_tswig_soname@
00fe00
+libapol_version = @libapol_version@
00fe00
+libdir = @libdir@
00fe00
+libexecdir = @libexecdir@
00fe00
+libpoldiff_jswig_soname = @libpoldiff_jswig_soname@
00fe00
+libpoldiff_pyswig_soname = @libpoldiff_pyswig_soname@
00fe00
+libpoldiff_soname = @libpoldiff_soname@
00fe00
+libpoldiff_soversion = @libpoldiff_soversion@
00fe00
+libpoldiff_tswig_soname = @libpoldiff_tswig_soname@
00fe00
+libpoldiff_version = @libpoldiff_version@
00fe00
+libqpol_jswig_soname = @libqpol_jswig_soname@
00fe00
+libqpol_pyswig_soname = @libqpol_pyswig_soname@
00fe00
+libqpol_soname = @libqpol_soname@
00fe00
+libqpol_soversion = @libqpol_soversion@
00fe00
+libqpol_tswig_soname = @libqpol_tswig_soname@
00fe00
+libqpol_version = @libqpol_version@
00fe00
+libseaudit_jswig_soname = @libseaudit_jswig_soname@
00fe00
+libseaudit_pyswig_soname = @libseaudit_pyswig_soname@
00fe00
+libseaudit_soname = @libseaudit_soname@
00fe00
+libseaudit_soversion = @libseaudit_soversion@
00fe00
+libseaudit_tswig_soname = @libseaudit_tswig_soname@
00fe00
+libseaudit_version = @libseaudit_version@
00fe00
+libsefs_jswig_soname = @libsefs_jswig_soname@
00fe00
+libsefs_pyswig_soname = @libsefs_pyswig_soname@
00fe00
+libsefs_soname = @libsefs_soname@
00fe00
+libsefs_soversion = @libsefs_soversion@
00fe00
+libsefs_tswig_soname = @libsefs_tswig_soname@
00fe00
+libsefs_version = @libsefs_version@
00fe00
+localedir = @localedir@
00fe00
+localstatedir = @localstatedir@
00fe00
+lt_ECHO = @lt_ECHO@
00fe00
+mandir = @mandir@
00fe00
+mkdir_p = @mkdir_p@
00fe00
+oldincludedir = @oldincludedir@
00fe00
+pdfdir = @pdfdir@
00fe00
+pkgpyexecdir = @pkgpyexecdir@
00fe00
+pkgpythondir = @pkgpythondir@
00fe00
+prefix = @prefix@
00fe00
+profile_install_dir = @profile_install_dir@
00fe00
+program_transform_name = @program_transform_name@
00fe00
+psdir = @psdir@
00fe00
+pyexecdir = @pyexecdir@
00fe00
+pythondir = @pythondir@
00fe00
+sbindir = @sbindir@
00fe00
+selinux_default_policy = @selinux_default_policy@
00fe00
+selinux_policy_dir = @selinux_policy_dir@
00fe00
+sepol_srcdir = @sepol_srcdir@
00fe00
+setoolsdir = @setoolsdir@
00fe00
+sharedstatedir = @sharedstatedir@
00fe00
+srcdir = @srcdir@
00fe00
+sysconfdir = @sysconfdir@
00fe00
+target_alias = @target_alias@
00fe00
+top_build_prefix = @top_build_prefix@
00fe00
+top_builddir = @top_builddir@
00fe00
+top_srcdir = @top_srcdir@
00fe00
+uudecode = @uudecode@
00fe00
+SUBDIRS = setools
00fe00
+all: all-recursive
00fe00
+
00fe00
+.SUFFIXES:
00fe00
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
00fe00
+	@for dep in $?; do \
00fe00
+	  case '$(am__configure_deps)' in \
00fe00
+	    *$$dep*) \
00fe00
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
00fe00
+	        && { if test -f $@; then exit 0; else break; fi; }; \
00fe00
+	      exit 1;; \
00fe00
+	  esac; \
00fe00
+	done; \
00fe00
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/Makefile'; \
00fe00
+	$(am__cd) $(top_srcdir) && \
00fe00
+	  $(AUTOMAKE) --gnu python/Makefile
00fe00
+.PRECIOUS: Makefile
00fe00
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
00fe00
+	@case '$?' in \
00fe00
+	  *config.status*) \
00fe00
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
00fe00
+	  *) \
00fe00
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
00fe00
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
00fe00
+	esac;
00fe00
+
00fe00
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
00fe00
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
00fe00
+
00fe00
+$(top_srcdir)/configure:  $(am__configure_deps)
00fe00
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
00fe00
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
00fe00
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
00fe00
+$(am__aclocal_m4_deps):
00fe00
+
00fe00
+mostlyclean-libtool:
00fe00
+	-rm -f *.lo
00fe00
+
00fe00
+clean-libtool:
00fe00
+	-rm -rf .libs _libs
00fe00
+
00fe00
+# This directory's subdirectories are mostly independent; you can cd
00fe00
+# into them and run `make' without going through this Makefile.
00fe00
+# To change the values of `make' variables: instead of editing Makefiles,
00fe00
+# (1) if the variable is set in `config.status', edit `config.status'
00fe00
+#     (which will cause the Makefiles to be regenerated when you run `make');
00fe00
+# (2) otherwise, pass the desired values on the `make' command line.
00fe00
+$(RECURSIVE_TARGETS):
764e71
+	@fail= failcom='exit 1'; \
00fe00
+	for f in x $$MAKEFLAGS; do \
00fe00
+	  case $$f in \
00fe00
+	    *=* | --[!k]*);; \
00fe00
+	    *k*) failcom='fail=yes';; \
00fe00
+	  esac; \
00fe00
+	done; \
00fe00
+	dot_seen=no; \
00fe00
+	target=`echo $@ | sed s/-recursive//`; \
00fe00
+	list='$(SUBDIRS)'; for subdir in $$list; do \
00fe00
+	  echo "Making $$target in $$subdir"; \
00fe00
+	  if test "$$subdir" = "."; then \
00fe00
+	    dot_seen=yes; \
00fe00
+	    local_target="$$target-am"; \
00fe00
+	  else \
00fe00
+	    local_target="$$target"; \
00fe00
+	  fi; \
00fe00
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
00fe00
+	  || eval $$failcom; \
00fe00
+	done; \
00fe00
+	if test "$$dot_seen" = "no"; then \
00fe00
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
00fe00
+	fi; test -z "$$fail"
00fe00
+
00fe00
+$(RECURSIVE_CLEAN_TARGETS):
764e71
+	@fail= failcom='exit 1'; \
00fe00
+	for f in x $$MAKEFLAGS; do \
00fe00
+	  case $$f in \
00fe00
+	    *=* | --[!k]*);; \
00fe00
+	    *k*) failcom='fail=yes';; \
00fe00
+	  esac; \
00fe00
+	done; \
00fe00
+	dot_seen=no; \
00fe00
+	case "$@" in \
00fe00
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
00fe00
+	  *) list='$(SUBDIRS)' ;; \
00fe00
+	esac; \
00fe00
+	rev=''; for subdir in $$list; do \
00fe00
+	  if test "$$subdir" = "."; then :; else \
00fe00
+	    rev="$$subdir $$rev"; \
00fe00
+	  fi; \
00fe00
+	done; \
00fe00
+	rev="$$rev ."; \
00fe00
+	target=`echo $@ | sed s/-recursive//`; \
00fe00
+	for subdir in $$rev; do \
00fe00
+	  echo "Making $$target in $$subdir"; \
00fe00
+	  if test "$$subdir" = "."; then \
00fe00
+	    local_target="$$target-am"; \
00fe00
+	  else \
00fe00
+	    local_target="$$target"; \
00fe00
+	  fi; \
00fe00
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
00fe00
+	  || eval $$failcom; \
00fe00
+	done && test -z "$$fail"
00fe00
+tags-recursive:
00fe00
+	list='$(SUBDIRS)'; for subdir in $$list; do \
00fe00
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
00fe00
+	done
00fe00
+ctags-recursive:
00fe00
+	list='$(SUBDIRS)'; for subdir in $$list; do \
00fe00
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
00fe00
+	done
00fe00
+
00fe00
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
00fe00
+	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
00fe00
+	unique=`for i in $$list; do \
00fe00
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
00fe00
+	  done | \
00fe00
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
00fe00
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
00fe00
+	mkid -fID $$unique
00fe00
+tags: TAGS
00fe00
+
00fe00
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
00fe00
+		$(TAGS_FILES) $(LISP)
00fe00
+	set x; \
00fe00
+	here=`pwd`; \
00fe00
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
00fe00
+	  include_option=--etags-include; \
00fe00
+	  empty_fix=.; \
00fe00
+	else \
00fe00
+	  include_option=--include; \
00fe00
+	  empty_fix=; \
00fe00
+	fi; \
00fe00
+	list='$(SUBDIRS)'; for subdir in $$list; do \
00fe00
+	  if test "$$subdir" = .; then :; else \
00fe00
+	    test ! -f $$subdir/TAGS || \
00fe00
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
00fe00
+	  fi; \
00fe00
+	done; \
00fe00
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
00fe00
+	unique=`for i in $$list; do \
00fe00
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
00fe00
+	  done | \
00fe00
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
00fe00
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
00fe00
+	shift; \
00fe00
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
00fe00
+	  test -n "$$unique" || unique=$$empty_fix; \
00fe00
+	  if test $$# -gt 0; then \
00fe00
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
00fe00
+	      "$$@" $$unique; \
00fe00
+	  else \
00fe00
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
00fe00
+	      $$unique; \
00fe00
+	  fi; \
00fe00
+	fi
00fe00
+ctags: CTAGS
00fe00
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
00fe00
+		$(TAGS_FILES) $(LISP)
00fe00
+	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
00fe00
+	unique=`for i in $$list; do \
00fe00
+	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
00fe00
+	  done | \
00fe00
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
00fe00
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
00fe00
+	test -z "$(CTAGS_ARGS)$$unique" \
00fe00
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
00fe00
+	     $$unique
00fe00
+
00fe00
+GTAGS:
00fe00
+	here=`$(am__cd) $(top_builddir) && pwd` \
00fe00
+	  && $(am__cd) $(top_srcdir) \
00fe00
+	  && gtags -i $(GTAGS_ARGS) "$$here"
00fe00
+
00fe00
+distclean-tags:
00fe00
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
00fe00
+
00fe00
+distdir: $(DISTFILES)
00fe00
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
00fe00
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
00fe00
+	list='$(DISTFILES)'; \
00fe00
+	  dist_files=`for file in $$list; do echo $$file; done | \
00fe00
+	  sed -e "s|^$$srcdirstrip/||;t" \
00fe00
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
00fe00
+	case $$dist_files in \
00fe00
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
00fe00
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
00fe00
+			   sort -u` ;; \
00fe00
+	esac; \
00fe00
+	for file in $$dist_files; do \
00fe00
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
00fe00
+	  if test -d $$d/$$file; then \
00fe00
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
00fe00
+	    if test -d "$(distdir)/$$file"; then \
00fe00
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
00fe00
+	    fi; \
00fe00
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
00fe00
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
00fe00
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
00fe00
+	    fi; \
00fe00
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
00fe00
+	  else \
00fe00
+	    test -f "$(distdir)/$$file" \
00fe00
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
00fe00
+	    || exit 1; \
00fe00
+	  fi; \
00fe00
+	done
00fe00
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
00fe00
+	  if test "$$subdir" = .; then :; else \
00fe00
+	    test -d "$(distdir)/$$subdir" \
00fe00
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
00fe00
+	    || exit 1; \
00fe00
+	  fi; \
00fe00
+	done
00fe00
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
00fe00
+	  if test "$$subdir" = .; then :; else \
00fe00
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
00fe00
+	    $(am__relativize); \
00fe00
+	    new_distdir=$$reldir; \
00fe00
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
00fe00
+	    $(am__relativize); \
00fe00
+	    new_top_distdir=$$reldir; \
00fe00
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
00fe00
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
00fe00
+	    ($(am__cd) $$subdir && \
00fe00
+	      $(MAKE) $(AM_MAKEFLAGS) \
00fe00
+	        top_distdir="$$new_top_distdir" \
00fe00
+	        distdir="$$new_distdir" \
00fe00
+		am__remove_distdir=: \
00fe00
+		am__skip_length_check=: \
00fe00
+		am__skip_mode_fix=: \
00fe00
+	        distdir) \
00fe00
+	      || exit 1; \
00fe00
+	  fi; \
00fe00
+	done
00fe00
+check-am: all-am
00fe00
+check: check-recursive
00fe00
+all-am: Makefile
00fe00
+installdirs: installdirs-recursive
00fe00
+installdirs-am:
00fe00
+install: install-recursive
00fe00
+install-exec: install-exec-recursive
00fe00
+install-data: install-data-recursive
00fe00
+uninstall: uninstall-recursive
00fe00
+
00fe00
+install-am: all-am
00fe00
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
00fe00
+
00fe00
+installcheck: installcheck-recursive
00fe00
+install-strip:
00fe00
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
00fe00
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
00fe00
+	  `test -z '$(STRIP)' || \
00fe00
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
00fe00
+mostlyclean-generic:
00fe00
+
00fe00
+clean-generic:
00fe00
+
00fe00
+distclean-generic:
00fe00
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
00fe00
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
00fe00
+
00fe00
+maintainer-clean-generic:
00fe00
+	@echo "This command is intended for maintainers to use"
00fe00
+	@echo "it deletes files that may require special tools to rebuild."
00fe00
+clean: clean-recursive
00fe00
+
00fe00
+clean-am: clean-generic clean-libtool mostlyclean-am
00fe00
+
00fe00
+distclean: distclean-recursive
00fe00
+	-rm -f Makefile
00fe00
+distclean-am: clean-am distclean-generic distclean-tags
00fe00
+
00fe00
+dvi: dvi-recursive
00fe00
+
00fe00
+dvi-am:
00fe00
+
00fe00
+html: html-recursive
00fe00
+
00fe00
+html-am:
00fe00
+
00fe00
+info: info-recursive
00fe00
+
00fe00
+info-am:
00fe00
+
00fe00
+install-data-am:
00fe00
+
00fe00
+install-dvi: install-dvi-recursive
00fe00
+
00fe00
+install-dvi-am:
00fe00
+
00fe00
+install-exec-am:
00fe00
+
00fe00
+install-html: install-html-recursive
00fe00
+
00fe00
+install-html-am:
00fe00
+
00fe00
+install-info: install-info-recursive
00fe00
+
00fe00
+install-info-am:
00fe00
+
00fe00
+install-man:
00fe00
+
00fe00
+install-pdf: install-pdf-recursive
00fe00
+
00fe00
+install-pdf-am:
00fe00
+
00fe00
+install-ps: install-ps-recursive
00fe00
+
00fe00
+install-ps-am:
00fe00
+
00fe00
+installcheck-am:
00fe00
+
00fe00
+maintainer-clean: maintainer-clean-recursive
00fe00
+	-rm -f Makefile
00fe00
+maintainer-clean-am: distclean-am maintainer-clean-generic
00fe00
+
00fe00
+mostlyclean: mostlyclean-recursive
00fe00
+
00fe00
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
00fe00
+
00fe00
+pdf: pdf-recursive
00fe00
+
00fe00
+pdf-am:
00fe00
+
00fe00
+ps: ps-recursive
00fe00
+
00fe00
+ps-am:
00fe00
+
00fe00
+uninstall-am:
00fe00
+
00fe00
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
00fe00
+	install-am install-strip tags-recursive
00fe00
+
00fe00
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
00fe00
+	all all-am check check-am clean clean-generic clean-libtool \
00fe00
+	ctags ctags-recursive distclean distclean-generic \
00fe00
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
00fe00
+	html-am info info-am install install-am install-data \
00fe00
+	install-data-am install-dvi install-dvi-am install-exec \
00fe00
+	install-exec-am install-html install-html-am install-info \
00fe00
+	install-info-am install-man install-pdf install-pdf-am \
00fe00
+	install-ps install-ps-am install-strip installcheck \
00fe00
+	installcheck-am installdirs installdirs-am maintainer-clean \
00fe00
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
00fe00
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
00fe00
+	uninstall uninstall-am
00fe00
+
00fe00
+
00fe00
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
00fe00
+# Otherwise a system limit (for SysV at least) may be exceeded.
00fe00
+.NOEXPORT:
764e71
diff -up setools-3.3.7/python/setools/__init__.py.python setools-3.3.7/python/setools/__init__.py
764e71
--- setools-3.3.7/python/setools/__init__.py.python	2010-07-30 15:02:10.000000000 -0400
51f161
+++ setools-3.3.7/python/setools/__init__.py	2010-10-14 14:31:06.000000000 -0400
764e71
@@ -0,0 +1,50 @@
00fe00
+#!/usr/bin/env python
00fe00
+
00fe00
+# Author: Thomas Liu <tliu@redhat.com>
00fe00
+
00fe00
+import _sesearch
00fe00
+import _seinfo
00fe00
+import types
00fe00
+
00fe00
+TYPE = _seinfo.TYPE
00fe00
+ROLE = _seinfo.ROLE
00fe00
+ATTRIBUTE = _seinfo.ATTRIBUTE
764e71
+PORT = _seinfo.PORT
00fe00
+USER = _seinfo.USER
00fe00
+
00fe00
+ALLOW = 'allow'
00fe00
+AUDITALLOW = 'auditallow'
00fe00
+NEVERALLOW = 'neverallow'
00fe00
+DONTAUDIT = 'dontaudit'
00fe00
+SCONTEXT = 'scontext'
00fe00
+TCONTEXT = 'tcontext'
00fe00
+PERMS = 'permlist'
00fe00
+CLASS = 'class'
00fe00
+
00fe00
+def sesearch(types, info):
00fe00
+    valid_types = [ALLOW, AUDITALLOW, NEVERALLOW, DONTAUDIT]
00fe00
+    for type in types:
00fe00
+        if type not in valid_types:
00fe00
+            raise ValueError("Type has to be in %s" % valid_types)
00fe00
+        info[type] = True
00fe00
+
00fe00
+    perms = []
00fe00
+    if PERMS in info:
00fe00
+        perms = info[PERMS]
00fe00
+        info[PERMS] = ",".join(info[PERMS])
00fe00
+     
00fe00
+    
00fe00
+    dict_list = _sesearch.sesearch(info)
51f161
+    if dict_list and len(perms) != 0:
00fe00
+        dict_list = filter(lambda x: dict_has_perms(x, perms), dict_list)
00fe00
+    return dict_list
00fe00
+
00fe00
+def dict_has_perms(dict, perms):
00fe00
+    for perm in perms:
00fe00
+        if perm not in dict[PERMS]:
00fe00
+            return False
00fe00
+    return True
00fe00
+
00fe00
+def seinfo(setype, name=None):
00fe00
+    dict_list = _seinfo.seinfo(setype, name)
00fe00
+    return dict_list
764e71
diff -up setools-3.3.7/python/setools/Makefile.am.python setools-3.3.7/python/setools/Makefile.am
764e71
--- setools-3.3.7/python/setools/Makefile.am.python	2010-07-30 15:02:10.000000000 -0400
764e71
+++ setools-3.3.7/python/setools/Makefile.am	2010-07-30 15:02:10.000000000 -0400
d7380e
@@ -0,0 +1,36 @@
00fe00
+EXTRA_DIST =				\
00fe00
+	sesearch.c			\
00fe00
+	seinfo.c			\
00fe00
+	__init__.py			\
00fe00
+	setup.py			\
00fe00
+	$(NULL)
00fe00
+
d7380e
+AM_CFLAGS = @DEBUGCFLAGS@ @WARNCFLAGS@ @PROFILECFLAGS@ @SELINUX_CFLAGS@ \
d7380e
+	@QPOL_CFLAGS@ @APOL_CFLAGS@
d7380e
+AM_CXXFLAGS = @DEBUGCXXFLAGS@ @WARNCXXFLAGS@ @PROFILECFLAGS@ @SELINUX_CFLAGS@ \
d7380e
+	@QPOL_CFLAGS@ @APOL_CFLAGS@ @SEFS_CFLAGS@
d7380e
+AM_LDFLAGS = @DEBUGLDFLAGS@ @WARNLDFLAGS@ @PROFILELDFLAGS@
d7380e
+
d7380e
+LDADD = @SELINUX_LIB_FLAG@ @APOL_LIB_FLAG@ @QPOL_LIB_FLAG@
d7380e
+DEPENDENCIES = $(top_builddir)/libapol/src/libapol.so $(top_builddir)/libqpol/src/libqpol.so
00fe00
+all-am: python-build
00fe00
+
d7380e
+seinfo_SOURCES = seinfo.c
d7380e
+
d7380e
+sesearch_SOURCES = sesearch.c
d7380e
+
00fe00
+python-build: sesearch.c seinfo.c
00fe00
+	@mkdir -p setools
00fe00
+	@cp __init__.py setools
d7380e
+	LIBS="$(QPOL_LIB_FLAG) $(APOL_LIB_FLAG)" INCLUDES="$(QPOL_CFLAGS) $(APOL_CFLAGS)" $(PYTHON) setup.py build
00fe00
+
00fe00
+install-exec-hook:
00fe00
+	$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
00fe00
+
00fe00
+uninstall-hook: 
00fe00
+	$(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
00fe00
+
00fe00
+clean-local:
00fe00
+	$(PYTHON) setup.py clean -a 
00fe00
+	rm -f *~
00fe00
+
764e71
diff -up setools-3.3.7/python/setools/Makefile.in.python setools-3.3.7/python/setools/Makefile.in
764e71
--- setools-3.3.7/python/setools/Makefile.in.python	2010-07-30 15:02:10.000000000 -0400
764e71
+++ setools-3.3.7/python/setools/Makefile.in	2010-07-30 15:02:46.000000000 -0400
764e71
@@ -0,0 +1,550 @@
764e71
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
00fe00
+# @configure_input@
00fe00
+
00fe00
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
00fe00
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
00fe00
+# Inc.
00fe00
+# This Makefile.in is free software; the Free Software Foundation
00fe00
+# gives unlimited permission to copy and/or distribute it,
00fe00
+# with or without modifications, as long as this notice is preserved.
00fe00
+
00fe00
+# This program is distributed in the hope that it will be useful,
00fe00
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
00fe00
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
00fe00
+# PARTICULAR PURPOSE.
00fe00
+
00fe00
+@SET_MAKE@
00fe00
+VPATH = @srcdir@
00fe00
+pkgdatadir = $(datadir)/@PACKAGE@
00fe00
+pkgincludedir = $(includedir)/@PACKAGE@
00fe00
+pkglibdir = $(libdir)/@PACKAGE@
00fe00
+pkglibexecdir = $(libexecdir)/@PACKAGE@
00fe00
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
00fe00
+install_sh_DATA = $(install_sh) -c -m 644
00fe00
+install_sh_PROGRAM = $(install_sh) -c
00fe00
+install_sh_SCRIPT = $(install_sh) -c
00fe00
+INSTALL_HEADER = $(INSTALL_DATA)
00fe00
+transform = $(program_transform_name)
00fe00
+NORMAL_INSTALL = :
00fe00
+PRE_INSTALL = :
00fe00
+POST_INSTALL = :
00fe00
+NORMAL_UNINSTALL = :
00fe00
+PRE_UNINSTALL = :
00fe00
+POST_UNINSTALL = :
00fe00
+build_triplet = @build@
00fe00
+host_triplet = @host@
00fe00
+subdir = python/setools
00fe00
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
00fe00
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
00fe00
+am__aclocal_m4_deps = $(top_srcdir)/m4/ac_check_classpath.m4 \
00fe00
+	$(top_srcdir)/m4/ac_java_options.m4 \
00fe00
+	$(top_srcdir)/m4/ac_pkg_swig.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_jar.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_java.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_java_works.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_javac.m4 \
00fe00
+	$(top_srcdir)/m4/ac_prog_javac_works.m4 \
00fe00
+	$(top_srcdir)/m4/ac_python_devel.m4 $(top_srcdir)/m4/c.m4 \
00fe00
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
00fe00
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
00fe00
+	$(top_srcdir)/m4/lt~obsolete.m4 \
00fe00
+	$(top_srcdir)/m4/swig_python.m4 $(top_srcdir)/m4/tcl.m4 \
00fe00
+	$(top_srcdir)/configure.ac
00fe00
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
00fe00
+	$(ACLOCAL_M4)
00fe00
+mkinstalldirs = $(install_sh) -d
00fe00
+CONFIG_HEADER = $(top_builddir)/config.h
00fe00
+CONFIG_CLEAN_FILES =
00fe00
+CONFIG_CLEAN_VPATH_FILES =
00fe00
+SOURCES =
00fe00
+DIST_SOURCES =
00fe00
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
00fe00
+ACLOCAL = @ACLOCAL@
00fe00
+AMTAR = @AMTAR@
00fe00
+APOL_CFLAGS = @APOL_CFLAGS@
00fe00
+APOL_LIB_FLAG = @APOL_LIB_FLAG@
00fe00
+AR = @AR@
00fe00
+AUTOCONF = @AUTOCONF@
00fe00
+AUTOHEADER = @AUTOHEADER@
00fe00
+AUTOMAKE = @AUTOMAKE@
00fe00
+AWK = @AWK@
00fe00
+BWIDGET_DESTDIR = @BWIDGET_DESTDIR@
00fe00
+CC = @CC@
00fe00
+CCDEPMODE = @CCDEPMODE@
00fe00
+CFLAGS = @CFLAGS@
00fe00
+CPP = @CPP@
00fe00
+CPPFLAGS = @CPPFLAGS@
00fe00
+CUNIT_LIB_FLAG = @CUNIT_LIB_FLAG@
00fe00
+CXX = @CXX@
00fe00
+CXXCPP = @CXXCPP@
00fe00
+CXXDEPMODE = @CXXDEPMODE@
00fe00
+CXXFLAGS = @CXXFLAGS@
00fe00
+CYGPATH = @CYGPATH@
00fe00
+CYGPATH_W = @CYGPATH_W@
00fe00
+DEBUGCFLAGS = @DEBUGCFLAGS@
00fe00
+DEBUGCXXFLAGS = @DEBUGCXXFLAGS@
00fe00
+DEBUGJFLAGS = @DEBUGJFLAGS@
00fe00
+DEBUGLDFLAGS = @DEBUGLDFLAGS@
00fe00
+DEFS = @DEFS@
00fe00
+DEPDIR = @DEPDIR@
00fe00
+DSYMUTIL = @DSYMUTIL@
00fe00
+DUMPBIN = @DUMPBIN@
00fe00
+ECHO_C = @ECHO_C@
00fe00
+ECHO_N = @ECHO_N@
00fe00
+ECHO_T = @ECHO_T@
00fe00
+EGREP = @EGREP@
00fe00
+EXEEXT = @EXEEXT@
00fe00
+FGREP = @FGREP@
00fe00
+GLADE_CFLAGS = @GLADE_CFLAGS@
00fe00
+GLADE_LIBS = @GLADE_LIBS@
00fe00
+GREP = @GREP@
00fe00
+GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
00fe00
+GTHREAD_LIBS = @GTHREAD_LIBS@
00fe00
+GTK_CFLAGS = @GTK_CFLAGS@
00fe00
+GTK_LIBS = @GTK_LIBS@
00fe00
+INSTALL = @INSTALL@
00fe00
+INSTALL_DATA = @INSTALL_DATA@
00fe00
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
00fe00
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
00fe00
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
00fe00
+JAR = @JAR@
00fe00
+JAVA = @JAVA@
00fe00
+JAVAC = @JAVAC@
00fe00
+JAVACFLAGS = @JAVACFLAGS@
00fe00
+JAVAFLAGS = @JAVAFLAGS@
00fe00
+JAVAPREFIX = @JAVAPREFIX@
00fe00
+LD = @LD@
00fe00
+LDFLAGS = @LDFLAGS@
00fe00
+LEX = @LEX@
00fe00
+LEXLIB = @LEXLIB@
00fe00
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
00fe00
+LIBOBJS = @LIBOBJS@
00fe00
+LIBS = @LIBS@
00fe00
+LIBTOOL = @LIBTOOL@
00fe00
+LIPO = @LIPO@
00fe00
+LN_S = @LN_S@
00fe00
+LTLIBOBJS = @LTLIBOBJS@
00fe00
+MAKEINFO = @MAKEINFO@
00fe00
+MKDIR_P = @MKDIR_P@
00fe00
+NM = @NM@
00fe00
+NMEDIT = @NMEDIT@
00fe00
+OBJDUMP = @OBJDUMP@
00fe00
+OBJEXT = @OBJEXT@
00fe00
+OTOOL = @OTOOL@
00fe00
+OTOOL64 = @OTOOL64@
00fe00
+PACKAGE = @PACKAGE@
00fe00
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
00fe00
+PACKAGE_NAME = @PACKAGE_NAME@
00fe00
+PACKAGE_STRING = @PACKAGE_STRING@
00fe00
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
764e71
+PACKAGE_URL = @PACKAGE_URL@
00fe00
+PACKAGE_VERSION = @PACKAGE_VERSION@
00fe00
+PATH_SEPARATOR = @PATH_SEPARATOR@
00fe00
+PIXBUF_CFLAGS = @PIXBUF_CFLAGS@
00fe00
+PIXBUF_LIBS = @PIXBUF_LIBS@
00fe00
+PKG_CFLAGS = @PKG_CFLAGS@
00fe00
+PKG_HEADERS = @PKG_HEADERS@
00fe00
+PKG_INCLUDES = @PKG_INCLUDES@
00fe00
+PKG_LIBS = @PKG_LIBS@
00fe00
+PKG_LIB_FILE = @PKG_LIB_FILE@
00fe00
+PKG_STUB_LIB_FILE = @PKG_STUB_LIB_FILE@
00fe00
+PKG_STUB_OBJECTS = @PKG_STUB_OBJECTS@
00fe00
+PKG_STUB_SOURCES = @PKG_STUB_SOURCES@
00fe00
+PKG_TCL_SOURCES = @PKG_TCL_SOURCES@
00fe00
+POLDIFF_CFLAGS = @POLDIFF_CFLAGS@
00fe00
+POLDIFF_LIB_FLAG = @POLDIFF_LIB_FLAG@
00fe00
+PROFILECFLAGS = @PROFILECFLAGS@
00fe00
+PROFILELDFLAGS = @PROFILELDFLAGS@
00fe00
+PYTHON = @PYTHON@
00fe00
+PYTHON_CPPFLAGS = @PYTHON_CPPFLAGS@
00fe00
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
00fe00
+PYTHON_EXTRA_LDFLAGS = @PYTHON_EXTRA_LDFLAGS@
00fe00
+PYTHON_EXTRA_LIBS = @PYTHON_EXTRA_LIBS@
00fe00
+PYTHON_LDFLAGS = @PYTHON_LDFLAGS@
00fe00
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
00fe00
+PYTHON_PREFIX = @PYTHON_PREFIX@
00fe00
+PYTHON_SITE_PKG = @PYTHON_SITE_PKG@
00fe00
+PYTHON_VERSION = @PYTHON_VERSION@
00fe00
+QPOL_CFLAGS = @QPOL_CFLAGS@
00fe00
+QPOL_LIB_FLAG = @QPOL_LIB_FLAG@
00fe00
+RANLIB = @RANLIB@
00fe00
+SEAUDIT_CFLAGS = @SEAUDIT_CFLAGS@
00fe00
+SEAUDIT_LIB_FLAG = @SEAUDIT_LIB_FLAG@
00fe00
+SED = @SED@
00fe00
+SEFS_CFLAGS = @SEFS_CFLAGS@
00fe00
+SEFS_LIB_FLAG = @SEFS_LIB_FLAG@
00fe00
+SELINUX_CFLAGS = @SELINUX_CFLAGS@
00fe00
+SELINUX_LIB_FLAG = @SELINUX_LIB_FLAG@
00fe00
+SET_MAKE = @SET_MAKE@
00fe00
+SHELL = @SHELL@
00fe00
+SQLITE3_CFLAGS = @SQLITE3_CFLAGS@
00fe00
+SQLITE3_LIBS = @SQLITE3_LIBS@
00fe00
+STRIP = @STRIP@
00fe00
+SWIG = @SWIG@
00fe00
+SWIG_JAVA_CFLAGS = @SWIG_JAVA_CFLAGS@
00fe00
+SWIG_JAVA_OPT = @SWIG_JAVA_OPT@
00fe00
+SWIG_LIB = @SWIG_LIB@
00fe00
+SWIG_PYTHON_CPPFLAGS = @SWIG_PYTHON_CPPFLAGS@
00fe00
+SWIG_PYTHON_OPT = @SWIG_PYTHON_OPT@
00fe00
+SWIG_TCL_CFLAGS = @SWIG_TCL_CFLAGS@
00fe00
+SWIG_TCL_OPT = @SWIG_TCL_OPT@
00fe00
+TCLSH_PROG = @TCLSH_PROG@
00fe00
+TCL_AUTOPATH = @TCL_AUTOPATH@
00fe00
+TCL_BIN_DIR = @TCL_BIN_DIR@
00fe00
+TCL_DEFS = @TCL_DEFS@
00fe00
+TCL_EXTRA_CFLAGS = @TCL_EXTRA_CFLAGS@
00fe00
+TCL_INCLUDES = @TCL_INCLUDES@
00fe00
+TCL_LD_FLAGS = @TCL_LD_FLAGS@
00fe00
+TCL_LIBS = @TCL_LIBS@
00fe00
+TCL_LIB_FILE = @TCL_LIB_FILE@
00fe00
+TCL_LIB_FLAG = @TCL_LIB_FLAG@
00fe00
+TCL_LIB_SPEC = @TCL_LIB_SPEC@
00fe00
+TCL_SHLIB_LD_LIBS = @TCL_SHLIB_LD_LIBS@
00fe00
+TCL_SRC_DIR = @TCL_SRC_DIR@
00fe00
+TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
00fe00
+TCL_STUB_LIB_FLAG = @TCL_STUB_LIB_FLAG@
00fe00
+TCL_STUB_LIB_SPEC = @TCL_STUB_LIB_SPEC@
00fe00
+TCL_VERSION = @TCL_VERSION@
00fe00
+TK_BIN_DIR = @TK_BIN_DIR@
00fe00
+TK_INCLUDES = @TK_INCLUDES@
00fe00
+TK_LIBS = @TK_LIBS@
00fe00
+TK_LIB_FILE = @TK_LIB_FILE@
00fe00
+TK_LIB_FLAG = @TK_LIB_FLAG@
00fe00
+TK_LIB_SPEC = @TK_LIB_SPEC@
00fe00
+TK_SRC_DIR = @TK_SRC_DIR@
00fe00
+TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@
00fe00
+TK_STUB_LIB_FLAG = @TK_STUB_LIB_FLAG@
00fe00
+TK_STUB_LIB_SPEC = @TK_STUB_LIB_SPEC@
00fe00
+TK_VERSION = @TK_VERSION@
00fe00
+TK_XINCLUDES = @TK_XINCLUDES@
00fe00
+VERSION = @VERSION@
00fe00
+WARNCFLAGS = @WARNCFLAGS@
00fe00
+WARNCXXFLAGS = @WARNCXXFLAGS@
00fe00
+WARNJFLAGS = @WARNJFLAGS@
00fe00
+WARNLDFLAGS = @WARNLDFLAGS@
00fe00
+WISH_PROG = @WISH_PROG@
00fe00
+XMKMF = @XMKMF@
00fe00
+XML_CFLAGS = @XML_CFLAGS@
00fe00
+XML_LIBS = @XML_LIBS@
00fe00
+YACC = @YACC@
00fe00
+YFLAGS = @YFLAGS@
00fe00
+abs_builddir = @abs_builddir@
00fe00
+abs_srcdir = @abs_srcdir@
00fe00
+abs_top_builddir = @abs_top_builddir@
00fe00
+abs_top_srcdir = @abs_top_srcdir@
00fe00
+ac_ct_CC = @ac_ct_CC@
00fe00
+ac_ct_CXX = @ac_ct_CXX@
00fe00
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
00fe00
+am__include = @am__include@
00fe00
+am__leading_dot = @am__leading_dot@
00fe00
+am__quote = @am__quote@
00fe00
+am__tar = @am__tar@
00fe00
+am__untar = @am__untar@
00fe00
+bindir = @bindir@
00fe00
+build = @build@
00fe00
+build_alias = @build_alias@
00fe00
+build_cpu = @build_cpu@
00fe00
+build_os = @build_os@
00fe00
+build_vendor = @build_vendor@
00fe00
+builddir = @builddir@
00fe00
+datadir = @datadir@
00fe00
+datarootdir = @datarootdir@
00fe00
+docdir = @docdir@
00fe00
+dvidir = @dvidir@
00fe00
+exec_prefix = @exec_prefix@
00fe00
+has_pkg_config = @has_pkg_config@
00fe00
+host = @host@
00fe00
+host_alias = @host_alias@
00fe00
+host_cpu = @host_cpu@
00fe00
+host_os = @host_os@
00fe00
+host_vendor = @host_vendor@
00fe00
+htmldir = @htmldir@
00fe00
+includedir = @includedir@
00fe00
+infodir = @infodir@
00fe00
+install_sh = @install_sh@
00fe00
+javadir = @javadir@
00fe00
+libapol_jswig_soname = @libapol_jswig_soname@
00fe00
+libapol_pyswig_soname = @libapol_pyswig_soname@
00fe00
+libapol_soname = @libapol_soname@
00fe00
+libapol_soversion = @libapol_soversion@
00fe00
+libapol_tswig_soname = @libapol_tswig_soname@
00fe00
+libapol_version = @libapol_version@
00fe00
+libdir = @libdir@
00fe00
+libexecdir = @libexecdir@
00fe00
+libpoldiff_jswig_soname = @libpoldiff_jswig_soname@
00fe00
+libpoldiff_pyswig_soname = @libpoldiff_pyswig_soname@
00fe00
+libpoldiff_soname = @libpoldiff_soname@
00fe00
+libpoldiff_soversion = @libpoldiff_soversion@
00fe00
+libpoldiff_tswig_soname = @libpoldiff_tswig_soname@
00fe00
+libpoldiff_version = @libpoldiff_version@
00fe00
+libqpol_jswig_soname = @libqpol_jswig_soname@
00fe00
+libqpol_pyswig_soname = @libqpol_pyswig_soname@
00fe00
+libqpol_soname = @libqpol_soname@
00fe00
+libqpol_soversion = @libqpol_soversion@
00fe00
+libqpol_tswig_soname = @libqpol_tswig_soname@
00fe00
+libqpol_version = @libqpol_version@
00fe00
+libseaudit_jswig_soname = @libseaudit_jswig_soname@
00fe00
+libseaudit_pyswig_soname = @libseaudit_pyswig_soname@
00fe00
+libseaudit_soname = @libseaudit_soname@
00fe00
+libseaudit_soversion = @libseaudit_soversion@
00fe00
+libseaudit_tswig_soname = @libseaudit_tswig_soname@
00fe00
+libseaudit_version = @libseaudit_version@
00fe00
+libsefs_jswig_soname = @libsefs_jswig_soname@
00fe00
+libsefs_pyswig_soname = @libsefs_pyswig_soname@
00fe00
+libsefs_soname = @libsefs_soname@
00fe00
+libsefs_soversion = @libsefs_soversion@
00fe00
+libsefs_tswig_soname = @libsefs_tswig_soname@
00fe00
+libsefs_version = @libsefs_version@
00fe00
+localedir = @localedir@
00fe00
+localstatedir = @localstatedir@
00fe00
+lt_ECHO = @lt_ECHO@
00fe00
+mandir = @mandir@
00fe00
+mkdir_p = @mkdir_p@
00fe00
+oldincludedir = @oldincludedir@
00fe00
+pdfdir = @pdfdir@
00fe00
+pkgpyexecdir = @pkgpyexecdir@
00fe00
+pkgpythondir = @pkgpythondir@
00fe00
+prefix = @prefix@
00fe00
+profile_install_dir = @profile_install_dir@
00fe00
+program_transform_name = @program_transform_name@
00fe00
+psdir = @psdir@
00fe00
+pyexecdir = @pyexecdir@
00fe00
+pythondir = @pythondir@
00fe00
+sbindir = @sbindir@
00fe00
+selinux_default_policy = @selinux_default_policy@
00fe00
+selinux_policy_dir = @selinux_policy_dir@
00fe00
+sepol_srcdir = @sepol_srcdir@
00fe00
+setoolsdir = @setoolsdir@
00fe00
+sharedstatedir = @sharedstatedir@
00fe00
+srcdir = @srcdir@
00fe00
+sysconfdir = @sysconfdir@
00fe00
+target_alias = @target_alias@
00fe00
+top_build_prefix = @top_build_prefix@
00fe00
+top_builddir = @top_builddir@
00fe00
+top_srcdir = @top_srcdir@
00fe00
+uudecode = @uudecode@
00fe00
+EXTRA_DIST = \
00fe00
+	sesearch.c			\
00fe00
+	seinfo.c			\
00fe00
+	__init__.py			\
00fe00
+	setup.py			\
00fe00
+	$(NULL)
00fe00
+
d7380e
+AM_CFLAGS = @DEBUGCFLAGS@ @WARNCFLAGS@ @PROFILECFLAGS@ @SELINUX_CFLAGS@ \
d7380e
+	@QPOL_CFLAGS@ @APOL_CFLAGS@
d7380e
+
d7380e
+AM_CXXFLAGS = @DEBUGCXXFLAGS@ @WARNCXXFLAGS@ @PROFILECFLAGS@ @SELINUX_CFLAGS@ \
d7380e
+	@QPOL_CFLAGS@ @APOL_CFLAGS@ @SEFS_CFLAGS@
d7380e
+
d7380e
+AM_LDFLAGS = @DEBUGLDFLAGS@ @WARNLDFLAGS@ @PROFILELDFLAGS@
d7380e
+LDADD = @SELINUX_LIB_FLAG@ @APOL_LIB_FLAG@ @QPOL_LIB_FLAG@
d7380e
+DEPENDENCIES = $(top_builddir)/libapol/src/libapol.so $(top_builddir)/libqpol/src/libqpol.so
d7380e
+seinfo_SOURCES = seinfo.c
d7380e
+sesearch_SOURCES = sesearch.c
00fe00
+all: all-am
00fe00
+
00fe00
+.SUFFIXES:
00fe00
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
00fe00
+	@for dep in $?; do \
00fe00
+	  case '$(am__configure_deps)' in \
00fe00
+	    *$$dep*) \
00fe00
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
00fe00
+	        && { if test -f $@; then exit 0; else break; fi; }; \
00fe00
+	      exit 1;; \
00fe00
+	  esac; \
00fe00
+	done; \
00fe00
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu python/setools/Makefile'; \
00fe00
+	$(am__cd) $(top_srcdir) && \
00fe00
+	  $(AUTOMAKE) --gnu python/setools/Makefile
00fe00
+.PRECIOUS: Makefile
00fe00
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
00fe00
+	@case '$?' in \
00fe00
+	  *config.status*) \
00fe00
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
00fe00
+	  *) \
00fe00
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
00fe00
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
00fe00
+	esac;
00fe00
+
00fe00
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
00fe00
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
00fe00
+
00fe00
+$(top_srcdir)/configure:  $(am__configure_deps)
00fe00
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
00fe00
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
00fe00
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
00fe00
+$(am__aclocal_m4_deps):
00fe00
+
00fe00
+mostlyclean-libtool:
00fe00
+	-rm -f *.lo
00fe00
+
00fe00
+clean-libtool:
00fe00
+	-rm -rf .libs _libs
00fe00
+tags: TAGS
00fe00
+TAGS:
00fe00
+
00fe00
+ctags: CTAGS
00fe00
+CTAGS:
00fe00
+
00fe00
+
00fe00
+distdir: $(DISTFILES)
00fe00
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
00fe00
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
00fe00
+	list='$(DISTFILES)'; \
00fe00
+	  dist_files=`for file in $$list; do echo $$file; done | \
00fe00
+	  sed -e "s|^$$srcdirstrip/||;t" \
00fe00
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
00fe00
+	case $$dist_files in \
00fe00
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
00fe00
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
00fe00
+			   sort -u` ;; \
00fe00
+	esac; \
00fe00
+	for file in $$dist_files; do \
00fe00
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
00fe00
+	  if test -d $$d/$$file; then \
00fe00
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
00fe00
+	    if test -d "$(distdir)/$$file"; then \
00fe00
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
00fe00
+	    fi; \
00fe00
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
00fe00
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
00fe00
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
00fe00
+	    fi; \
00fe00
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
00fe00
+	  else \
00fe00
+	    test -f "$(distdir)/$$file" \
00fe00
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
00fe00
+	    || exit 1; \
00fe00
+	  fi; \
00fe00
+	done
00fe00
+check-am: all-am
00fe00
+check: check-am
00fe00
+all-am: Makefile
00fe00
+installdirs:
00fe00
+install: install-am
00fe00
+install-exec: install-exec-am
00fe00
+install-data: install-data-am
00fe00
+uninstall: uninstall-am
00fe00
+
00fe00
+install-am: all-am
00fe00
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
00fe00
+
00fe00
+installcheck: installcheck-am
00fe00
+install-strip:
00fe00
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
00fe00
+	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
00fe00
+	  `test -z '$(STRIP)' || \
00fe00
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
00fe00
+mostlyclean-generic:
00fe00
+
00fe00
+clean-generic:
00fe00
+
00fe00
+distclean-generic:
00fe00
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
00fe00
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
00fe00
+
00fe00
+maintainer-clean-generic:
00fe00
+	@echo "This command is intended for maintainers to use"
00fe00
+	@echo "it deletes files that may require special tools to rebuild."
00fe00
+clean: clean-am
00fe00
+
00fe00
+clean-am: clean-generic clean-libtool clean-local mostlyclean-am
00fe00
+
00fe00
+distclean: distclean-am
00fe00
+	-rm -f Makefile
00fe00
+distclean-am: clean-am distclean-generic
00fe00
+
00fe00
+dvi: dvi-am
00fe00
+
00fe00
+dvi-am:
00fe00
+
00fe00
+html: html-am
00fe00
+
00fe00
+html-am:
00fe00
+
00fe00
+info: info-am
00fe00
+
00fe00
+info-am:
00fe00
+
00fe00
+install-data-am:
00fe00
+
00fe00
+install-dvi: install-dvi-am
00fe00
+
00fe00
+install-dvi-am:
00fe00
+
00fe00
+install-exec-am:
00fe00
+	@$(NORMAL_INSTALL)
00fe00
+	$(MAKE) $(AM_MAKEFLAGS) install-exec-hook
00fe00
+install-html: install-html-am
00fe00
+
00fe00
+install-html-am:
00fe00
+
00fe00
+install-info: install-info-am
00fe00
+
00fe00
+install-info-am:
00fe00
+
00fe00
+install-man:
00fe00
+
00fe00
+install-pdf: install-pdf-am
00fe00
+
00fe00
+install-pdf-am:
00fe00
+
00fe00
+install-ps: install-ps-am
00fe00
+
00fe00
+install-ps-am:
00fe00
+
00fe00
+installcheck-am:
00fe00
+
00fe00
+maintainer-clean: maintainer-clean-am
00fe00
+	-rm -f Makefile
00fe00
+maintainer-clean-am: distclean-am maintainer-clean-generic
00fe00
+
00fe00
+mostlyclean: mostlyclean-am
00fe00
+
00fe00
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
00fe00
+
00fe00
+pdf: pdf-am
00fe00
+
00fe00
+pdf-am:
00fe00
+
00fe00
+ps: ps-am
00fe00
+
00fe00
+ps-am:
00fe00
+
00fe00
+uninstall-am:
00fe00
+	@$(NORMAL_INSTALL)
00fe00
+	$(MAKE) $(AM_MAKEFLAGS) uninstall-hook
00fe00
+.MAKE: install-am install-exec-am install-strip uninstall-am
00fe00
+
00fe00
+.PHONY: all all-am check check-am clean clean-generic clean-libtool \
00fe00
+	clean-local distclean distclean-generic distclean-libtool \
00fe00
+	distdir dvi dvi-am html html-am info info-am install \
00fe00
+	install-am install-data install-data-am install-dvi \
00fe00
+	install-dvi-am install-exec install-exec-am install-exec-hook \
00fe00
+	install-html install-html-am install-info install-info-am \
00fe00
+	install-man install-pdf install-pdf-am install-ps \
00fe00
+	install-ps-am install-strip installcheck installcheck-am \
00fe00
+	installdirs maintainer-clean maintainer-clean-generic \
00fe00
+	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
00fe00
+	ps ps-am uninstall uninstall-am uninstall-hook
00fe00
+
00fe00
+all-am: python-build
00fe00
+
00fe00
+python-build: sesearch.c seinfo.c
00fe00
+	@mkdir -p setools
00fe00
+	@cp __init__.py setools
d7380e
+	LIBS="$(QPOL_LIB_FLAG) $(APOL_LIB_FLAG)" INCLUDES="$(QPOL_CFLAGS) $(APOL_CFLAGS)" $(PYTHON) setup.py build
00fe00
+
00fe00
+install-exec-hook:
00fe00
+	$(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
00fe00
+
00fe00
+uninstall-hook: 
00fe00
+	$(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)`
00fe00
+
00fe00
+clean-local:
00fe00
+	$(PYTHON) setup.py clean -a 
00fe00
+	rm -f *~
00fe00
+
00fe00
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
00fe00
+# Otherwise a system limit (for SysV at least) may be exceeded.
00fe00
+.NOEXPORT:
764e71
diff -up setools-3.3.7/python/setools/seinfo.c.python setools-3.3.7/python/setools/seinfo.c
764e71
--- setools-3.3.7/python/setools/seinfo.c.python	2010-07-30 15:02:10.000000000 -0400
764e71
+++ setools-3.3.7/python/setools/seinfo.c	2010-08-03 18:07:17.000000000 -0400
764e71
@@ -0,0 +1,769 @@
00fe00
+/**
00fe00
+ *  @file
00fe00
+ *  Command line tool to search TE rules.
00fe00
+ *
00fe00
+ *  @author Frank Mayer  mayerf@tresys.com
00fe00
+ *  @author Jeremy A. Mowery jmowery@tresys.com
00fe00
+ *  @author Paul Rosenfeld  prosenfeld@tresys.com
00fe00
+ *  @author Thomas Liu  <tliu@redhat.com>
00fe00
+ *  @author Dan Walsh  <dwalsh@redhat.com>
00fe00
+ *
00fe00
+ *  Copyright (C) 2003-2008 Tresys Technology, LLC
00fe00
+ *
00fe00
+ *  This program is free software; you can redistribute it and/or modify
00fe00
+ *  it under the terms of the GNU General Public License as published by
00fe00
+ *  the Free Software Foundation; either version 2 of the License, or
00fe00
+ *  (at your option) any later version.
00fe00
+ *
00fe00
+ *  This program is distributed in the hope that it will be useful,
00fe00
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00fe00
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00fe00
+ *  GNU General Public License for more details.
00fe00
+ *
00fe00
+ *  You should have received a copy of the GNU General Public License
00fe00
+ *  along with this program; if not, write to the Free Software
00fe00
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00fe00
+ */
00fe00
+
00fe00
+/**
00fe00
+ * This is a modified version of seinfo to be used as part of a library for
00fe00
+ * Python bindings.
00fe00
+ */
00fe00
+
00fe00
+#include "Python.h"
00fe00
+
00fe00
+/* libapol */
00fe00
+#include <apol policy.h="">
00fe00
+#include <apol policy-query.h="">
00fe00
+#include <apol render.h="">
00fe00
+#include <apol util.h="">
00fe00
+#include <apol vector.h="">
00fe00
+
00fe00
+/* libqpol */
00fe00
+#include <qpol policy.h="">
00fe00
+#include <qpol util.h="">
00fe00
+
00fe00
+/* other */
00fe00
+#include <errno.h>
00fe00
+#include <stdlib.h>
00fe00
+#include <stdio.h>
00fe00
+#include <string.h>
00fe00
+#include <assert.h>
00fe00
+
00fe00
+#define COPYRIGHT_INFO "Copyright (C) 2003-2007 Tresys Technology, LLC"
00fe00
+static char *policy_file = NULL;
00fe00
+
00fe00
+enum input
00fe00
+{
764e71
+	TYPE, ATTRIBUTE, ROLE, USER, PORT,
00fe00
+};
00fe00
+
00fe00
+/**
00fe00
+ * Gets a textual representation of an attribute, and 
00fe00
+ * all of that attribute's types.
00fe00
+ *
00fe00
+ * @param type_datum Reference to sepol type_datum
00fe00
+ * @param policydb Reference to a policy
00fe00
+ */
00fe00
+static PyObject* get_attr(const qpol_type_t * type_datum, const apol_policy_t * policydb)
00fe00
+{
00fe00
+	int retval = -1;
00fe00
+	PyObject *dict = PyDict_New(); 
00fe00
+	const qpol_type_t *attr_datum = NULL;
00fe00
+	qpol_iterator_t *iter = NULL;
00fe00
+	const char *attr_name = NULL, *type_name = NULL;
00fe00
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
00fe00
+	unsigned char isattr;
00fe00
+
00fe00
+	if (qpol_type_get_name(q, type_datum, &attr_name))
00fe00
+		goto cleanup;
00fe00
+	PyObject *obj = PyString_FromString(attr_name);
00fe00
+	PyDict_SetItemString(dict, "name", obj);
00fe00
+	Py_DECREF(obj);
00fe00
+
00fe00
+	/* get an iterator over all types this attribute has */
00fe00
+	if (qpol_type_get_isattr(q, type_datum, &isattr))
00fe00
+		goto cleanup;
00fe00
+	if (isattr) {	       /* sanity check */
00fe00
+		if (qpol_type_get_type_iter(q, type_datum, &iter))
00fe00
+			goto cleanup;
00fe00
+		PyObject *list = PyList_New(0);
00fe00
+		for (; !qpol_iterator_end(iter); qpol_iterator_next(iter)) {
00fe00
+			if (qpol_iterator_get_item(iter, (void **)&attr_datum))
00fe00
+				goto cleanup;
00fe00
+			if (qpol_type_get_name(q, attr_datum, &type_name))
00fe00
+				goto cleanup;
00fe00
+			PyObject *obj = PyString_FromString(type_name);
00fe00
+			PyList_Append(list, obj);
00fe00
+			Py_DECREF(obj);
00fe00
+		}
00fe00
+		qpol_iterator_destroy(&iter);
00fe00
+		PyDict_SetItemString(dict, "types", list);
00fe00
+		Py_DECREF(list);
00fe00
+	} else		       /* this should never happen */
00fe00
+		goto cleanup;
00fe00
+	
00fe00
+	retval = 0;
00fe00
+cleanup:
00fe00
+	qpol_iterator_destroy(&iter);
00fe00
+	if (retval) {
00fe00
+		Py_DECREF(dict);
00fe00
+		return NULL;
00fe00
+	}
00fe00
+	return dict;
00fe00
+}
00fe00
+
00fe00
+/**
00fe00
+ * Gets statistics regarding a policy's attributes.
00fe00
+ * If this function is given a name, it will attempt to
00fe00
+ * get statistics about a particular attribute; otherwise
00fe00
+ * the function gets statistics about all of the policy's
00fe00
+ * attributes.
00fe00
+ *
00fe00
+ * @param name Reference to an attribute's name; if NULL,
00fe00
+ * all object classes will be considered
00fe00
+ * @param policydb Reference to a policy
00fe00
+ *
00fe00
+ * @return 0 on success, < 0 on error.
00fe00
+ */
00fe00
+static PyObject* get_attribs(const char *name, const apol_policy_t * policydb)
00fe00
+{
00fe00
+	int retval = -1;
00fe00
+	PyObject *list = PyList_New(0);
00fe00
+	apol_attr_query_t *attr_query = NULL;
00fe00
+	apol_vector_t *v = NULL;
00fe00
+	const qpol_type_t *type_datum = NULL;
00fe00
+	size_t n_attrs, i;
00fe00
+
00fe00
+	/* we are only getting information about 1 attribute */
00fe00
+	if (name != NULL) {
00fe00
+		attr_query = apol_attr_query_create();
00fe00
+		if (!attr_query)
00fe00
+			goto cleanup;
00fe00
+		if (apol_attr_query_set_attr(policydb, attr_query, name))
00fe00
+			goto cleanup;
00fe00
+		if (apol_attr_get_by_query(policydb, attr_query, &v))
00fe00
+			goto cleanup;
00fe00
+		apol_attr_query_destroy(&attr_query);
00fe00
+		if (apol_vector_get_size(v) == 0) {
00fe00
+			apol_vector_destroy(&v);
00fe00
+			errno = EINVAL;
00fe00
+			goto cleanup;
00fe00
+		}
00fe00
+
00fe00
+		type_datum = apol_vector_get_element(v, (size_t) 0);
00fe00
+		PyObject *obj = get_attr(type_datum, policydb);
00fe00
+		PyList_Append(list, obj);
00fe00
+		Py_DECREF(obj);
00fe00
+	} else {
00fe00
+		attr_query = apol_attr_query_create();
00fe00
+		if (!attr_query)
00fe00
+			goto cleanup;
00fe00
+		if (apol_attr_get_by_query(policydb, attr_query, &v))
00fe00
+			goto cleanup;
00fe00
+		apol_attr_query_destroy(&attr_query);
00fe00
+		n_attrs = apol_vector_get_size(v);
00fe00
+
00fe00
+		for (i = 0; i < n_attrs; i++) {
00fe00
+			/* get qpol_type_t* item from vector */
00fe00
+			type_datum = (qpol_type_t *) apol_vector_get_element(v, (size_t) i);
00fe00
+			if (!type_datum)
00fe00
+				goto cleanup;
00fe00
+			PyObject *obj = get_attr(type_datum, policydb);
00fe00
+			PyList_Append(list, obj);
00fe00
+			Py_DECREF(obj);
00fe00
+		}
00fe00
+	}
00fe00
+	apol_vector_destroy(&v);
00fe00
+
00fe00
+	retval = 0;
00fe00
+      cleanup:
00fe00
+	apol_attr_query_destroy(&attr_query);
00fe00
+	apol_vector_destroy(&v);
00fe00
+	if (retval) {
00fe00
+		Py_DECREF(list);
00fe00
+		PyErr_SetString(PyExc_RuntimeError,strerror(errno));
00fe00
+		return NULL;
00fe00
+	}
00fe00
+	return list;
00fe00
+}
00fe00
+
00fe00
+/**
00fe00
+ * Get a textual representation of a type, and
00fe00
+ * all of that type's attributes.
00fe00
+ *
00fe00
+ * @param type_datum Reference to sepol type_datum
00fe00
+ * @param policydb Reference to a policy
00fe00
+ */
00fe00
+static PyObject* get_type_attrs(const qpol_type_t * type_datum, const apol_policy_t * policydb)
00fe00
+{
00fe00
+	qpol_iterator_t *iter = NULL;
00fe00
+	const char *attr_name = NULL;
00fe00
+	const qpol_type_t *attr_datum = NULL;
00fe00
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
00fe00
+
00fe00
+	if (qpol_type_get_attr_iter(q, type_datum, &iter))
00fe00
+		goto cleanup;
00fe00
+	PyObject *list = PyList_New(0);
00fe00
+	for (; !qpol_iterator_end(iter); qpol_iterator_next(iter)) {
00fe00
+		if (qpol_iterator_get_item(iter, (void **)&attr_datum))
00fe00
+			goto cleanup;
00fe00
+		if (qpol_type_get_name(q, attr_datum, &attr_name))
00fe00
+			goto cleanup;
00fe00
+		PyObject *obj = PyString_FromString(attr_name);
00fe00
+		PyList_Append(list, obj);
00fe00
+		Py_DECREF(obj);
00fe00
+	}
00fe00
+
00fe00
+      cleanup:
00fe00
+	qpol_iterator_destroy(&iter);
00fe00
+	return list;
00fe00
+}
00fe00
+
00fe00
+static PyObject* get_type( const qpol_type_t * type_datum, const apol_policy_t * policydb) {
00fe00
+
00fe00
+	PyObject *dict = PyDict_New(); 
00fe00
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
00fe00
+	const char *type_name = NULL;
00fe00
+
00fe00
+	unsigned char isalias, ispermissive, isattr;
00fe00
+
00fe00
+	if (qpol_type_get_name(q, type_datum, &type_name))
00fe00
+		goto cleanup;
00fe00
+	if (qpol_type_get_isalias(q, type_datum, &isalias))
00fe00
+		goto cleanup;
00fe00
+	if (qpol_type_get_isattr(q, type_datum, &isattr))
00fe00
+		goto cleanup;
00fe00
+	if (qpol_type_get_ispermissive(q, type_datum, &ispermissive))
00fe00
+		goto cleanup;
00fe00
+
00fe00
+	PyObject *obj = PyString_FromString(type_name);
00fe00
+	PyDict_SetItemString(dict, "name", obj);
00fe00
+	Py_DECREF(obj);
00fe00
+	obj = PyBool_FromLong(ispermissive);
00fe00
+	PyDict_SetItemString(dict, "permissive", obj);
00fe00
+	Py_DECREF(obj);
00fe00
+	if (!isattr && !isalias) {
00fe00
+		obj = get_type_attrs(type_datum, policydb);
00fe00
+		PyDict_SetItemString(dict, "attributes", obj);
00fe00
+		Py_DECREF(obj);
00fe00
+	}
00fe00
+	return dict;
00fe00
+cleanup:
00fe00
+	Py_DECREF(dict);
00fe00
+	return NULL;
00fe00
+}
00fe00
+
00fe00
+/**
00fe00
+ * Gets a textual representation of a user, and
00fe00
+ * all of that user's roles.
00fe00
+ *
00fe00
+ * @param type_datum Reference to sepol type_datum
00fe00
+ * @param policydb Reference to a policy
00fe00
+ * roles
00fe00
+ */
00fe00
+static PyObject* get_user(const qpol_user_t * user_datum, const apol_policy_t * policydb)
00fe00
+{
00fe00
+	PyObject *dict = NULL;
00fe00
+	const qpol_role_t *role_datum = NULL;
00fe00
+	qpol_iterator_t *iter = NULL;
00fe00
+	const qpol_mls_range_t *range = NULL;
00fe00
+	const qpol_mls_level_t *dflt_level = NULL;
00fe00
+	apol_mls_level_t *ap_lvl = NULL;
00fe00
+	apol_mls_range_t *ap_range = NULL;
00fe00
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
00fe00
+	char *tmp;
00fe00
+	const char *user_name, *role_name;
00fe00
+
00fe00
+	if (qpol_user_get_name(q, user_datum, &user_name))
00fe00
+		goto cleanup;
00fe00
+
00fe00
+	dict = PyDict_New(); 
00fe00
+	PyObject *obj = PyString_FromString(user_name);
00fe00
+	PyDict_SetItemString(dict, "name", obj);
00fe00
+	Py_DECREF(obj);
00fe00
+
00fe00
+	if (qpol_policy_has_capability(q, QPOL_CAP_MLS)) {
00fe00
+		if (qpol_user_get_dfltlevel(q, user_datum, &dflt_level))
00fe00
+			goto cleanup;
00fe00
+		ap_lvl = apol_mls_level_create_from_qpol_mls_level(policydb, dflt_level);
00fe00
+		tmp = apol_mls_level_render(policydb, ap_lvl);
00fe00
+		if (!tmp)
00fe00
+			goto cleanup;
00fe00
+		obj = PyString_FromString(tmp);
00fe00
+		PyDict_SetItemString(dict, "level", obj);
00fe00
+		Py_DECREF(obj);
00fe00
+		free(tmp);
00fe00
+		/* print default range */
00fe00
+		if (qpol_user_get_range(q, user_datum, &range))
00fe00
+			goto cleanup;
00fe00
+		ap_range = apol_mls_range_create_from_qpol_mls_range(policydb, range);
00fe00
+		tmp = apol_mls_range_render(policydb, ap_range);
00fe00
+		if (!tmp)
00fe00
+			goto cleanup;
00fe00
+		obj = PyString_FromString(tmp);
00fe00
+		PyDict_SetItemString(dict, "range", obj);
00fe00
+		Py_DECREF(obj);
00fe00
+		free(tmp);
00fe00
+	}
00fe00
+	
00fe00
+	if (qpol_user_get_role_iter(q, user_datum, &iter))
00fe00
+		goto cleanup;
00fe00
+	PyObject *list = PyList_New(0);
00fe00
+	for (; !qpol_iterator_end(iter); qpol_iterator_next(iter)) {
00fe00
+		if (qpol_iterator_get_item(iter, (void **)&role_datum)) {
00fe00
+			Py_DECREF(list);
00fe00
+			goto cleanup;
00fe00
+		}
00fe00
+		if (qpol_role_get_name(q, role_datum, &role_name)) {
00fe00
+			Py_DECREF(list);
00fe00
+			goto cleanup;
00fe00
+		}
00fe00
+		PyObject *obj = PyString_FromString(role_name);
00fe00
+		PyList_Append(list, obj);
00fe00
+		Py_DECREF(obj);
00fe00
+	}
00fe00
+	PyDict_SetItemString(dict, "roles", list);
00fe00
+	Py_DECREF(list);
00fe00
+
00fe00
+cleanup:
00fe00
+	qpol_iterator_destroy(&iter);
00fe00
+	apol_mls_level_destroy(&ap_lvl);
00fe00
+	apol_mls_range_destroy(&ap_range);
00fe00
+	return dict;
00fe00
+}
00fe00
+
00fe00
+/**
00fe00
+ * Gets statistics regarding a policy's users.
00fe00
+ * If this function is given a name, it will attempt to
00fe00
+ * get statistics about a particular user; otherwise
00fe00
+ * the function gets statistics about all of the policy's
00fe00
+ * users.
00fe00
+ *
00fe00
+ * @param name Reference to a user's name; if NULL,
00fe00
+ * all users will be considered
00fe00
+ * @param policydb Reference to a policy
00fe00
+ *
00fe00
+ * @return 0 on success, < 0 on error.
00fe00
+ */
00fe00
+static PyObject*  get_users(const char *name, const apol_policy_t * policydb)
00fe00
+{
00fe00
+	int retval = -1;
00fe00
+	PyObject *list = PyList_New(0);
00fe00
+	qpol_iterator_t *iter = NULL;
00fe00
+	const qpol_user_t *user_datum = NULL;
00fe00
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
00fe00
+
00fe00
+	if (name != NULL) {
00fe00
+		if (qpol_policy_get_user_by_name(q, name, &user_datum)) {
00fe00
+			errno = EINVAL;
00fe00
+			goto cleanup;
00fe00
+		}
00fe00
+		PyObject *obj = get_user(user_datum, policydb);
00fe00
+		PyList_Append(list, obj);
00fe00
+		Py_DECREF(obj);
00fe00
+	} else {
00fe00
+		if (qpol_policy_get_user_iter(q, &iter))
00fe00
+			goto cleanup;
00fe00
+
00fe00
+		for (; !qpol_iterator_end(iter); qpol_iterator_next(iter)) {
00fe00
+			if (qpol_iterator_get_item(iter, (void **)&user_datum))
00fe00
+				goto cleanup;
00fe00
+			PyObject *obj = get_user(user_datum, policydb);
00fe00
+			PyList_Append(list, obj);
00fe00
+			Py_DECREF(obj);
00fe00
+		}
00fe00
+		qpol_iterator_destroy(&iter);
00fe00
+	}
00fe00
+
00fe00
+	retval = 0;
00fe00
+      cleanup:
00fe00
+	qpol_iterator_destroy(&iter);
00fe00
+	if (retval) {
00fe00
+		Py_DECREF(list);
00fe00
+		PyErr_SetString(PyExc_RuntimeError,strerror(errno));
00fe00
+		return NULL;
00fe00
+	}
00fe00
+	return list;
00fe00
+}
00fe00
+
00fe00
+/**
00fe00
+ * get a textual representation of a role, and 
00fe00
+ * all of that role's types.
00fe00
+ *
00fe00
+ * @param type_datum Reference to sepol type_datum
00fe00
+ * @param policydb Reference to a policy
00fe00
+ * types
00fe00
+ */
00fe00
+static PyObject* get_role(const qpol_role_t * role_datum, const apol_policy_t * policydb)
00fe00
+{
00fe00
+	int retval = -1;
00fe00
+	PyObject *dict = PyDict_New();
00fe00
+	const char *role_name = NULL, *type_name = NULL;
00fe00
+	const qpol_role_t *dom_datum = NULL;
00fe00
+	const qpol_type_t *type_datum = NULL;
00fe00
+	qpol_iterator_t *iter = NULL;
00fe00
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
00fe00
+	size_t n_dom = 0, n_types = 0;
00fe00
+
00fe00
+	if (qpol_role_get_name(q, role_datum, &role_name))
00fe00
+		goto cleanup;
00fe00
+
00fe00
+	PyObject *obj = PyString_FromString(role_name);
00fe00
+	PyDict_SetItemString(dict, "name", obj);
00fe00
+	Py_DECREF(obj);
00fe00
+
00fe00
+	if (qpol_role_get_dominate_iter(q, role_datum, &iter))
00fe00
+		goto cleanup;
00fe00
+	if (qpol_iterator_get_size(iter, &n_dom))
00fe00
+		goto cleanup;
00fe00
+	if ((int)n_dom > 0) {
00fe00
+		PyObject *list = PyList_New(0);
00fe00
+		for (; !qpol_iterator_end(iter); qpol_iterator_next(iter)) {
00fe00
+			if (qpol_iterator_get_item(iter, (void **)&dom_datum))
00fe00
+				goto cleanup;
00fe00
+			if (qpol_role_get_name(q, dom_datum, &role_name))
00fe00
+				goto cleanup;
00fe00
+			PyObject *obj = PyString_FromString(role_name);
00fe00
+			PyList_Append(list, obj);
00fe00
+			Py_DECREF(obj);
00fe00
+		}
00fe00
+		PyDict_SetItemString(dict, "dominate", list);
00fe00
+		Py_DECREF(list);
00fe00
+	}
00fe00
+	qpol_iterator_destroy(&iter);
00fe00
+	
00fe00
+	if (qpol_role_get_type_iter(q, role_datum, &iter))
00fe00
+		goto cleanup;
00fe00
+	if (qpol_iterator_get_size(iter, &n_types))
00fe00
+		goto cleanup;
00fe00
+	if ((int)n_types > 0) {
00fe00
+		PyObject *list = PyList_New(0);
00fe00
+		/* print types */
00fe00
+		for (; !qpol_iterator_end(iter); qpol_iterator_next(iter)) {
00fe00
+			if (qpol_iterator_get_item(iter, (void **)&type_datum))
00fe00
+				goto cleanup;
00fe00
+			if (qpol_type_get_name(q, type_datum, &type_name))
00fe00
+				goto cleanup;
00fe00
+			PyObject *obj = PyString_FromString(type_name);
00fe00
+			PyList_Append(list, obj);
00fe00
+			Py_DECREF(obj);
00fe00
+		}
00fe00
+		PyDict_SetItemString(dict, "types", list);
00fe00
+		Py_DECREF(list);
00fe00
+	}
00fe00
+
00fe00
+	retval = 0;
00fe00
+cleanup:
00fe00
+	qpol_iterator_destroy(&iter);
00fe00
+	if (retval) {
00fe00
+		Py_DECREF(dict);
00fe00
+		PyErr_SetString(PyExc_RuntimeError,strerror(errno));
00fe00
+		return NULL;
00fe00
+	}
00fe00
+	return dict;
00fe00
+}
00fe00
+
00fe00
+/**
764e71
+ * Get statistics regarding a policy's ports.
764e71
+ * If this function is given a name, it will attempt to
764e71
+ * get statistics about a particular port; otherwise
764e71
+ * the function get statistics about all of the policy's ports.
764e71
+ *
764e71
+ * @param name Reference to an port's name; if NULL,
764e71
+ * all ports will be considered
764e71
+ * @param policydb Reference to a policy
764e71
+ *
764e71
+ * @return 0 on success, < 0 on error.
764e71
+ */
764e71
+static PyObject*  get_ports(const char *num, const apol_policy_t * policydb)
764e71
+{
764e71
+	PyObject *list = PyList_New(0);
764e71
+	int retval = -1;
764e71
+	const qpol_portcon_t *portcon = NULL;
764e71
+	qpol_iterator_t *iter = NULL;
764e71
+	uint16_t low_port, high_port;
764e71
+	uint8_t ocon_proto;
764e71
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
764e71
+	const qpol_context_t *ctxt = NULL;
764e71
+	const char *proto_str;
764e71
+	PyObject *dict;
764e71
+	const char *type = NULL;
764e71
+	const apol_mls_range_t *range = NULL;
764e71
+	char *range_str = NULL;
764e71
+	PyObject *obj = NULL;
764e71
+	apol_context_t *c = NULL;
764e71
+
764e71
+	if (qpol_policy_get_portcon_iter(q, &iter))
764e71
+		goto cleanup;
764e71
+
764e71
+	for (; !qpol_iterator_end(iter); qpol_iterator_next(iter)) {
764e71
+		if (qpol_iterator_get_item(iter, (void **)&portcon))
764e71
+			goto cleanup;
764e71
+		if (qpol_portcon_get_low_port(q, portcon, &low_port))
764e71
+			goto cleanup;
764e71
+		if (qpol_portcon_get_high_port(q, portcon, &high_port))
764e71
+			goto cleanup;
764e71
+		if (qpol_portcon_get_protocol(q, portcon, &ocon_proto))
764e71
+			goto cleanup;
764e71
+		if (num) {
764e71
+			if (atoi(num) < low_port || atoi(num) > high_port)
764e71
+				continue;
764e71
+		}
764e71
+
764e71
+		if ((ocon_proto != IPPROTO_TCP) &&
764e71
+		    (ocon_proto != IPPROTO_UDP)) 
764e71
+			goto cleanup;
764e71
+
764e71
+		if (qpol_portcon_get_context(q, portcon, &ctxt)) {
764e71
+			PyErr_SetString(PyExc_RuntimeError, "Could not get for port context.");
764e71
+			goto cleanup;
764e71
+		}
764e71
+
764e71
+		if ((proto_str = apol_protocol_to_str(ocon_proto)) == NULL) {
764e71
+			PyErr_SetString(PyExc_RuntimeError, "Invalid protocol for port");
764e71
+			goto cleanup;
764e71
+		}
764e71
+
764e71
+		if ((c = apol_context_create_from_qpol_context(policydb, ctxt)) == NULL) {
764e71
+			goto cleanup;
764e71
+		}
764e71
+		
764e71
+		if((type = apol_context_get_type(c)) == NULL) {
764e71
+			apol_context_destroy(&c);
764e71
+			goto cleanup;
764e71
+		}
764e71
+			
764e71
+		dict = PyDict_New(); 
764e71
+		obj = PyString_FromString(type);
764e71
+		PyDict_SetItemString(dict, "type", obj);
764e71
+		Py_DECREF(obj);
764e71
+
764e71
+		if((range = apol_context_get_range(c)) == NULL) {
764e71
+			goto cleanup;
764e71
+		}
764e71
+			
764e71
+		range_str = apol_mls_range_render(policydb, range);
764e71
+		if (range_str == NULL) {
764e71
+			goto cleanup;
764e71
+		}
764e71
+		obj = PyString_FromString(range_str);
764e71
+		PyDict_SetItemString(dict, "range", obj);
764e71
+		Py_DECREF(obj);
764e71
+
764e71
+		obj = PyString_FromString(proto_str);
764e71
+		PyDict_SetItemString(dict, "protocol", obj);
764e71
+		Py_DECREF(obj);
764e71
+
764e71
+		obj = PyInt_FromLong(high_port);
764e71
+		PyDict_SetItemString(dict, "high", obj);
764e71
+		Py_DECREF(obj);
764e71
+
764e71
+		obj = PyInt_FromLong(low_port);
764e71
+		PyDict_SetItemString(dict, "low", obj);
764e71
+		Py_DECREF(obj);
764e71
+
764e71
+		PyList_Append(list, dict);
764e71
+		Py_DECREF(dict);
764e71
+	}
764e71
+	retval = 0;
764e71
+      cleanup:
764e71
+	free(range_str);
764e71
+	apol_context_destroy(&c);
764e71
+	qpol_iterator_destroy(&iter);
764e71
+
764e71
+	if (retval) {
764e71
+		Py_DECREF(list);
764e71
+		PyErr_SetString(PyExc_RuntimeError,strerror(errno));
764e71
+		return NULL;
764e71
+	}
764e71
+	return list;
764e71
+}
764e71
+
764e71
+/**
00fe00
+ * Get statistics regarding a policy's roles.
00fe00
+ * If this function is given a name, it will attempt to
00fe00
+ * get statistics about a particular role; otherwise
00fe00
+ * the function get statistics about all of the policy's roles.
00fe00
+ *
00fe00
+ * @param name Reference to an role's name; if NULL,
00fe00
+ * all roles will be considered
00fe00
+ * @param policydb Reference to a policy
00fe00
+ *
00fe00
+ * @return 0 on success, < 0 on error.
00fe00
+ */
00fe00
+static PyObject*  get_roles(const char *name, const apol_policy_t * policydb)
00fe00
+{
00fe00
+	int retval = -1;
00fe00
+	PyObject *list = PyList_New(0);
00fe00
+	const qpol_role_t *role_datum = NULL;
00fe00
+	qpol_iterator_t *iter = NULL;
00fe00
+	qpol_policy_t *q = apol_policy_get_qpol(policydb);
00fe00
+
00fe00
+	if (name != NULL) {
00fe00
+		if (qpol_policy_get_role_by_name(q, name, &role_datum)) {
00fe00
+			errno = EINVAL;
00fe00
+			goto cleanup;
00fe00
+		}
00fe00
+		PyObject *obj = get_role(role_datum, policydb);
00fe00
+		PyList_Append(list, obj);
00fe00
+		Py_DECREF(obj);
00fe00
+	} else {