Compare commits

...

8 Commits
rawhide ... f18

Author SHA1 Message Date
Dan Walsh 6642f8afec Rebuild using pristine source from Tresys 2013-02-28 09:33:58 -05:00
Dan Walsh 0b9f99b04c Rebuild using pristine source from Tresys 2013-02-28 09:10:47 -05:00
Dan Walsh 87569f6d1a Rebuild using pristine source from Tresys 2013-02-26 12:14:42 -05:00
Dan Walsh a028805d07 Rebuild using pristine source from Tresys 2013-01-30 11:51:46 -05:00
Dan Walsh 8f27e92cc1 Add filename_trans to python/setools/sesearch bindings 2012-12-17 15:46:52 -05:00
rhatdan ceb181114d Apply Lars Jensen patch to fix seaudit 2012-09-29 06:44:03 -04:00
rhatdan fb11201bf1 Apply Lars Jensen patch to fix seaudit 2012-09-29 06:38:56 -04:00
rhatdan ff8f52de46 Remove tools that we do not want to support 2012-09-18 12:44:34 -04:00
7 changed files with 1720 additions and 362 deletions

View File

@ -1,46 +1,6 @@
From 32e8d1d3619dcdb40431c7eae3fe00efaae089c6 Mon Sep 17 00:00:00 2001
From: Dan Walsh <dwalsh@redhat.com>
Date: Tue, 20 Sep 2011 15:38:50 -0400
Subject: [PATCH 1/6] add-setools-seinfo-and-sesearch-python-bindings
---
Makefile.am | 2 +-
configure.ac | 14 +-
python/Makefile.am | 1 +
python/Makefile.in | 716 +++++++++++++++++++++++++++++++++++++++++
python/setools/Makefile.am | 36 ++
python/setools/Makefile.in | 550 +++++++++++++++++++++++++++++++
python/setools/__init__.py | 50 +++
python/setools/seinfo.c | 769 ++++++++++++++++++++++++++++++++++++++++++++
python/setools/sesearch.c | 478 +++++++++++++++++++++++++++
python/setools/setup.py | 25 ++
11 files changed, 2635 insertions(+), 8 deletions(-)
create mode 100644 python/Makefile.am
create mode 100644 python/Makefile.in
create mode 100644 python/setools/Makefile.am
create mode 100644 python/setools/Makefile.in
create mode 100644 python/setools/__init__.py
create mode 100644 python/setools/seinfo.c
create mode 100644 python/setools/sesearch.c
create mode 100644 python/setools/setup.py
diff --git a/Makefile.am b/Makefile.am
index 5dc1b5d..176c8ea 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,7 +10,7 @@ if BUILD_GUI
endif
# sediffx is also built conditionally, from sediffx/Makefile.am
-SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI)
+SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI) python
#old indent opts
#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
diff --git a/configure.ac b/configure.ac
index b885981..e837e03 100644
--- a/configure.ac
+++ b/configure.ac
diff -up setools-3.3.7/configure.ac.python setools-3.3.7/configure.ac
--- setools-3.3.7/configure.ac.python 2010-04-30 10:25:48.000000000 -0400
+++ setools-3.3.7/configure.ac 2012-09-29 08:24:31.587998703 -0400
@@ -194,7 +194,7 @@ AC_ARG_ENABLE(swig-java,
enable_jswig="$enableval")
if test "x${enable_jswig}" = xyes; then
@ -95,25 +55,32 @@ index b885981..e837e03 100644
packages/Makefile packages/rpm/Makefile \
packages/libqpol.pc packages/libapol.pc packages/libpoldiff.pc packages/libseaudit.pc packages/libsefs.pc])
diff --git a/python/Makefile.am b/python/Makefile.am
new file mode 100644
index 0000000..a1510c8
--- /dev/null
+++ b/python/Makefile.am
diff -up setools-3.3.7/Makefile.am.python setools-3.3.7/Makefile.am
--- setools-3.3.7/Makefile.am.python 2008-02-22 14:06:28.000000000 -0500
+++ setools-3.3.7/Makefile.am 2012-09-29 08:24:31.586998699 -0400
@@ -10,7 +10,7 @@ if BUILD_GUI
endif
# sediffx is also built conditionally, from sediffx/Makefile.am
-SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI)
+SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI) python
#old indent opts
#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
diff -up setools-3.3.7/python/Makefile.am.python setools-3.3.7/python/Makefile.am
--- setools-3.3.7/python/Makefile.am.python 2012-09-29 08:26:07.643330216 -0400
+++ setools-3.3.7/python/Makefile.am 2012-09-29 08:26:07.643330216 -0400
@@ -0,0 +1 @@
+SUBDIRS = setools
diff --git a/python/Makefile.in b/python/Makefile.in
new file mode 100644
index 0000000..48c87ab
--- /dev/null
+++ b/python/Makefile.in
@@ -0,0 +1,716 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
diff -up setools-3.3.7/python/Makefile.in.python setools-3.3.7/python/Makefile.in
--- setools-3.3.7/python/Makefile.in.python 2012-09-29 08:26:07.643330216 -0400
+++ setools-3.3.7/python/Makefile.in 2012-09-29 08:26:07.657330271 -0400
@@ -0,0 +1,731 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
@ -125,6 +92,23 @@ index 0000000..48c87ab
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
@ -175,6 +159,11 @@ index 0000000..48c87ab
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
@ -515,12 +504,12 @@ index 0000000..48c87ab
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
@ -530,7 +519,11 @@ index 0000000..48c87ab
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
@ -544,37 +537,6 @@ index 0000000..48c87ab
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
@ -583,6 +545,10 @@ index 0000000..48c87ab
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+cscopelist-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@ -646,6 +612,20 @@ index 0000000..48c87ab
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
@ -681,13 +661,10 @@ index 0000000..48c87ab
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
@ -722,10 +699,15 @@ index 0000000..48c87ab
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
@ -803,32 +785,86 @@ index 0000000..48c87ab
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+ install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+ cscopelist-recursive ctags-recursive install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-am clean clean-generic clean-libtool \
+ ctags ctags-recursive distclean distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
+ cscopelist cscopelist-recursive ctags ctags-recursive \
+ distclean distclean-generic distclean-libtool distclean-tags \
+ distdir dvi dvi-am html html-am info info-am install \
+ install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-recursive uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/python/setools/Makefile.am b/python/setools/Makefile.am
new file mode 100644
index 0000000..c4635fb
--- /dev/null
+++ b/python/setools/Makefile.am
diff -up setools-3.3.7/python/setools/__init__.py.python setools-3.3.7/python/setools/__init__.py
--- setools-3.3.7/python/setools/__init__.py.python 2012-09-29 08:26:07.650330243 -0400
+++ setools-3.3.7/python/setools/__init__.py 2012-09-29 08:26:07.644330220 -0400
@@ -0,0 +1,51 @@
+#!/usr/bin/env python
+
+# Author: Thomas Liu <tliu@redhat.com>
+
+import _sesearch
+import _seinfo
+import types
+
+TYPE = _seinfo.TYPE
+ROLE = _seinfo.ROLE
+ATTRIBUTE = _seinfo.ATTRIBUTE
+PORT = _seinfo.PORT
+USER = _seinfo.USER
+
+ALLOW = 'allow'
+AUDITALLOW = 'auditallow'
+NEVERALLOW = 'neverallow'
+DONTAUDIT = 'dontaudit'
+SCONTEXT = 'scontext'
+TCONTEXT = 'tcontext'
+PERMS = 'permlist'
+CLASS = 'class'
+TRANSITION = 'transition'
+
+def sesearch(types, info):
+ valid_types = [ALLOW, AUDITALLOW, NEVERALLOW, DONTAUDIT, TRANSITION]
+ for type in types:
+ if type not in valid_types:
+ raise ValueError("Type has to be in %s" % valid_types)
+ info[type] = True
+
+ perms = []
+ if PERMS in info:
+ perms = info[PERMS]
+ info[PERMS] = ",".join(info[PERMS])
+
+
+ dict_list = _sesearch.sesearch(info)
+ if dict_list and len(perms) != 0:
+ dict_list = filter(lambda x: dict_has_perms(x, perms), dict_list)
+ return dict_list
+
+def dict_has_perms(dict, perms):
+ for perm in perms:
+ if perm not in dict[PERMS]:
+ return False
+ return True
+
+def seinfo(setype, name=None):
+ dict_list = _seinfo.seinfo(setype, name)
+ return dict_list
diff -up setools-3.3.7/python/setools/Makefile.am.python setools-3.3.7/python/setools/Makefile.am
--- setools-3.3.7/python/setools/Makefile.am.python 2012-09-29 08:26:07.650330243 -0400
+++ setools-3.3.7/python/setools/Makefile.am 2012-09-29 08:26:07.649330238 -0400
@@ -0,0 +1,36 @@
+EXTRA_DIST = \
+ sesearch.c \
@ -866,18 +902,15 @@ index 0000000..c4635fb
+ $(PYTHON) setup.py clean -a
+ rm -f *~
+
diff --git a/python/setools/Makefile.in b/python/setools/Makefile.in
new file mode 100644
index 0000000..704ffc7
--- /dev/null
+++ b/python/setools/Makefile.in
@@ -0,0 +1,550 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
diff -up setools-3.3.7/python/setools/Makefile.in.python setools-3.3.7/python/setools/Makefile.in
--- setools-3.3.7/python/setools/Makefile.in.python 2012-09-29 08:26:07.649330238 -0400
+++ setools-3.3.7/python/setools/Makefile.in 2012-09-29 08:26:07.656330267 -0400
@@ -0,0 +1,578 @@
+# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# Copyright (C) 1994-2012 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
@ -889,6 +922,23 @@ index 0000000..704ffc7
+
+@SET_MAKE@
+VPATH = @srcdir@
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
@ -932,6 +982,11 @@ index 0000000..704ffc7
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
@ -1260,6 +1315,8 @@ index 0000000..704ffc7
+ctags: CTAGS
+CTAGS:
+
+cscope cscopelist:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@ -1305,10 +1362,15 @@ index 0000000..704ffc7
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
@ -1422,67 +1484,9 @@ index 0000000..704ffc7
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/python/setools/__init__.py b/python/setools/__init__.py
new file mode 100644
index 0000000..6f075c4
--- /dev/null
+++ b/python/setools/__init__.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+
+# Author: Thomas Liu <tliu@redhat.com>
+
+import _sesearch
+import _seinfo
+import types
+
+TYPE = _seinfo.TYPE
+ROLE = _seinfo.ROLE
+ATTRIBUTE = _seinfo.ATTRIBUTE
+PORT = _seinfo.PORT
+USER = _seinfo.USER
+
+ALLOW = 'allow'
+AUDITALLOW = 'auditallow'
+NEVERALLOW = 'neverallow'
+DONTAUDIT = 'dontaudit'
+SCONTEXT = 'scontext'
+TCONTEXT = 'tcontext'
+PERMS = 'permlist'
+CLASS = 'class'
+
+def sesearch(types, info):
+ valid_types = [ALLOW, AUDITALLOW, NEVERALLOW, DONTAUDIT]
+ for type in types:
+ if type not in valid_types:
+ raise ValueError("Type has to be in %s" % valid_types)
+ info[type] = True
+
+ perms = []
+ if PERMS in info:
+ perms = info[PERMS]
+ info[PERMS] = ",".join(info[PERMS])
+
+
+ dict_list = _sesearch.sesearch(info)
+ if dict_list and len(perms) != 0:
+ dict_list = filter(lambda x: dict_has_perms(x, perms), dict_list)
+ return dict_list
+
+def dict_has_perms(dict, perms):
+ for perm in perms:
+ if perm not in dict[PERMS]:
+ return False
+ return True
+
+def seinfo(setype, name=None):
+ dict_list = _seinfo.seinfo(setype, name)
+ return dict_list
diff --git a/python/setools/seinfo.c b/python/setools/seinfo.c
new file mode 100644
index 0000000..211930a
--- /dev/null
+++ b/python/setools/seinfo.c
diff -up setools-3.3.7/python/setools/seinfo.c.python setools-3.3.7/python/setools/seinfo.c
--- setools-3.3.7/python/setools/seinfo.c.python 2012-09-29 08:26:07.655330263 -0400
+++ setools-3.3.7/python/setools/seinfo.c 2012-09-29 08:26:07.656330267 -0400
@@ -0,0 +1,769 @@
+/**
+ * @file
@ -2253,12 +2257,10 @@ index 0000000..211930a
+ PyModule_AddIntConstant(m, "TYPE", TYPE);
+ PyModule_AddIntConstant(m, "USER", USER);
+}
diff --git a/python/setools/sesearch.c b/python/setools/sesearch.c
new file mode 100644
index 0000000..faaf8b7
--- /dev/null
+++ b/python/setools/sesearch.c
@@ -0,0 +1,478 @@
diff -up setools-3.3.7/python/setools/sesearch.c.python setools-3.3.7/python/setools/sesearch.c
--- setools-3.3.7/python/setools/sesearch.c.python 2012-09-29 08:26:07.650330243 -0400
+++ setools-3.3.7/python/setools/sesearch.c 2012-09-29 08:26:07.650330243 -0400
@@ -0,0 +1,668 @@
+// Author: Thomas Liu <tliu@redhat.com>
+
+/**
@ -2355,6 +2357,184 @@ index 0000000..faaf8b7
+ apol_vector_t *perm_vector;
+} options_t;
+
+static int perform_ft_query(const apol_policy_t * policy, const options_t * opt, apol_vector_t ** v)
+{
+ apol_filename_trans_query_t *ftq = NULL;
+ size_t i;
+ int error = 0;
+
+ if (!policy || !opt || !v) {
+ PyErr_SetString(PyExc_RuntimeError,strerror(EINVAL));
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (!opt->type && !opt->all) {
+ *v = NULL;
+ return 0; /* no search to do */
+ }
+
+ ftq = apol_filename_trans_query_create();
+ if (!ftq) {
+ PyErr_SetString(PyExc_RuntimeError,strerror(ENOMEM));
+ errno = ENOMEM;
+ return -1;
+ }
+
+ apol_filename_trans_query_set_regex(policy, ftq, opt->useregex);
+ if (opt->src_name) {
+ if (apol_filename_trans_query_set_source(policy, ftq, opt->src_name, opt->indirect)) {
+ goto err;
+ }
+ }
+
+ if (opt->tgt_name) {
+ if (apol_filename_trans_query_set_target(policy, ftq, opt->tgt_name, opt->indirect)) {
+ goto err;
+ }
+ }
+#if 0
+ if (opt->default_name) {
+ if (apol_filename_trans_query_set_default(policy, ftq, opt->default_name)) {
+ goto err;
+ }
+ }
+#endif
+ if (opt->class_name) {
+ if (opt->class_vector == NULL) {
+ if (apol_filename_trans_query_append_class(policy, ftq, opt->class_name)) {
+ goto err;
+ }
+ } else {
+ for (i = 0; i < apol_vector_get_size(opt->class_vector); ++i) {
+ char *class_name;
+ class_name = apol_vector_get_element(opt->class_vector, i);
+ if (!class_name)
+ continue;
+ if (apol_filename_trans_query_append_class(policy, ftq, class_name)) {
+ goto err;
+ }
+ }
+ }
+ }
+
+ if (apol_filename_trans_get_by_query(policy, ftq, v)) {
+ error = errno;
+ }
+
+ apol_filename_trans_query_destroy(&ftq);
+ return 0;
+
+ err:
+ error = errno;
+ PyErr_SetString(PyExc_RuntimeError,strerror(errno));
+ apol_vector_destroy(v);
+ apol_filename_trans_query_destroy(&ftq);
+ errno = error;
+ return -1;
+}
+
+static PyObject* get_ft_results(const apol_policy_t * policy, const options_t * opt, const apol_vector_t * v, PyObject *list)
+{
+ PyObject *obj;
+ size_t i, num_filename_trans = 0;
+ const char *tmp_name;
+ int error = 0;
+ const qpol_filename_trans_t *filename_trans = NULL;
+ const qpol_class_t *obj_class = NULL;
+ char *tmp = NULL, *filename_trans_str = NULL, *expr = NULL;
+ qpol_policy_t *q = apol_policy_get_qpol(policy);
+ const qpol_type_t *type = NULL;
+
+ if (!(num_filename_trans = apol_vector_get_size(v)))
+ goto cleanup;
+
+ for (i = 0; i < num_filename_trans; i++) {
+ if (!(filename_trans = apol_vector_get_element(v, i)))
+ goto cleanup;
+
+ PyObject *dict = PyDict_New();
+
+ obj = PyString_FromString("type_transition");
+ PyDict_SetItemString(dict, "type", obj);
+ Py_DECREF(obj);
+
+ /* source type */
+ if (qpol_filename_trans_get_source_type(q, filename_trans, &type)) {
+ goto err;
+ }
+ if (qpol_type_get_name(q, type, &tmp_name)) {
+ goto err;
+ }
+
+ obj = PyString_FromString(tmp_name);
+ PyDict_SetItemString(dict, "source", obj);
+ Py_DECREF(obj);
+
+ /* target type */
+ if (qpol_filename_trans_get_target_type(q, filename_trans, &type)) {
+ goto err;
+ }
+ if (qpol_type_get_name(q, type, &tmp_name)) {
+ goto err;
+ }
+
+ obj = PyString_FromString(tmp_name);
+ PyDict_SetItemString(dict, "target", obj);
+ Py_DECREF(obj);
+
+ /* object class */
+ if (qpol_filename_trans_get_object_class(q, filename_trans, &obj_class)) {
+ goto err;
+ }
+ if (qpol_class_get_name(q, obj_class, &tmp_name)) {
+ goto err;
+ }
+
+ obj = PyString_FromString(tmp_name);
+ PyDict_SetItemString(dict, "class", obj);
+ Py_DECREF(obj);
+
+ /* default type */
+ if (qpol_filename_trans_get_default_type(q, filename_trans, &type)) {
+ goto err;
+ }
+ if (qpol_type_get_name(q, type, &tmp_name)) {
+ goto err;
+ }
+
+ obj = PyString_FromString(tmp_name);
+ PyDict_SetItemString(dict, "transtype", obj);
+ Py_DECREF(obj);
+
+ if (qpol_filename_trans_get_filename(q, filename_trans, &tmp_name)) {
+ goto err;
+ }
+
+ obj = PyString_FromString(tmp_name);
+ PyDict_SetItemString(dict, "filename", obj);
+ Py_DECREF(obj);
+
+ PyList_Append(list, dict);
+ Py_DECREF(dict);
+
+ free(filename_trans_str);
+ filename_trans_str = NULL;
+ free(expr);
+ expr = NULL;
+ }
+ goto cleanup;
+err:
+ error = errno;
+ PyErr_SetString(PyExc_RuntimeError,strerror(errno));
+ errno = error;
+cleanup:
+ free(tmp);
+ free(filename_trans_str);
+ free(expr);
+ return list;
+}
+
+static int perform_av_query(const apol_policy_t * policy, const options_t * opt, apol_vector_t ** v)
+{
+ apol_avrule_query_t *avq = NULL;
@ -2404,7 +2584,7 @@ index 0000000..faaf8b7
+ }
+ } else {
+ size_t i;
+ for (i = 0; i < apol_vector_get_size(opt->class_vector); ++i) {
+ for (i = 0; i < apol_vector_get_size(opt->class_vector); ++i) {
+ char *class_name;
+ class_name = apol_vector_get_element(opt->class_vector, i);
+ if (!class_name)
@ -2460,15 +2640,12 @@ index 0000000..faaf8b7
+
+
+
+static PyObject* get_av_results(const apol_policy_t * policy, const options_t * opt, const apol_vector_t * v)
+static PyObject* get_av_results(const apol_policy_t * policy, const options_t * opt, const apol_vector_t * v, PyObject *list)
+{
+ int retval = -1;
+ PyObject *list = PyList_New(0);
+ qpol_policy_t *q = apol_policy_get_qpol(policy);
+ size_t i, num_rules = 0;
+ const qpol_avrule_t *rule = NULL;
+ char *tmp = NULL, *rule_str = NULL, *expr = NULL;
+ char enable_char = ' ', branch_char = ' ';
+ qpol_iterator_t *iter = NULL;
+ uint32_t enabled = 0;
+
@ -2479,23 +2656,22 @@ index 0000000..faaf8b7
+ return NULL;
+
+ for (i = 0; i < num_rules; i++) {
+ enable_char = branch_char = ' ';
+ if (!(rule = apol_vector_get_element(v, i)))
+ goto cleanup;
+
+
+ if (qpol_avrule_get_is_enabled(q, rule, &enabled))
+ goto cleanup;
+ if (!enabled)
+ continue;
+
+
+ const qpol_type_t *type;
+ const char *tmp_name;
+ uint32_t rule_type = 0;
+
+
+ const qpol_class_t *obj_class = NULL;
+
+ PyObject *dict = PyDict_New();
+
+
+ PyObject *dict = PyDict_New();
+
+ qpol_avrule_get_rule_type(q, rule, &rule_type);
+ tmp_name = apol_rule_type_to_str(rule_type);
+ PyObject *obj = PyString_FromString(tmp_name);
@ -2507,13 +2683,13 @@ index 0000000..faaf8b7
+ obj = PyString_FromString(tmp_name);
+ PyDict_SetItemString(dict, "scontext", obj);
+ Py_DECREF(obj);
+
+
+ qpol_avrule_get_target_type(q, rule, &type);
+ qpol_type_get_name(q, type, &tmp_name);
+ obj = PyString_FromString(tmp_name);
+ PyDict_SetItemString(dict, "tcontext", obj);
+ Py_DECREF(obj);
+
+
+ qpol_avrule_get_object_class(q, rule, &obj_class);
+ qpol_type_get_name(q, type, &tmp_name);
+ obj = PyString_FromString(tmp_name);
@ -2530,53 +2706,50 @@ index 0000000..faaf8b7
+ }
+ PyDict_SetItemString(dict, "permlist", permlist);
+ Py_DECREF(permlist);
+ PyList_Append(list, dict);
+ PyList_Append(list, dict);
+ Py_DECREF(dict);
+
+
+ free(rule_str);
+ rule_str = NULL;
+ free(expr);
+ expr = NULL;
+ }
+ retval = 0;
+
+ cleanup:
+ free(tmp);
+ free(rule_str);
+ free(expr);
+ if (retval) {
+ Py_DECREF(list);
+ return NULL;
+ }
+ return list;
+}
+
+
+PyObject* sesearch(bool allow,
+ bool neverallow,
+ bool auditallow,
+ bool dontaudit,
+ const char *src_name,
+ const char *tgt_name,
+ const char *class_name,
+ const char *permlist
+ )
+ bool neverallow,
+ bool auditallow,
+ bool dontaudit,
+ bool transition,
+ const char *src_name,
+ const char *tgt_name,
+ const char *class_name,
+ const char *permlist
+ )
+{
+ options_t cmd_opts;
+ int rt = -1;
+ PyObject *output = NULL;
+
+ PyObject *output = PyList_New(0);
+ apol_policy_t *policy = NULL;
+ apol_vector_t *v = NULL;
+ apol_policy_path_t *pol_path = NULL;
+ apol_vector_t *mod_paths = NULL;
+ apol_policy_path_type_e path_type = APOL_POLICY_PATH_TYPE_MONOLITHIC;
+
+
+ memset(&cmd_opts, 0, sizeof(cmd_opts));
+ cmd_opts.indirect = true;
+ cmd_opts.allow = allow;
+ cmd_opts.nallow = neverallow;
+ cmd_opts.auditallow = auditallow;
+ cmd_opts.dontaudit = dontaudit;
+ cmd_opts.type = transition;
+ if (src_name)
+ cmd_opts.src_name = strdup(src_name);
+ if (tgt_name)
@ -2590,15 +2763,15 @@ index 0000000..faaf8b7
+ int pol_opt = 0;
+ if (!(cmd_opts.nallow || cmd_opts.all))
+ pol_opt |= QPOL_POLICY_OPTION_NO_NEVERALLOWS;
+
+
+
+
+ rt = qpol_default_policy_find(&policy_file);
+ if (rt) {
+ PyErr_SetString(PyExc_RuntimeError,"No default policy found.");
+ return NULL;
+ }
+ pol_opt |= QPOL_POLICY_OPTION_MATCH_SYSTEM;
+
+
+ if (apol_file_is_policy_path_list(policy_file) > 0) {
+ pol_path = apol_policy_path_create_from_file(policy_file);
+ if (!pol_path) {
@ -2617,7 +2790,7 @@ index 0000000..faaf8b7
+ }
+ free(policy_file);
+ apol_vector_destroy(&mod_paths);
+
+
+ policy = apol_policy_create_from_policy_path(pol_path, pol_opt, NULL, NULL);
+ if (!policy) {
+ apol_policy_path_destroy(&pol_path);
@ -2677,9 +2850,23 @@ index 0000000..faaf8b7
+ goto cleanup;
+ }
+ if (v) {
+ output = get_av_results(policy, &cmd_opts, v);
+ output = get_av_results(policy, &cmd_opts, v, output);
+ }
+
+ if (cmd_opts.all || cmd_opts.type) {
+ apol_vector_destroy(&v);
+ if (perform_ft_query(policy, &cmd_opts, &v)) {
+ rt = 1;
+ goto cleanup;
+ }
+
+ if (v) {
+ output = get_ft_results(policy, &cmd_opts, v, output);
+ }
+ }
+
+ apol_vector_destroy(&v);
+
+ cleanup:
+ apol_policy_destroy(&policy);
+ apol_policy_path_destroy(&pol_path);
@ -2693,38 +2880,43 @@ index 0000000..faaf8b7
+ apol_vector_destroy(&cmd_opts.perm_vector);
+ apol_vector_destroy(&cmd_opts.class_vector);
+
+ if (output) return output;
+ return Py_None;
+ if (PyList_GET_SIZE(output) == 0) {
+ Py_DECREF(output);
+ return Py_None;
+ }
+ return output;
+}
+
+static int Dict_ContainsInt(PyObject *dict, const char *key){
+ PyObject *item = PyDict_GetItemString(dict, key);
+ if (item)
+ return PyInt_AsLong(item);
+ return PyInt_AsLong(item);
+ return false;
+}
+
+static const char *Dict_ContainsString(PyObject *dict, const char *key){
+ PyObject *item = PyDict_GetItemString(dict, key);
+ if (item)
+ return PyString_AsString(item);
+ return PyString_AsString(item);
+ return NULL;
+}
+
+PyObject *wrap_sesearch(PyObject *self, PyObject *args){
+ PyObject *dict;
+ if (!PyArg_ParseTuple(args, "O", &dict))
+ return NULL;
+ return NULL;
+ int allow = Dict_ContainsInt(dict, "allow");
+ int neverallow = Dict_ContainsInt(dict, "neverallow");
+ int auditallow = Dict_ContainsInt(dict, "auditallow");
+ int dontaudit = Dict_ContainsInt(dict, "dontaudit");
+
+ int dontaudit = Dict_ContainsInt(dict, "dontaudit");
+ int transition = Dict_ContainsInt(dict, "transition");
+
+ const char *src_name = Dict_ContainsString(dict, "scontext");
+ const char *tgt_name = Dict_ContainsString(dict, "tcontext");
+ const char *class_name = Dict_ContainsString(dict, "class");
+ const char *permlist = Dict_ContainsString(dict, "permlist");
+
+ return Py_BuildValue("O",sesearch(allow, neverallow, auditallow, dontaudit, src_name, tgt_name, class_name, permlist));
+
+ return Py_BuildValue("O",sesearch(allow, neverallow, auditallow, dontaudit, transition, src_name, tgt_name, class_name, permlist));
+
+}
+
@ -2737,11 +2929,9 @@ index 0000000..faaf8b7
+ PyObject *m;
+ m = Py_InitModule("_sesearch", methods);
+}
diff --git a/python/setools/setup.py b/python/setools/setup.py
new file mode 100644
index 0000000..053b885
--- /dev/null
+++ b/python/setools/setup.py
diff -up setools-3.3.7/python/setools/setup.py.python setools-3.3.7/python/setools/setup.py
--- setools-3.3.7/python/setools/setup.py.python 2012-09-29 08:26:07.650330243 -0400
+++ setools-3.3.7/python/setools/setup.py 2012-09-29 08:26:07.646330228 -0400
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
@ -2768,6 +2958,3 @@ index 0000000..053b885
+extension_seinfo.library_dirs=LIBDIRS
+
+setup(name = "setools", version="1.0", description="Python setools bindings", author="Thomas Liu", author_email="tliu@redhat.com", ext_modules=[extension_sesearch, extension_seinfo], packages=["setools"])
--
1.7.6.2

View File

@ -1492,17 +1492,6 @@ diff -up setools-3.3.7/libapol/include/apol/Makefile.am.filenametrans setools-3.
terule-query.h \
type-query.h \
types-relation-analysis.h \
diff -up setools-3.3.7/libapol/include/apol/Makefile.in.filenametrans setools-3.3.7/libapol/include/apol/Makefile.in
--- setools-3.3.7/libapol/include/apol/Makefile.in.filenametrans 2010-05-12 10:01:06.000000000 -0400
+++ setools-3.3.7/libapol/include/apol/Makefile.in 2011-10-26 16:25:07.834107745 -0400
@@ -378,6 +378,7 @@ apol_HEADERS = \
relabel-analysis.h \
render.h \
role-query.h \
+ ftrule-query.h \
terule-query.h \
type-query.h \
types-relation-analysis.h \
diff -up setools-3.3.7/libqpol/include/qpol/Makefile.am.filenametrans setools-3.3.7/libqpol/include/qpol/Makefile.am
--- setools-3.3.7/libqpol/include/qpol/Makefile.am.filenametrans 2011-10-26 16:22:28.723523155 -0400
+++ setools-3.3.7/libqpol/include/qpol/Makefile.am 2011-10-26 16:22:41.283493767 -0400
@ -1514,14 +1503,3 @@ diff -up setools-3.3.7/libqpol/include/qpol/Makefile.am.filenametrans setools-3.
type_query.h \
user_query.h \
util.h
diff -up setools-3.3.7/libqpol/include/qpol/Makefile.in.filenametrans setools-3.3.7/libqpol/include/qpol/Makefile.in
--- setools-3.3.7/libqpol/include/qpol/Makefile.in.filenametrans 2010-05-12 10:01:07.000000000 -0400
+++ setools-3.3.7/libqpol/include/qpol/Makefile.in 2011-10-26 16:22:56.375457650 -0400
@@ -376,6 +376,7 @@ qpol_HEADERS = \
role_query.h \
syn_rule_query.h \
terule_query.h \
+ ftrule_query.h \
type_query.h \
user_query.h \
util.h

255
0011-setools-noship.patch Normal file
View File

@ -0,0 +1,255 @@
diff -up setools-3.3.7/Makefile.am.noship setools-3.3.7/Makefile.am
--- setools-3.3.7/Makefile.am.noship 2008-02-22 14:06:28.000000000 -0500
+++ setools-3.3.7/Makefile.am 2013-01-30 09:18:59.775157146 -0500
@@ -8,9 +8,8 @@ endif
if BUILD_GUI
MAYBE_GUI = seaudit
endif
-# sediffx is also built conditionally, from sediffx/Makefile.am
-SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sechecker sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI)
+SUBDIRS = libqpol libapol libsefs libpoldiff libseaudit secmds sediff man packages debian $(MAYBE_APOL) $(MAYBE_GUI)
#old indent opts
#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
@@ -49,12 +48,6 @@ seaudit: libqpol libapol libseaudit
sediff: libqpol libapol libpoldiff
$(MAKE) -C $(top_srcdir)/sediff sediff
-sediffx: libqpol libapol libpoldiff
- $(MAKE) -C $(top_srcdir)/sediff sediffx
-
-sechecker: libqpol libapol libsefs
- $(MAKE) -C $(top_srcdir)/sechecker
-
help:
@echo "Make targets for SETools:"
@echo " all: build everything, but do not install"
@@ -65,8 +58,6 @@ help:
@echo " secmds: build command line tools"
@echo " seaudit: build audit log analysis tools"
@echo " sediff: build semantic policy diff command line tool"
- @echo " sediffx: build semantic policy diff graphical tool"
- @echo " sechecker: build policy checking tool"
@echo ""
@echo " install-logwatch: install LogWatch config files for seaudit-report"
@echo " (requires LogWatch and root privileges)"
@@ -78,9 +69,9 @@ install-logwatch:
$(MAKE) -C $(top_srcdir)/seaudit install-logwatch
.PHONY: libqpol libapol libpoldiff libsefs libseaudit \
- apol secmds seaudit sediff sediffx sechecker \
+ apol secmds seaudit sediff \
install-logwatch help \
- seinfo sesearch indexcon findcon replcon searchcon \
+ seinfo sesearch \
packages
seinfo: libqpol libapol
@@ -89,18 +80,6 @@ seinfo: libqpol libapol
sesearch: libqpol libapol
$(MAKE) -C $(top_srcdir)/secmds sesearch
-indexcon: libqpol libapol libsefs
- $(MAKE) -C $(top_srcdir)/secmds indexcon
-
-findcon: libqpol libapol libsefs
- $(MAKE) -C $(top_srcdir)/secmds findcon
-
-replcon: libqpol libapol libsefs
- $(MAKE) -C $(top_srcdir)/secmds replcon
-
-searchcon: libqpol libapol libsefs
- $(MAKE) -C $(top_srcdir)/secmds searchcon
-
packages:
$(MAKE) -C $(top_srcdir)/packages
diff -up setools-3.3.7/man/Makefile.am.noship setools-3.3.7/man/Makefile.am
--- setools-3.3.7/man/Makefile.am.noship 2007-08-02 17:16:33.000000000 -0400
+++ setools-3.3.7/man/Makefile.am 2013-01-30 09:16:13.696871566 -0500
@@ -1,19 +1,10 @@
if BUILD_GUI
MAYBEMANS = apol.1 \
- seaudit.8 seaudit-report.8 \
- sediffx.1
+ seaudit.8
endif
EXTRA_DIST=$(man_MANS) apol.1 \
- seaudit.8 seaudit-report.8.in \
- sediffx.1
+ seaudit.8
-man_MANS = findcon.1 indexcon.1 replcon.1 \
- sechecker.1 \
- sediff.1 \
+man_MANS = sediff.1 \
seinfo.1 sesearch.1 $(MAYBEMANS)
-
-seaudit-report.8: seaudit-report.8.in Makefile
- sed -e 's|\@setoolsdir\@|$(setoolsdir)|g' $< > $@
-
-CLEANFILES = seaudit-report.8
diff -up setools-3.3.7/seaudit/Makefile.am.noship setools-3.3.7/seaudit/Makefile.am
--- setools-3.3.7/seaudit/Makefile.am.noship 2008-02-22 14:06:28.000000000 -0500
+++ setools-3.3.7/seaudit/Makefile.am 2013-01-30 09:16:13.697871568 -0500
@@ -1,5 +1,4 @@
setoolsdir = @setoolsdir@
-bin_PROGRAMS = seaudit-report
sbin_PROGRAMS = seaudit
AM_CFLAGS = @DEBUGCFLAGS@ @WARNCFLAGS@ @PROFILECFLAGS@ @SELINUX_CFLAGS@ \
@@ -20,13 +19,10 @@ LDADD = @SELINUX_LIB_FLAG@ @SEAUDIT_LIB_
dist_setools_DATA = \
seaudit.glade \
seaudit_help.txt \
- seaudit-report.conf \
- seaudit-report.css \
seaudit.png seaudit-small.png
nodist_setools_DATA = \
- dot_seaudit \
- seaudit-report-service
+ dot_seaudit
seaudit_SOURCES = \
filter_view.c filter_view.h \
@@ -50,31 +46,12 @@ seaudit_DEPENDENCIES = $(top_builddir)/l
dot_seaudit: dot_seaudit.in Makefile
sed -e 's|\@setoolsdir\@|$(setoolsdir)|g' $< > $@
-seaudit_report_SOURCES = seaudit-report.c
-seaudit_report_DEPENDENCIES = $(top_builddir)/libseaudit/src/libseaudit.so \
- $(top_builddir)/libapol/src/libapol.so \
- $(top_builddir)/libqpol/src/libqpol.so
-
logwatch = $(DESTDIR)/etc/logwatch
LOGWATCH_GROUP = $(logwatch)/conf/logfiles
LOGWATCH_SERVICE = $(logwatch)/conf/services
LOGWATCH_FILTER = $(logwatch)/scripts/services
-dist_noinst_DATA = dot_seaudit.in \
- seaudit-report-group.conf \
- seaudit-report-service.conf \
- seaudit-report-service.in
-
-seaudit-report-service: seaudit-report-service.in Makefile
- sed -e 's|\@bindir\@|$(bindir)|g' $< > $@
-
-install-logwatch: $(dist_noinst_DATA) seaudit-report-service
- mkdir -p -- $(LOGWATCH_GROUP)
- install -m 644 seaudit-report-group.conf $(LOGWATCH_GROUP)
- mkdir -p -- $(LOGWATCH_SERVICE)
- install -m 644 seaudit-report-service.conf $(LOGWATCH_SERVICE)
- mkdir -p -- $(LOGWATCH_FILTER)
- install -m 755 seaudit-report-service $(LOGWATCH_FILTER)
+dist_noinst_DATA = dot_seaudit.in
$(top_builddir)/libapol/src/libapol.so:
$(MAKE) -C $(top_builddir)/libapol/src $(notdir $@)
@@ -85,6 +62,4 @@ $(top_builddir)/libqpol/src/libqpol.so:
$(top_builddir)/libsefs/src/libsefs.so:
$(MAKE) -C $(top_builddir)/libsefs/src $(notdir $@)
-.PHONY: install-logwatch
-
-CLEANFILES = dot_seaudit seaudit-report-service
+CLEANFILES = dot_seaudit
diff -up setools-3.3.7/secmds/Makefile.am.noship setools-3.3.7/secmds/Makefile.am
--- setools-3.3.7/secmds/Makefile.am.noship 2007-08-02 17:16:33.000000000 -0400
+++ setools-3.3.7/secmds/Makefile.am 2013-01-30 09:16:13.698871569 -0500
@@ -1,6 +1,6 @@
# various setools command line tools
-bin_PROGRAMS = seinfo sesearch findcon replcon indexcon
+bin_PROGRAMS = seinfo sesearch
# These are for indexcon so that it is usable on machines without setools
STATICLIBS = ../libsefs/src/libsefs.a ../libapol/src/libapol.a ../libqpol/src/libqpol.a -lsqlite3
@@ -18,18 +18,6 @@ seinfo_SOURCES = seinfo.c
sesearch_SOURCES = sesearch.c
-indexcon_SOURCES = indexcon.cc
-indexcon_LDADD = @SELINUX_LIB_FLAG@ $(STATICLIBS)
-indexcon_DEPENDENCIES = $(DEPENDENCIES) $(top_builddir)/libsefs/src/libsefs.so
-
-findcon_SOURCES = findcon.cc
-findcon_LDADD = @SEFS_LIB_FLAG@ $(LDADD)
-findcon_DEPENDENCIES = $(DEPENDENCIES) $(top_builddir)/libsefs/src/libsefs.so
-
-replcon_SOURCES = replcon.cc
-replcon_LDADD = @SEFS_LIB_FLAG@ $(LDADD)
-replcon_DEPENDENCIES = $(DEPENDENCIES) $(top_builddir)/libsefs/src/libsefs.so
-
$(top_builddir)/libapol/src/libapol.so:
$(MAKE) -C $(top_builddir)/libapol/src $(notdir $@)
diff -up setools-3.3.7/sediff/Makefile.am.noship setools-3.3.7/sediff/Makefile.am
--- setools-3.3.7/sediff/Makefile.am.noship 2007-04-25 15:20:20.000000000 -0400
+++ setools-3.3.7/sediff/Makefile.am 2013-01-30 09:16:13.698871569 -0500
@@ -1,13 +1,6 @@
setoolsdir = @setoolsdir@
-dist_setools_DATA = sediff_help.txt sediffx.glade \
- sediffx.png sediffx-small.png
-
-if BUILD_GUI
- MAYBE_SEDIFFX = sediffx
-endif
-
-bin_PROGRAMS = sediff $(MAYBE_SEDIFFX)
+bin_PROGRAMS = sediff
AM_CFLAGS = @DEBUGCFLAGS@ @WARNCFLAGS@ @PROFILECFLAGS@ @SELINUX_CFLAGS@ \
@QPOL_CFLAGS@ @APOL_CFLAGS@ @POLDIFF_CFLAGS@
@@ -15,14 +8,7 @@ AM_LDFLAGS = @DEBUGLDFLAGS@ @WARNLDFLAGS
LDADD = @SELINUX_LIB_FLAG@ @POLDIFF_LIB_FLAG@ @APOL_LIB_FLAG@ @QPOL_LIB_FLAG@
-sediff_CFLAGS = $(AM_CFLAGS)
-sediffx_CFLAGS = $(AM_CFLAGS) \
- @GTK_CFLAGS@ @PIXBUF_CFLAGS@ @GLADE_CFLAGS@ @GTHREAD_CFLAGS@
-
-# need the -rdynamic flag below - glade uses dlopen() upon sediffx callbacks
-sediffx_LDFLAGS = $(AM_LDFLAGS) \
- @GTK_LIBS@ @PIXBUF_LIBS@ @GLADE_LIBS@ @GTHREAD_LIBS@ @XML_LIBS@ \
- -rdynamic
+sediff_CFLAGS = $(AM_CFLAGS)
DEPENDENCIES = $(top_builddir)/libpoldiff/src/libpoldiff.so \
$(top_builddir)/libapol/src/libapol.so \
@@ -30,20 +16,6 @@ DEPENDENCIES = $(top_builddir)/libpoldif
sediff_SOURCES = sediff.c
-sediffx_SOURCES = \
- find_dialog.c find_dialog.h \
- open_policies_dialog.c open_policies_dialog.h \
- policy_view.c policy_view.h \
- progress.c progress.h \
- remap_types_dialog.c remap_types_dialog.h \
- result_item.c result_item.h \
- result_item_render.c result_item_render.h \
- results.c results.h \
- select_diff_dialog.c select_diff_dialog.h \
- toplevel.c toplevel.h \
- utilgui.c utilgui.h \
- sediffx.c sediffx.h
-
$(top_builddir)/libpoldiff/src/libpoldiff.so:
$(MAKE) -C $(top_builddir)/libpoldiff/src $(notdir $@)
diff -up setools-3.3.7/configure.ac~ setools-3.3.7/configure.ac
--- setools-3.3.7/configure.ac~ 2013-01-30 09:52:05.689136955 -0500
+++ setools-3.3.7/configure.ac 2013-01-30 09:56:26.853722063 -0500
@@ -63,7 +63,7 @@ if test ${ac_cv_prog_cc_c99} = "no"; the
fi
AC_PROG_CXX
AC_LANG([C])
-AC_PROG_LIBTOOL
+AC_PROG_RANLIB
AC_PROG_LN_S
AC_PROG_LEX
AC_PROG_YACC

28
0012-seaudit.patch Normal file
View File

@ -0,0 +1,28 @@
diff -up setools-3.3.7/libqpol/swig/java/Makefile.am.seaudit setools-3.3.7/libqpol/swig/java/Makefile.am
--- setools-3.3.7/libqpol/swig/java/Makefile.am.seaudit 2010-05-03 12:37:54.000000000 -0400
+++ setools-3.3.7/libqpol/swig/java/Makefile.am 2012-09-28 10:15:56.408912525 -0400
@@ -48,7 +48,6 @@ BUILT_SOURCES = qpol_wrap.c \
qpol_type_t.java \
qpol_user_t.java \
qpol_validatetrans_t.java \
- SWIGTYPE_p_int.java \
SWIGTYPE_p_unsigned_int.java \
SWIGTYPE_p_void.java
diff -up setools-3.3.7/seaudit/progress.c.seaudit setools-3.3.7/seaudit/progress.c
--- setools-3.3.7/seaudit/progress.c.seaudit 2007-08-02 17:16:33.000000000 -0400
+++ setools-3.3.7/seaudit/progress.c 2012-09-28 10:15:56.407912521 -0400
@@ -99,10 +99,11 @@ void progress_hide(progress_t * progress
int progress_wait(progress_t * progress)
{
- GTimeVal wait_time = { 0, 50000 };
+ gint64 end_time;
g_mutex_lock(progress->mutex);
while (!progress->done) {
- g_cond_timed_wait(progress->cond, progress->mutex, &wait_time);
+ end_time = g_get_monotonic_time () + 50000; // need to be set before each wait
+ g_cond_wait_until(progress->cond, progress->mutex,end_time);
if (progress->s != NULL) {
gtk_label_set_text(GTK_LABEL(progress->label2), progress->s);
free(progress->s);

956
0013-swig.patch Normal file
View File

@ -0,0 +1,956 @@
@@ -, +, @@
---
libapol/swig/apol.i | 218 ++++++++++++++++++++++++++--------------------------
1 file changed, 109 insertions(+), 109 deletions(-)
--- a/libapol/swig/apol.i
+++ a/libapol/swig/apol.i
@@ -256,7 +256,7 @@ uint8_t apol_str_to_protocol(const char *protocol_str);
}
%}
%extend apol_ip_t {
- apol_ip_t(const char *str) {
+ apol_ip(const char *str) {
apol_ip_t *ip = NULL;
BEGIN_EXCEPTION
ip = calloc(1, sizeof(*ip));
@@ -274,7 +274,7 @@ uint8_t apol_str_to_protocol(const char *protocol_str);
fail:
return ip;
};
- ~apol_ip_t() {
+ ~apol_ip() {
free(self);
};
int get_protocol() {
@@ -303,16 +303,16 @@ char *apol_file_find_path(const char *file_name);
%}
typedef struct apol_vector {} apol_vector_t;
%extend apol_vector_t {
- apol_vector_t() {
+ apol_vector() {
return apol_vector_create(NULL);
};
- apol_vector_t(qpol_iterator_t *iter) {
+ apol_vector(qpol_iterator_t *iter) {
return apol_vector_create_from_iter(iter, NULL);
};
- apol_vector_t(apol_vector_t *v) {
+ apol_vector(apol_vector_t *v) {
return apol_vector_create_from_vector(v, NULL, NULL, NULL);
};
- apol_vector_t(apol_vector_t *a, apol_vector_t *b) {
+ apol_vector(apol_vector_t *a, apol_vector_t *b) {
return apol_vector_create_from_intersection(a, b, NULL, NULL);
};
size_t get_size() {
@@ -324,7 +324,7 @@ typedef struct apol_vector {} apol_vector_t;
void *get_element(size_t i) {
return apol_vector_get_element(self, i);
};
- ~apol_vector_t() {
+ ~apol_vector() {
apol_vector_destroy(&self);
};
void append(void *x) {
@@ -379,13 +379,13 @@ typedef struct apol_vector {} apol_vector_t;
%}
typedef struct apol_string_vector {} apol_string_vector_t;
%extend apol_string_vector_t {
- apol_string_vector_t() {
+ apol_string_vector() {
return (apol_string_vector_t*)apol_vector_create(free);
};
- apol_string_vector_t(apol_string_vector_t *v) {
+ apol_string_vector(apol_string_vector_t *v) {
return (apol_string_vector_t*)apol_vector_create_from_vector((apol_vector_t*)v, apol_str_strdup, NULL, free);
};
- apol_string_vector_t(apol_string_vector_t *a, apol_string_vector_t *b) {
+ apol_string_vector(apol_string_vector_t *a, apol_string_vector_t *b) {
return (apol_string_vector_t*)apol_vector_create_from_intersection((apol_vector_t*)a, (apol_vector_t*)b, apol_str_strcmp, NULL);
};
size_t get_size() {
@@ -397,7 +397,7 @@ typedef struct apol_string_vector {} apol_string_vector_t;
char *get_element(size_t i) {
return (char*)apol_vector_get_element((apol_vector_t*)self, i);
};
- ~apol_string_vector_t() {
+ ~apol_string_vector() {
apol_vector_destroy((apol_vector_t**)&self);
};
size_t get_index(char *str) {
@@ -462,7 +462,7 @@ typedef struct apol_string_vector {} apol_string_vector_t;
} apol_policy_path_type_e;
typedef struct apol_policy_path {} apol_policy_path_t;
%extend apol_policy_path_t {
- apol_policy_path_t(apol_policy_path_type_e type, char * primary, apol_string_vector_t *modules = NULL) {
+ apol_policy_path(apol_policy_path_type_e type, char * primary, apol_string_vector_t *modules = NULL) {
apol_policy_path_t *p;
BEGIN_EXCEPTION
if ((p = apol_policy_path_create(type, primary, (apol_vector_t*)modules)) == NULL) {
@@ -472,7 +472,7 @@ typedef struct apol_policy_path {} apol_policy_path_t;
fail:
return p;
};
- apol_policy_path_t(char *path) {
+ apol_policy_path(char *path) {
apol_policy_path_t *p;
BEGIN_EXCEPTION
if ((p = apol_policy_path_create_from_file(path)) == NULL) {
@@ -482,7 +482,7 @@ typedef struct apol_policy_path {} apol_policy_path_t;
fail:
return p;
};
- apol_policy_path_t(char *str, int unused) {
+ apol_policy_path(char *str, int unused) {
apol_policy_path_t *p;
BEGIN_EXCEPTION
if ((p = apol_policy_path_create_from_string(str)) == NULL) {
@@ -492,7 +492,7 @@ typedef struct apol_policy_path {} apol_policy_path_t;
fail:
return p;
};
- apol_policy_path_t(apol_policy_path_t *in) {
+ apol_policy_path(apol_policy_path_t *in) {
apol_policy_path_t *p;
BEGIN_EXCEPTION
if ((p = apol_policy_path_create_from_policy_path(in)) == NULL) {
@@ -502,7 +502,7 @@ typedef struct apol_policy_path {} apol_policy_path_t;
fail:
return p;
};
- ~apol_policy_path_t() {
+ ~apol_policy_path() {
apol_policy_path_destroy(&self);
};
apol_policy_path_type_e get_type() {
@@ -549,7 +549,7 @@ typedef struct apol_policy {} apol_policy_t;
#define APOL_PERMMAP_BOTH (APOL_PERMMAP_READ | APOL_PERMMAP_WRITE)
#define APOL_PERMMAP_NONE 0x10
%extend apol_policy_t {
- apol_policy_t(apol_policy_path_t *path, int options = 0) {
+ apol_policy(apol_policy_path_t *path, int options = 0) {
apol_policy_t *p;
BEGIN_EXCEPTION
p = apol_policy_create_from_policy_path(path, options, apol_swig_message_callback, apol_swig_message_callback_arg);
@@ -564,7 +564,7 @@ typedef struct apol_policy {} apol_policy_t;
fail:
return p;
};
- ~apol_policy_t() {
+ ~apol_policy() {
apol_policy_destroy(&self);
};
int get_policy_type() {
@@ -652,7 +652,7 @@ typedef struct apol_policy {} apol_policy_t;
/* apol type query */
typedef struct apol_type_query {} apol_type_query_t;
%extend apol_type_query_t {
- apol_type_query_t() {
+ apol_type_query() {
apol_type_query_t *tq;
BEGIN_EXCEPTION
tq = apol_type_query_create();
@@ -663,7 +663,7 @@ typedef struct apol_type_query {} apol_type_query_t;
fail:
return tq;
};
- ~apol_type_query_t() {
+ ~apol_type_query() {
apol_type_query_destroy(&self);
};
%newobject run(apol_policy_t *);
@@ -694,7 +694,7 @@ typedef struct apol_type_query {} apol_type_query_t;
/* apol attribute query */
typedef struct apol_attr_query {} apol_attr_query_t;
%extend apol_attr_query_t {
- apol_attr_query_t() {
+ apol_attr_query() {
apol_attr_query_t *aq;
BEGIN_EXCEPTION
aq = apol_attr_query_create();
@@ -705,7 +705,7 @@ typedef struct apol_attr_query {} apol_attr_query_t;
fail:
return aq;
};
- ~apol_attr_query_t() {
+ ~apol_attr_query() {
apol_attr_query_destroy(&self);
};
%newobject run(apol_policy_t *);
@@ -736,7 +736,7 @@ typedef struct apol_attr_query {} apol_attr_query_t;
/* apol role query */
typedef struct apol_role_query {} apol_role_query_t;
%extend apol_role_query_t {
- apol_role_query_t() {
+ apol_role_query() {
apol_role_query_t *rq;
BEGIN_EXCEPTION
rq = apol_role_query_create();
@@ -747,7 +747,7 @@ typedef struct apol_role_query {} apol_role_query_t;
fail:
return rq;
};
- ~apol_role_query_t() {
+ ~apol_role_query() {
apol_role_query_destroy(&self);
};
%newobject run(apol_policy_t *);
@@ -788,7 +788,7 @@ int apol_role_has_type(apol_policy_t * p, qpol_role_t * r, qpol_type_t * t);
/* apol class query */
typedef struct apol_class_query {} apol_class_query_t;
%extend apol_class_query_t {
- apol_class_query_t() {
+ apol_class_query() {
apol_class_query_t *cq;
BEGIN_EXCEPTION
cq = apol_class_query_create();
@@ -799,7 +799,7 @@ typedef struct apol_class_query {} apol_class_query_t;
fail:
return cq;
};
- ~apol_class_query_t() {
+ ~apol_class_query() {
apol_class_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -839,7 +839,7 @@ typedef struct apol_class_query {} apol_class_query_t;
/* apol common query */
typedef struct apol_common_query {} apol_common_query_t;
%extend apol_common_query_t {
- apol_common_query_t() {
+ apol_common_query() {
apol_common_query_t *cq;
BEGIN_EXCEPTION
cq = apol_common_query_create();
@@ -850,7 +850,7 @@ typedef struct apol_common_query {} apol_common_query_t;
fail:
return cq;
};
- ~apol_common_query_t() {
+ ~apol_common_query() {
apol_common_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -881,7 +881,7 @@ typedef struct apol_common_query {} apol_common_query_t;
/* apol perm query */
typedef struct apol_perm_query {} apol_perm_query_t;
%extend apol_perm_query_t {
- apol_perm_query_t() {
+ apol_perm_query() {
apol_perm_query_t *pq;
BEGIN_EXCEPTION
pq = apol_perm_query_create();
@@ -892,7 +892,7 @@ typedef struct apol_perm_query {} apol_perm_query_t;
fail:
return pq;
};
- ~apol_perm_query_t() {
+ ~apol_perm_query() {
apol_perm_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -923,7 +923,7 @@ typedef struct apol_perm_query {} apol_perm_query_t;
/* apol bool query */
typedef struct apol_bool_query {} apol_bool_query_t;
%extend apol_bool_query_t {
- apol_bool_query_t() {
+ apol_bool_query() {
apol_bool_query_t *bq;
BEGIN_EXCEPTION
bq = apol_bool_query_create();
@@ -934,7 +934,7 @@ typedef struct apol_bool_query {} apol_bool_query_t;
fail:
return bq;
};
- ~apol_bool_query_t() {
+ ~apol_bool_query() {
apol_bool_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -965,7 +965,7 @@ typedef struct apol_bool_query {} apol_bool_query_t;
/* apol mls level */
typedef struct apol_mls_level {} apol_mls_level_t;
%extend apol_mls_level_t {
- apol_mls_level_t() {
+ apol_mls_level() {
apol_mls_level_t *aml;
BEGIN_EXCEPTION
aml = apol_mls_level_create();
@@ -976,7 +976,7 @@ typedef struct apol_mls_level {} apol_mls_level_t;
fail:
return aml;
};
- apol_mls_level_t(apol_mls_level_t *in) {
+ apol_mls_level(apol_mls_level_t *in) {
apol_mls_level_t *aml;
BEGIN_EXCEPTION
aml = apol_mls_level_create_from_mls_level(in);
@@ -987,7 +987,7 @@ typedef struct apol_mls_level {} apol_mls_level_t;
fail:
return aml;
};
- apol_mls_level_t(apol_policy_t *p, const char *str) {
+ apol_mls_level(apol_policy_t *p, const char *str) {
apol_mls_level_t *aml;
BEGIN_EXCEPTION
aml = apol_mls_level_create_from_string(p, str);
@@ -998,7 +998,7 @@ typedef struct apol_mls_level {} apol_mls_level_t;
fail:
return aml;
};
- apol_mls_level_t(const char *str) {
+ apol_mls_level(const char *str) {
apol_mls_level_t *aml;
BEGIN_EXCEPTION
aml = apol_mls_level_create_from_literal(str);
@@ -1009,7 +1009,7 @@ typedef struct apol_mls_level {} apol_mls_level_t;
fail:
return aml;
};
- apol_mls_level_t(apol_policy_t *p, qpol_mls_level_t *qml) {
+ apol_mls_level(apol_policy_t *p, qpol_mls_level_t *qml) {
apol_mls_level_t *aml;
BEGIN_EXCEPTION
aml = apol_mls_level_create_from_qpol_mls_level(p, qml);
@@ -1020,7 +1020,7 @@ typedef struct apol_mls_level {} apol_mls_level_t;
fail:
return aml;
};
- apol_mls_level_t(apol_policy_t *p, qpol_level_t *ql) {
+ apol_mls_level(apol_policy_t *p, qpol_level_t *ql) {
apol_mls_level_t *aml;
BEGIN_EXCEPTION
aml = apol_mls_level_create_from_qpol_level_datum(p, ql);
@@ -1031,7 +1031,7 @@ typedef struct apol_mls_level {} apol_mls_level_t;
fail:
return aml;
};
- ~apol_mls_level_t() {
+ ~apol_mls_level() {
apol_mls_level_destroy(&self);
};
void set_sens(apol_policy_t *p, char *sens) {
@@ -1128,7 +1128,7 @@ int apol_mls_cats_compare(apol_policy_t * p, const char *cat1, const char *cat2)
#endif
typedef struct apol_mls_range {} apol_mls_range_t;
%extend apol_mls_range_t {
- apol_mls_range_t() {
+ apol_mls_range() {
apol_mls_range_t *amr;
BEGIN_EXCEPTION
amr = apol_mls_range_create();
@@ -1139,7 +1139,7 @@ typedef struct apol_mls_range {} apol_mls_range_t;
fail:
return amr;
};
- apol_mls_range_t(apol_mls_range_t *in) {
+ apol_mls_range(apol_mls_range_t *in) {
apol_mls_range_t *amr;
BEGIN_EXCEPTION
amr = apol_mls_range_create_from_mls_range(in);
@@ -1150,7 +1150,7 @@ typedef struct apol_mls_range {} apol_mls_range_t;
fail:
return amr;
};
- apol_mls_range_t(apol_policy_t *p, const char *s) {
+ apol_mls_range(apol_policy_t *p, const char *s) {
apol_mls_range_t *amr;
BEGIN_EXCEPTION
amr = apol_mls_range_create_from_string(p, s);
@@ -1161,7 +1161,7 @@ typedef struct apol_mls_range {} apol_mls_range_t;
fail:
return amr;
};
- apol_mls_range_t(const char *s) {
+ apol_mls_range(const char *s) {
apol_mls_range_t *amr;
BEGIN_EXCEPTION
amr = apol_mls_range_create_from_literal(s);
@@ -1172,7 +1172,7 @@ typedef struct apol_mls_range {} apol_mls_range_t;
fail:
return amr;
};
- apol_mls_range_t(apol_policy_t *p, qpol_mls_range_t *in) {
+ apol_mls_range(apol_policy_t *p, qpol_mls_range_t *in) {
apol_mls_range_t *amr;
BEGIN_EXCEPTION
amr = apol_mls_range_create_from_qpol_mls_range(p, in);
@@ -1183,7 +1183,7 @@ typedef struct apol_mls_range {} apol_mls_range_t;
fail:
return amr;
};
- ~apol_mls_range_t() {
+ ~apol_mls_range() {
apol_mls_range_destroy(&self);
};
void set_low(apol_policy_t *p, apol_mls_level_t *lvl) {
@@ -1278,7 +1278,7 @@ int apol_mls_range_contain_subrange(apol_policy_t * p, const apol_mls_range_t *
/* apol level query */
typedef struct apol_level_query {} apol_level_query_t;
%extend apol_level_query_t {
- apol_level_query_t() {
+ apol_level_query() {
apol_level_query_t * alq;
BEGIN_EXCEPTION
alq = apol_level_query_create();
@@ -1289,7 +1289,7 @@ typedef struct apol_level_query {} apol_level_query_t;
fail:
return alq;
};
- ~apol_level_query_t() {
+ ~apol_level_query() {
apol_level_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1329,7 +1329,7 @@ typedef struct apol_level_query {} apol_level_query_t;
/* apol cat query */
typedef struct apol_cat_query {} apol_cat_query_t;
%extend apol_cat_query_t {
- apol_cat_query_t() {
+ apol_cat_query() {
apol_cat_query_t * acq;
BEGIN_EXCEPTION
acq = apol_cat_query_create();
@@ -1340,7 +1340,7 @@ typedef struct apol_cat_query {} apol_cat_query_t;
fail:
return acq;
};
- ~apol_cat_query_t() {
+ ~apol_cat_query() {
apol_cat_query_destroy(&self);
};
%newobject run(apol_policy_t *);
@@ -1379,7 +1379,7 @@ typedef struct apol_cat_query {} apol_cat_query_t;
#endif
typedef struct apol_user_query {} apol_user_query_t;
%extend apol_user_query_t {
- apol_user_query_t() {
+ apol_user_query() {
apol_user_query_t *auq;
BEGIN_EXCEPTION
auq = apol_user_query_create();
@@ -1390,7 +1390,7 @@ typedef struct apol_user_query {} apol_user_query_t;
fail:
return auq;
};
- ~apol_user_query_t() {
+ ~apol_user_query() {
apol_user_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1448,7 +1448,7 @@ typedef struct apol_user_query {} apol_user_query_t;
/* apol context */
typedef struct apol_context {} apol_context_t;
%extend apol_context_t {
- apol_context_t() {
+ apol_context() {
apol_context_t *ctx;
BEGIN_EXCEPTION
ctx = apol_context_create();
@@ -1459,7 +1459,7 @@ typedef struct apol_context {} apol_context_t;
fail:
return ctx;
};
- apol_context_t(apol_policy_t *p, qpol_context_t *in) {
+ apol_context(apol_policy_t *p, qpol_context_t *in) {
apol_context_t *ctx;
BEGIN_EXCEPTION
ctx = apol_context_create_from_qpol_context(p, in);
@@ -1470,7 +1470,7 @@ typedef struct apol_context {} apol_context_t;
fail:
return ctx;
};
- apol_context_t(const char *str) {
+ apol_context(const char *str) {
apol_context_t *ctx;
BEGIN_EXCEPTION
ctx = apol_context_create_from_literal(str);
@@ -1481,7 +1481,7 @@ typedef struct apol_context {} apol_context_t;
fail:
return ctx;
};
- ~apol_context_t() {
+ ~apol_context() {
apol_context_destroy(&self);
};
void set_user(apol_policy_t *p, char *name) {
@@ -1583,7 +1583,7 @@ int apol_context_compare(apol_policy_t * p, apol_context_t * target, apol_contex
/* apol constraint query */
typedef struct apol_constraint_query {} apol_constraint_query_t;
%extend apol_constraint_query_t {
- apol_constraint_query_t() {
+ apol_constraint_query() {
apol_constraint_query_t *acq;
BEGIN_EXCEPTION
acq = apol_constraint_query_create();
@@ -1594,7 +1594,7 @@ typedef struct apol_constraint_query {} apol_constraint_query_t;
fail:
return acq;
};
- ~apol_constraint_query_t() {
+ ~apol_constraint_query() {
apol_constraint_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1634,7 +1634,7 @@ typedef struct apol_constraint_query {} apol_constraint_query_t;
/* apol validatetrans query */
typedef struct apol_validatetrans_query {} apol_validatetrans_query_t;
%extend apol_validatetrans_query_t {
- apol_validatetrans_query_t() {
+ apol_validatetrans_query() {
apol_validatetrans_query_t *avq;
BEGIN_EXCEPTION
avq = apol_validatetrans_query_create();
@@ -1645,7 +1645,7 @@ typedef struct apol_validatetrans_query {} apol_validatetrans_query_t;
fail:
return avq;
};
- ~apol_validatetrans_query_t() {
+ ~apol_validatetrans_query() {
apol_validatetrans_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1684,7 +1684,7 @@ typedef struct apol_validatetrans_query {} apol_validatetrans_query_t;
#endif
typedef struct apol_genfscon_query {} apol_genfscon_query_t;
%extend apol_genfscon_query_t {
- apol_genfscon_query_t() {
+ apol_genfscon_query() {
apol_genfscon_query_t *agq;
BEGIN_EXCEPTION
agq = apol_genfscon_query_create();
@@ -1695,7 +1695,7 @@ typedef struct apol_genfscon_query {} apol_genfscon_query_t;
fail:
return agq;
};
- ~apol_genfscon_query_t() {
+ ~apol_genfscon_query() {
apol_genfscon_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1746,7 +1746,7 @@ char *apol_genfscon_render(apol_policy_t * p, qpol_genfscon_t * genfscon);
/* apol fs_use query */
typedef struct apol_fs_use_query {} apol_fs_use_query_t;
%extend apol_fs_use_query_t {
- apol_fs_use_query_t() {
+ apol_fs_use_query() {
apol_fs_use_query_t *afq;
BEGIN_EXCEPTION
afq = apol_fs_use_query_create();
@@ -1757,7 +1757,7 @@ typedef struct apol_fs_use_query {} apol_fs_use_query_t;
fail:
return afq;
};
- ~apol_fs_use_query_t() {
+ ~apol_fs_use_query() {
apol_fs_use_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1799,7 +1799,7 @@ char *apol_fs_use_render(apol_policy_t * p, qpol_fs_use_t * fsuse);
/* apol initial sid query */
typedef struct apol_isid_query {} apol_isid_query_t;
%extend apol_isid_query_t {
- apol_isid_query_t() {
+ apol_isid_query() {
apol_isid_query_t *aiq;
BEGIN_EXCEPTION
aiq = apol_isid_query_create();
@@ -1810,7 +1810,7 @@ typedef struct apol_isid_query {} apol_isid_query_t;
fail:
return aiq;
};
- ~apol_isid_query_t() {
+ ~apol_isid_query() {
apol_isid_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1841,7 +1841,7 @@ typedef struct apol_isid_query {} apol_isid_query_t;
/* apol portcon query */
typedef struct apol_portcon_query {} apol_portcon_query_t;
%extend apol_portcon_query_t {
- apol_portcon_query_t() {
+ apol_portcon_query() {
apol_portcon_query_t *apq;
BEGIN_EXCEPTION
apq = apol_portcon_query_create();
@@ -1852,7 +1852,7 @@ typedef struct apol_portcon_query {} apol_portcon_query_t;
fail:
return apq;
};
- ~apol_portcon_query_t() {
+ ~apol_portcon_query() {
apol_portcon_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1885,7 +1885,7 @@ char *apol_portcon_render(apol_policy_t * p, qpol_portcon_t * portcon);
/* apol netifcon query */
typedef struct apol_netifcon_query {} apol_netifcon_query_t;
%extend apol_netifcon_query_t {
- apol_netifcon_query_t() {
+ apol_netifcon_query() {
apol_netifcon_query_t *anq;
BEGIN_EXCEPTION
anq = apol_netifcon_query_create();
@@ -1896,7 +1896,7 @@ typedef struct apol_netifcon_query {} apol_netifcon_query_t;
fail:
return anq;
};
- ~apol_netifcon_query_t() {
+ ~apol_netifcon_query() {
apol_netifcon_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -1932,7 +1932,7 @@ char *apol_netifcon_render(apol_policy_t * p, qpol_netifcon_t * netifcon);
/* apol nodecon query */
typedef struct apol_nodecon_query {} apol_nodecon_query_t;
%extend apol_nodecon_query_t {
- apol_nodecon_query_t() {
+ apol_nodecon_query() {
apol_nodecon_query_t *anq;
BEGIN_EXCEPTION
anq = apol_nodecon_query_create();
@@ -1943,7 +1943,7 @@ typedef struct apol_nodecon_query {} apol_nodecon_query_t;
fail:
return anq;
};
- ~apol_nodecon_query_t() {
+ ~apol_nodecon_query() {
apol_nodecon_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2012,7 +2012,7 @@ char *apol_nodecon_render(apol_policy_t * p, qpol_nodecon_t * nodecon);
/* apol avrule query */
typedef struct apol_avrule_query {} apol_avrule_query_t;
%extend apol_avrule_query_t {
- apol_avrule_query_t() {
+ apol_avrule_query() {
apol_avrule_query_t *avq;
BEGIN_EXCEPTION
avq = apol_avrule_query_create();
@@ -2023,7 +2023,7 @@ typedef struct apol_avrule_query {} apol_avrule_query_t;
fail:
return avq;
};
- ~apol_avrule_query_t() {
+ ~apol_avrule_query() {
apol_avrule_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2163,7 +2163,7 @@ char *apol_syn_avrule_render(apol_policy_t * policy, qpol_syn_avrule_t * rule);
/* apol terule query */
typedef struct apol_terule_query {} apol_terule_query_t;
%extend apol_terule_query_t {
- apol_terule_query_t() {
+ apol_terule_query() {
apol_terule_query_t *atq;
BEGIN_EXCEPTION
atq = apol_terule_query_create();
@@ -2174,7 +2174,7 @@ typedef struct apol_terule_query {} apol_terule_query_t;
fail:
return atq;
};
- ~apol_terule_query_t() {
+ ~apol_terule_query() {
apol_terule_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2287,7 +2287,7 @@ apol_vector_t *apol_terule_list_to_syn_terules(apol_policy_t * p, apol_vector_t
/* apol cond rule query */
typedef struct apol_cond_query {} apol_cond_query_t;
%extend apol_cond_query_t {
- apol_cond_query_t() {
+ apol_cond_query() {
apol_cond_query_t *acq;
BEGIN_EXCEPTION
acq = apol_cond_query_create();
@@ -2298,7 +2298,7 @@ typedef struct apol_cond_query {} apol_cond_query_t;
fail:
return acq;
};
- ~apol_cond_query_t() {
+ ~apol_cond_query() {
apol_cond_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2331,7 +2331,7 @@ char *apol_cond_expr_render(apol_policy_t * p, qpol_cond_t * cond);
/* apol role allow query */
typedef struct apol_role_allow_query {} apol_role_allow_query_t;
%extend apol_role_allow_query_t {
- apol_role_allow_query_t() {
+ apol_role_allow_query() {
apol_role_allow_query_t *arq;
BEGIN_EXCEPTION
arq = apol_role_allow_query_create();
@@ -2342,7 +2342,7 @@ typedef struct apol_role_allow_query {} apol_role_allow_query_t;
fail:
return arq;
};
- ~apol_role_allow_query_t() {
+ ~apol_role_allow_query() {
apol_role_allow_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2387,7 +2387,7 @@ char *apol_role_allow_render(apol_policy_t * policy, qpol_role_allow_t * rule);
/* apol role transition rule query */
typedef struct apol_role_trans_query {} apol_role_trans_query_t;
%extend apol_role_trans_query_t {
- apol_role_trans_query_t() {
+ apol_role_trans_query() {
apol_role_trans_query_t *arq;
BEGIN_EXCEPTION
arq = apol_role_trans_query_create();
@@ -2398,7 +2398,7 @@ typedef struct apol_role_trans_query {} apol_role_trans_query_t;
fail:
return arq;
};
- ~apol_role_trans_query_t() {
+ ~apol_role_trans_query() {
apol_role_trans_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2452,7 +2452,7 @@ char *apol_role_trans_render(apol_policy_t * policy, qpol_role_trans_t * rule);
/* apol range transition rule query */
typedef struct apol_range_trans_query {} apol_range_trans_query_t;
%extend apol_range_trans_query_t {
- apol_range_trans_query_t() {
+ apol_range_trans_query() {
apol_range_trans_query_t *arq;
BEGIN_EXCEPTION
arq = apol_range_trans_query_create();
@@ -2463,7 +2463,7 @@ typedef struct apol_range_trans_query {} apol_range_trans_query_t;
fail:
return arq;
};
- ~apol_range_trans_query_t() {
+ ~apol_range_trans_query() {
apol_range_trans_query_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2531,7 +2531,7 @@ char *apol_range_trans_render(apol_policy_t * policy, qpol_range_trans_t * rule)
#define APOL_DOMAIN_TRANS_SEARCH_BOTH (APOL_DOMAIN_TRANS_SEARCH_VALID|APOL_DOMAIN_TRANS_SEARCH_INVALID)
typedef struct apol_domain_trans_analysis {} apol_domain_trans_analysis_t;
%extend apol_domain_trans_analysis_t {
- apol_domain_trans_analysis_t() {
+ apol_domain_trans_analysis() {
apol_domain_trans_analysis_t *dta;
BEGIN_EXCEPTION
dta = apol_domain_trans_analysis_create();
@@ -2542,7 +2542,7 @@ typedef struct apol_domain_trans_analysis {} apol_domain_trans_analysis_t;
fail:
return dta;
};
- ~apol_domain_trans_analysis_t() {
+ ~apol_domain_trans_analysis() {
apol_domain_trans_analysis_destroy(&self);
};
void set_direction(apol_policy_t *p, int direction) {
@@ -2622,7 +2622,7 @@ typedef struct apol_domain_trans_analysis {} apol_domain_trans_analysis_t;
};
typedef struct apol_domain_trans_result {} apol_domain_trans_result_t;
%extend apol_domain_trans_result_t {
- apol_domain_trans_result_t(apol_domain_trans_result_t *in) {
+ apol_domain_trans_result(apol_domain_trans_result_t *in) {
apol_domain_trans_result_t *dtr;
BEGIN_EXCEPTION
dtr = apol_domain_trans_result_create_from_domain_trans_result(in);
@@ -2633,7 +2633,7 @@ typedef struct apol_domain_trans_result {} apol_domain_trans_result_t;
fail:
return dtr;
};
- ~apol_domain_trans_result_t() {
+ ~apol_domain_trans_result() {
apol_domain_trans_result_destroy(&self);
};
const qpol_type_t *get_start_type() {
@@ -2705,14 +2705,14 @@ int apol_domain_trans_table_verify_trans(apol_policy_t * policy, qpol_type_t * s
%}
typedef struct apol_infoflow {} apol_infoflow_t;
%extend apol_infoflow_t {
- apol_infoflow_t() {
+ apol_infoflow() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_infoflow_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_infoflow_t() {
+ ~apol_infoflow() {
apol_infoflow_destroy(&self);
};
%newobject extract_graph();
@@ -2730,7 +2730,7 @@ typedef struct apol_infoflow {} apol_infoflow_t;
};
typedef struct apol_infoflow_analysis {} apol_infoflow_analysis_t;
%extend apol_infoflow_analysis_t {
- apol_infoflow_analysis_t() {
+ apol_infoflow_analysis() {
apol_infoflow_analysis_t *aia;
BEGIN_EXCEPTION
aia = apol_infoflow_analysis_create();
@@ -2741,7 +2741,7 @@ typedef struct apol_infoflow_analysis {} apol_infoflow_analysis_t;
fail:
return aia;
};
- ~apol_infoflow_analysis_t() {
+ ~apol_infoflow_analysis() {
apol_infoflow_analysis_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -2823,14 +2823,14 @@ typedef struct apol_infoflow_analysis {} apol_infoflow_analysis_t;
};
typedef struct apol_infoflow_graph {} apol_infoflow_graph_t;
%extend apol_infoflow_graph_t {
- apol_infoflow_graph_t() {
+ apol_infoflow_graph() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_infoflow_graph_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_infoflow_graph_t() {
+ ~apol_infoflow_graph() {
apol_infoflow_graph_destroy(&self);
};
%newobject do_more(apol_policy_t*, char*);
@@ -2867,14 +2867,14 @@ typedef struct apol_infoflow_graph {} apol_infoflow_graph_t;
};
typedef struct apol_infoflow_result {} apol_infoflow_result_t;
%extend apol_infoflow_result_t {
- apol_infoflow_result_t() {
+ apol_infoflow_result() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_infoflow_result_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_infoflow_result_t() {
+ ~apol_infoflow_result() {
/* no op - vector will destroy */
return;
};
@@ -2901,14 +2901,14 @@ typedef struct apol_infoflow_result {} apol_infoflow_result_t;
%}
typedef struct apol_infoflow_step {} apol_infoflow_step_t;
%extend apol_infoflow_step_t {
- apol_infoflow_step_t() {
+ apol_infoflow_step() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_infoflow_step_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_infoflow_step_t() {
+ ~apol_infoflow_step() {
/* no op */
return;
};
@@ -2938,7 +2938,7 @@ typedef struct apol_infoflow_step {} apol_infoflow_step_t;
#define APOL_RELABEL_DIR_SUBJECT 0x04
typedef struct apol_relabel_analysis {} apol_relabel_analysis_t;
%extend apol_relabel_analysis_t {
- apol_relabel_analysis_t() {
+ apol_relabel_analysis() {
apol_relabel_analysis_t *ara;
BEGIN_EXCEPTION
ara = apol_relabel_analysis_create();
@@ -2949,7 +2949,7 @@ typedef struct apol_relabel_analysis {} apol_relabel_analysis_t;
fail:
return ara;
};
- ~apol_relabel_analysis_t() {
+ ~apol_relabel_analysis() {
apol_relabel_analysis_destroy(&self);
};
%newobject run(apol_policy_t*);
@@ -3011,14 +3011,14 @@ typedef struct apol_relabel_analysis {} apol_relabel_analysis_t;
};
typedef struct apol_relabel_result {} apol_relabel_result_t;
%extend apol_relabel_result_t {
- apol_relabel_result_t() {
+ apol_relabel_result() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_relabel_result_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_relabel_result_t() {
+ ~apol_relabel_result() {
/* no op - vector will destroy */
return;
};
@@ -3042,14 +3042,14 @@ typedef struct apol_relabel_result {} apol_relabel_result_t;
%}
typedef struct apol_relabel_result_pair {} apol_relabel_result_pair_t;
%extend apol_relabel_result_pair_t {
- apol_relabel_result_pair_t() {
+ apol_relabel_result_pair() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_relabel_result_pair_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_relabel_result_pair_t() {
+ ~apol_relabel_result_pair() {
/* no op - owned and free()'d by apol_relabel_result_t */
return;
};
@@ -3084,7 +3084,7 @@ typedef struct apol_relabel_result_pair {} apol_relabel_result_pair_t;
#define APOL_TYPES_RELATION_TRANS_FLOW_BA 0x8000
typedef struct apol_types_relation_analysis {} apol_types_relation_analysis_t;
%extend apol_types_relation_analysis_t {
- apol_types_relation_analysis_t() {
+ apol_types_relation_analysis() {
apol_types_relation_analysis_t *atr;
BEGIN_EXCEPTION
atr = apol_types_relation_analysis_create();
@@ -3095,7 +3095,7 @@ typedef struct apol_types_relation_analysis {} apol_types_relation_analysis_t;
fail:
return atr;
};
- ~apol_types_relation_analysis_t() {
+ ~apol_types_relation_analysis() {
apol_types_relation_analysis_destroy(&self);
}
%newobject run(apol_policy_t*);
@@ -3139,14 +3139,14 @@ typedef struct apol_types_relation_analysis {} apol_types_relation_analysis_t;
};
typedef struct apol_types_relation_result {} apol_types_relation_result_t;
%extend apol_types_relation_result_t {
- apol_types_relation_result_t() {
+ apol_types_relation_result() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_types_relation_result_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_types_relation_result_t() {
+ ~apol_types_relation_result() {
apol_types_relation_result_destroy(&self);
};
const apol_vector_t *get_attributes() {
@@ -3194,14 +3194,14 @@ typedef struct apol_types_relation_result {} apol_types_relation_result_t;
};
typedef struct apol_types_relation_access {} apol_types_relation_access_t;
%extend apol_types_relation_access_t {
- apol_types_relation_access_t() {
+ apol_types_relation_access() {
BEGIN_EXCEPTION
SWIG_exception(SWIG_RuntimeError, "Cannot directly create apol_types_relation_access_t objects");
END_EXCEPTION
fail:
return NULL;
};
- ~apol_types_relation_access_t() {
+ ~apol_types_relation_access() {
/* no op - vector will destroy */
return;
};
--

View File

@ -5,7 +5,7 @@
Name: setools
Version: %{setools_maj_ver}.%{setools_min_ver}
Release: 28%{?dist}
Release: 34%{?dist}
License: GPLv2
URL: http://oss.tresys.com/projects/setools
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@ -13,8 +13,6 @@ Source: http://oss.tresys.com/projects/setools/chrome/site/dists/setools-%{versi
Source1: setools.pam
Source2: apol.desktop
Source3: seaudit.desktop
Source4: sediffx.desktop
Patch1: 0001-add-setools-seinfo-and-sesearch-python-bindings.patch
Patch2: 0002-setools-should-exit-with-an-error-status-if-it-gets-.patch
Patch3: 0003-Since-we-do-not-ship-neverallow-rules-all-always-fai.patch
Patch4: 0004-Fix-man-pages-and-getoptions.patch
@ -24,6 +22,9 @@ Patch7: 0007-Remove-unused-variables.patch
Patch8: 0008-Fix-output-to-match-policy-lines.patch
Patch9: 0009-Fix-swig-coding-style-for-structures.patch
Patch10: 0010-selinux_current_policy_path.patch
Patch11: 0011-setools-noship.patch
Patch12: 0012-seaudit.patch
Patch13: 0013-swig.patch
Summary: Policy analysis tools for SELinux
Group: System Environment/Base
@ -32,7 +33,6 @@ Requires: setools-libs = %{version}-%{release} setools-libs-tcl = %{version}-%{r
# external requirements
%define autoconf_ver 2.59
%define bwidget_ver 1.8
%define java_ver 1.2
%define gtk_ver 2.8
%define python_ver 2.3
%define sepol_ver 2.1.5-3
@ -53,6 +53,7 @@ License: LGPLv2
Summary: Policy analysis support libraries for SELinux
Group: System Environment/Libraries
Requires: libselinux >= %{selinux_ver} libsepol >= %{sepol_ver} sqlite >= %{sqlite_ver}
Obsoletes: setools-libs-java
BuildRequires: flex bison pkgconfig
BuildRequires: glibc-devel libstdc++-devel gcc gcc-c++
BuildRequires: libselinux-devel >= %{selinux_ver} libsepol-devel >= %{sepol_ver}
@ -92,25 +93,6 @@ This package includes Python bindings for the following libraries:
libseaudit parse and filter SELinux audit messages in log files
libsefs SELinux file contexts library
%package libs-java
License: LGPLv2
Summary: Java bindings for SELinux policy analysis
Group: Development/Languages
Requires: setools-libs = %{version}-%{release} java >= %{java_ver}
BuildRequires: java-devel >= %{java_ver} swig >= %{swig_ver}
%description libs-java
SETools is a collection of graphical tools, command-line tools, and
libraries designed to facilitate SELinux policy analysis.
This package includes Java bindings for the following libraries:
libapol policy analysis library
libpoldiff semantic policy difference library
libqpol library that abstracts policy internals
libseaudit parse and filter SELinux audit messages in log files
libsefs SELinux file contexts library
%package libs-tcl
License: LGPLv2
Summary: Tcl bindings for SELinux policy analysis
@ -163,10 +145,7 @@ libraries designed to facilitate SELinux policy analysis.
This package includes the following console tools:
seaudit-report audit log analysis tool
sechecker SELinux policy checking tool
secmds command line tools: seinfo, sesearch, findcon,
replcon, and indexcon
secmds command line tools: seinfo, sesearch
sediff semantic policy difference tool
%package gui
@ -186,17 +165,14 @@ This package includes the following graphical tools:
apol policy analysis tool
seaudit audit log analysis tool
sediffx semantic policy difference tool
%define setoolsdir %{_datadir}/setools-%{setools_maj_ver}
%define pkg_py_lib %{python_sitelib}/setools
%define pkg_py_arch %{python_sitearch}/setools
%define javajardir %{_datadir}/java
%define tcllibdir %{_libdir}/setools
%prep
%setup -q
%patch1 -p 1 -b .python
%patch2 -p 1 -b .exitstatus
%patch3 -p 1 -b .neverallow
%patch4 -p 1 -b .manpage
@ -206,7 +182,9 @@ This package includes the following graphical tools:
%patch8 -p 1 -b .fixoutput
%patch9 -p 1 -b .fixswig
%patch10 -p 1 -b .current
%patch11 -p 1 -b .noship
%patch12 -p 1 -b .seaudit
%patch13 -p 1 -b .swig
%ifarch sparc sparcv9 sparc64 s390 s390x
for file in `find . -name Makefile.am`; do
sed -i -e 's:-fpic:-fPIC:' $file;
@ -215,12 +193,13 @@ This package includes the following graphical tools:
# Fixup expected version of SWIG:
sed -i -e "s|AC_PROG_SWIG(1.3.28)|AC_PROG_SWIG(2.0.0)|g" configure.ac
# and rebuild the autotooled files:
autoreconf
aclocal
autoreconf -if
%build
automake
%configure --libdir=%{_libdir} --disable-bwidget-check --disable-selinux-check \
--enable-swig-python --enable-swig-java --enable-swig-tcl --with-java-prefix=/usr/lib/jvm/java
--enable-swig-python --enable-swig-tcl
# work around issue with gcc 4.3 + gnu99 + swig-generated code:
sed -i -e 's:$(CC):gcc -std=gnu89:' libseaudit/swig/python/Makefile
make %{?_smp_mflags}
@ -237,22 +216,14 @@ install -p -m 644 packages/rpm/seaudit.console ${RPM_BUILD_ROOT}%{_sysconfdir}/s
install -d -m 755 ${RPM_BUILD_ROOT}%{_datadir}/applications
install -p -m 644 apol/apol.png ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/apol.png
install -p -m 644 seaudit/seaudit.png ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/seaudit.png
install -p -m 644 sediff/sediffx.png ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/sediffx.png
desktop-file-install --dir ${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2} %{SOURCE3} %{SOURCE4}
desktop-file-install --dir ${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE2}
ln -sf consolehelper ${RPM_BUILD_ROOT}/%{_bindir}/seaudit
# replace absolute symlinks with relative symlinks
ln -sf ../setools-%{setools_maj_ver}/qpol.jar ${RPM_BUILD_ROOT}/%{javajardir}/qpol.jar
ln -sf ../setools-%{setools_maj_ver}/apol.jar ${RPM_BUILD_ROOT}/%{javajardir}/apol.jar
ln -sf ../setools-%{setools_maj_ver}/poldiff.jar ${RPM_BUILD_ROOT}/%{javajardir}/poldiff.jar
ln -sf ../setools-%{setools_maj_ver}/seaudit.jar ${RPM_BUILD_ROOT}/%{javajardir}/seaudit.jar
ln -sf ../setools-%{setools_maj_ver}/sefs.jar ${RPM_BUILD_ROOT}/%{javajardir}/sefs.jar
# remove static libs
rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.a
# ensure permissions are correct
chmod 0755 ${RPM_BUILD_ROOT}/%{_libdir}/*.so.*
chmod 0755 ${RPM_BUILD_ROOT}/%{_libdir}/%{name}/*/*.so.*
chmod 0755 ${RPM_BUILD_ROOT}/%{pkg_py_arch}/*.so.*
chmod 0755 ${RPM_BUILD_ROOT}/%{setoolsdir}/seaudit-report-service
chmod 0644 ${RPM_BUILD_ROOT}/%{tcllibdir}/*/pkgIndex.tcl
%clean
@ -277,17 +248,6 @@ rm -rf ${RPM_BUILD_ROOT}
%ifarch x86_64 ppc64 sparc64 s390x
%{pkg_py_arch}/
%endif
%{python_sitearch}/setools*.egg-info
%files libs-java
%defattr(-,root,root,-)
%{_libdir}/libjqpol.so.*
%{_libdir}/libjapol.so.*
%{_libdir}/libjpoldiff.so.*
%{_libdir}/libjseaudit.so.*
%{_libdir}/libjsefs.so.*
%{setoolsdir}/*.jar
%{javajardir}/*.jar
%files libs-tcl
%defattr(-,root,root,-)
@ -312,33 +272,16 @@ rm -rf ${RPM_BUILD_ROOT}
%defattr(-,root,root,-)
%{_bindir}/seinfo
%{_bindir}/sesearch
%{_bindir}/indexcon
%{_bindir}/findcon
%{_bindir}/replcon
%{_bindir}/sechecker
%{_bindir}/sediff
%{_bindir}/seaudit-report
%{setoolsdir}/sechecker-profiles/
%{setoolsdir}/sechecker_help.txt
%{setoolsdir}/seaudit-report-service
%{setoolsdir}/seaudit-report.conf
%{setoolsdir}/seaudit-report.css
%{_mandir}/man1/findcon.1.gz
%{_mandir}/man1/indexcon.1.gz
%{_mandir}/man1/replcon.1.gz
%{_mandir}/man1/sechecker.1.gz
%{_mandir}/man1/sediff.1.gz
%{_mandir}/man1/seinfo.1.gz
%{_mandir}/man1/sesearch.1.gz
%{_mandir}/man8/seaudit-report.8.gz
%files gui
%defattr(-,root,root,-)
%{_bindir}/seaudit
%{_bindir}/sediffx
%{_bindir}/apol
%{tcllibdir}/apol_tcl/
%{setoolsdir}/sediff_help.txt
%{setoolsdir}/apol_help.txt
%{setoolsdir}/domaintrans_help.txt
%{setoolsdir}/file_relabel_help.txt
@ -351,7 +294,6 @@ rm -rf ${RPM_BUILD_ROOT}
%{setoolsdir}/apol.gif
%{setoolsdir}/dot_seaudit
%{_mandir}/man1/apol.1.gz
%{_mandir}/man1/sediffx.1.gz
%{_mandir}/man8/seaudit.8.gz
%{_sbindir}/seaudit
%config(noreplace) %{_sysconfdir}/pam.d/seaudit
@ -363,15 +305,27 @@ rm -rf ${RPM_BUILD_ROOT}
%postun libs -p /sbin/ldconfig
%post libs-java -p /sbin/ldconfig
%postun libs-java -p /sbin/ldconfig
%post libs-tcl -p /sbin/ldconfig
%postun libs-tcl -p /sbin/ldconfig
%changelog
* Wed Jan 30 2013 Dan Walsh <dwalsh@redhat.com> - 3.3.7-34
- Rebuild using pristine source from Tresys
* Tue Jan 29 2013 Dan Walsh <dwalsh@redhat.com> - 3.3.7-33
- Apply swig patch to make apol work again.
* Fri Sep 28 2012 Dan Walsh <dwalsh@redhat.com> - 3.3.7-31
- Add filename_trans to python/setools/sesearch bindings
* Fri Sep 28 2012 Dan Walsh <dwalsh@redhat.com> - 3.3.7-30
- Apply Lars Jensen patch to fix seaudit
- Remove java bindings, not supported
* Sun Sep 16 2012 Dan Walsh <dwalsh@redhat.com> - 3.3.7-29
- Remove tools that we do not want to support
* Mon Aug 20 2012 Dan Horák <dan[at]danny.cz> - 3.3.7-28
- use autoreconf to rebuild all autotooled files (FTBFS)
@ -415,7 +369,7 @@ rm -rf ${RPM_BUILD_ROOT}
* Fri Apr 15 2011 Dan Walsh <dwalsh@redhat.com> - 3.3.7-15
- Rebuild for new sepol
* Sun Apr 9 2011 Dan Walsh <dwalsh@redhat.com> - 3.3.7-14
* Sat Apr 9 2011 Dan Walsh <dwalsh@redhat.com> - 3.3.7-14
- Rebuild for new sepol
* Sun Feb 27 2011 Dennis Gilmore <dennis@ausil.us> - 3.3.7-13
@ -525,7 +479,7 @@ patch 1
* Wed Apr 25 2007 Jason Tang <jtang@tresys.com> 3.2-0
- update to SETools 3.2 release
* Mon Feb 02 2007 Jason Tang <jtang@tresys.com> 3.1-1
* Fri Feb 02 2007 Jason Tang <jtang@tresys.com> 3.1-1
- update to SETools 3.1 release
* Mon Oct 30 2006 Dan Walsh <dwalsh@redhat.com> 3.0-2.fc6
@ -650,7 +604,7 @@ patch 1
* Tue Apr 5 2005 Dan Walsh <dwalsh@redhat.com> 2.0.0-2
- Fix buildrequires lines in spec file
* Tue Mar 2 2005 Dan Walsh <dwalsh@redhat.com> 2.0.0-1
* Wed Mar 2 2005 Dan Walsh <dwalsh@redhat.com> 2.0.0-1
- Update to latest from tresys
* Mon Nov 29 2004 Dan Walsh <dwalsh@redhat.com> 1.5.1-6

View File

@ -1 +1 @@
206d1b31d1dda4ace2fbf6ce02d13814 setools-3.3.7.tar.bz2
0377d7a06028825434cd7b41a80865a5 setools-3.3.7.tar.bz2