diff --git a/.cvsignore b/.cvsignore index f72d6ef..d1f1ce6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,3 @@ setools-1.4.1.tgz +setools-1.5.tgz +setools-1.5.1.tgz diff --git a/setools-rhat.patch b/setools-rhat.patch index 1d5452c..8221471 100644 --- a/setools-rhat.patch +++ b/setools-rhat.patch @@ -1,15 +1,6 @@ ---- setools-1.4.1/apol/Makefile.rhat 2004-07-07 16:37:38.000000000 -0400 -+++ setools-1.4.1/apol/Makefile 2004-09-17 14:55:59.906697348 -0400 -@@ -17,7 +17,7 @@ - CFLAGS += -DSTARTUP_SCRIPT='"$(APOL_STARTUP_SCRIPT)"' - - apol: $(GUI-OBJ) apol.tcl -- $(CC) $(TCL_LIBINC) -o $@ $(GUI-OBJ) $(LINKFLAGS) $(TCL_LIBS) -+ $(CC) $(TCL_LIBINC) -o $@ $(GUI-OBJ) $(LINKFLAGS) $(TCL_LIBS) -lselinux - - - apol.tcl: $(TCL-FILES) -@@ -45,7 +45,7 @@ +--- setools-1.5.1/apol/Makefile.rhat 2004-10-29 17:51:22.000000000 -0400 ++++ setools-1.5.1/apol/Makefile 2004-11-01 10:15:38.000000000 -0500 +@@ -56,7 +56,7 @@ install: apol apol.tcl @@ -18,7 +9,7 @@ @if [ -n $(INSTALL_LIBDIR) ]; then \ for file in $(TCL-FILES); do \ if [ -f $(INSTALL_LIBDIR)/$$file ]; then \ -@@ -54,6 +54,7 @@ +@@ -65,6 +65,7 @@ done \ fi install -m 644 apol.tcl $(APOL_HELP_FILES) $(APOL_PERM_MAPS) $(INSTALL_LIBDIR) @@ -26,20 +17,9 @@ cd $(INSTALL_LIBDIR); ln -sf $(APOL_DFLT_PMAP) apol_perm_mapping clean: ---- setools-1.4.1/seaudit/Makefile.rhat 2004-07-07 16:37:39.000000000 -0400 -+++ setools-1.4.1/seaudit/Makefile 2004-09-17 14:53:57.182637843 -0400 -@@ -22,7 +22,7 @@ - $(CC) $(CFLAGS) $(GTK_CFLAGS) $(INCLUDE) -c $< - - install: seaudit -- install -m 755 seaudit $(BINDIR) -+ install -m 755 seaudit $(SBINDIR) - install -m 644 $(GLADE_FILES) $(INSTALL_LIBDIR) - install -m 644 seaudit_help.txt $(INSTALL_LIBDIR) - install -m 444 dot_seaudit $(INSTALL_LIBDIR) ---- setools-1.4.1/Makefile.rhat 2004-07-07 16:37:39.000000000 -0400 -+++ setools-1.4.1/Makefile 2004-09-17 15:02:24.825557300 -0400 -@@ -25,8 +25,8 @@ +--- setools-1.5.1/Makefile.rhat 2004-10-29 17:51:22.000000000 -0400 ++++ setools-1.5.1/Makefile 2004-11-01 10:57:12.071440625 -0500 +@@ -39,8 +39,8 @@ # File location defaults; used in various places in code # Change these if you want different defaults SELINUX_DIR = $(DESTDIR)/selinux @@ -50,7 +30,7 @@ POLICY_SRC_DIR = $(DESTDIR)$(SELINUX_POLICY_DIR)/src/policy POLICY_SRC_FILE = $(POLICY_SRC_DIR)/policy.conf DEFAULT_LOG_FILE = /var/log/messages -@@ -46,6 +46,7 @@ +@@ -68,6 +68,7 @@ # Install directories # Binaries go here BINDIR = $(DESTDIR)/usr/bin @@ -58,124 +38,40 @@ # The code uses the specified path below. If you change this, DO NOT add -@@ -66,7 +67,7 @@ +@@ -88,7 +89,7 @@ POLICYINSTALLDIRS = seuser # exports -export CFLAGS CC YACC LEX LINKFLAGS BINDIR INSTALL_LIBDIR INSTALL_HELPDIR LIBS TCL_LIBINC TCL_LIBS MAKE +export CFLAGS CC YACC LEX LINKFLAGS BINDIR SBINDIR INSTALL_LIBDIR INSTALL_HELPDIR LIBS TCL_LIBINC TCL_LIBS MAKE export SELINUX_DIR POLICY_INSTALL_DIR POLICY_SRC_DIR SRC_POLICY_DIR POLICY_SRC_FILE DEFAULT_LOG_FILE - export SHARED_LIB_INSTALL_DIR STATIC_LIB_INSTALL_DIR SETOOLS_INCLUDE + export TOPDIR SHARED_LIB_INSTALL_DIR STATIC_LIB_INSTALL_DIR SETOOLS_INCLUDE DEBUG LIBSELINUX -@@ -224,7 +225,7 @@ +@@ -206,7 +207,7 @@ install-nogui: $(INSTALL_LIBDIR) install-seuser install-secmds --install: install-apol install-seuserx install-sepcut install-awish install-secmds install-seaudit -+install: install-apol install-seuserx install-sepcut install-awish install-secmds install-seaudit install-bwidget install-docs +-install: $(BINDIR) $(SHARED_LIB_INSTALL_DIR) install-dev install-apol install-seuserx install-sepcut \ ++install: $(BINDIR) $(SHARED_LIB_INSTALL_DIR) install-apol install-seuserx install-sepcut \ + install-awish install-secmds install-seaudit install-docs - # Install the libraries - install-libseuser: ---- setools-1.4.1/packages/Makefile.rhat 2004-07-07 16:37:38.000000000 -0400 -+++ setools-1.4.1/packages/Makefile 2004-09-17 14:38:28.803731785 -0400 -@@ -4,9 +4,10 @@ + $(SHARED_LIB_INSTALL_DIR): +--- setools-1.5.1/seaudit/Makefile.rhat 2004-10-29 17:51:22.000000000 -0400 ++++ setools-1.5.1/seaudit/Makefile 2004-11-01 10:15:38.000000000 -0500 +@@ -53,8 +53,8 @@ + $(CC) $(CFLAGS) $(GTK_CFLAGS) $(LIBXML_FLAGS) $(INCLUDE) -c $< - # INSTALL_PATH is set based upon your current - # version of tcl using the tcl_vars script. --INSTALL_PATH=$(shell env tclsh ../tcl_vars tcl_library) -+INSTALL_PATH=$(DESTDIR)/$(shell env tclsh ../tcl_vars tcl_library) - - install: -+ mkdir -p $(INSTALL_PATH) - tar -zxvf BWidget-1.4.1.tar.gz - mv BWidget-1.4.1 $(INSTALL_PATH) - -@@ -19,4 +20,4 @@ - clean: - rm -rf BWidget-1.4.1/ - --bare: clean -\ No newline at end of file -+bare: clean ---- setools-1.4.1/libseuser/seuser_db.c.rhat 2004-07-07 16:37:39.000000000 -0400 -+++ setools-1.4.1/libseuser/seuser_db.c 2004-09-17 14:38:28.800732121 -0400 -@@ -17,8 +17,15 @@ - #include - #include - #include -+#include - #include "seuser_db.h" - -+/* -+ defined in selinux/selinux.h -+ but conflicts with policy.h -+*/ -+extern char *selinux_file_context_path(void); -+ - /* apol lib */ - #include "../libapol/policy.h" - #include "../libapol/policy-io.h" -@@ -789,8 +796,10 @@ - } - free(full_config); - -- -- db->policy_conf = get_config_var("policy.conf", fp); -+ /* db->policy_conf = get_config_var("policy.conf", fp);*/ -+ db->policy_conf = malloc(PATH_MAX); -+ snprintf(db->policy_conf, PATH_MAX, "%s/src/policy/policy.conf", -+ selinux_policy_root()); - if(db->policy_conf == NULL) { - fclose(fp); - free_conf_info(db); -@@ -805,7 +814,9 @@ - return 4; - } - -- db->policy_dir = get_config_var("policy_dir", fp); -+ /* db->policy_dir = get_config_var("policy_dir", fp);*/ -+ db->policy_dir = malloc(PATH_MAX); -+ snprintf(db->policy_dir, PATH_MAX, "%s/src/policy", selinux_policy_root()); - if(db->policy_dir == NULL) { - fclose(fp); - free_conf_info(db); -@@ -820,7 +831,9 @@ - return 6; - } - -- db->user_file = get_config_var("user_file", fp); -+ /* db->user_file = get_config_var("user_file", fp);*/ -+ db->user_file = malloc(PATH_MAX); -+ snprintf(db->user_file, PATH_MAX, "%s/src/policy/users", selinux_policy_root()); - if(db->user_file == NULL) { - fclose(fp); - free_conf_info(db); -@@ -829,7 +842,8 @@ - } - /* users file may not exist which is ok, so we won't check read access. */ - -- db->file_contexts_file = get_config_var("file_contexts_file", fp); -+ /* db->file_contexts_file = get_config_var("file_contexts_file", fp);*/ -+ db->file_contexts_file = strdup(selinux_file_context_path()); - if(db->file_contexts_file == NULL) { - fclose(fp); - free_conf_info(db); ---- setools-1.4.1/seuser/Makefile.rhat 2004-07-07 16:37:39.000000000 -0400 -+++ setools-1.4.1/seuser/Makefile 2004-09-17 14:55:34.387595850 -0400 -@@ -22,10 +22,10 @@ - SHELL = /bin/sh - - seuser: $(CMD-OBJ) -- $(CC) -o $@ $(CMD-OBJ) $(LINKFLAGS) $(LIBS) -+ $(CC) -o $@ $(CMD-OBJ) $(LINKFLAGS) $(LIBS) -lselinux - - seuserx: $(GUI-OBJ) se_user.tcl -- $(CC) $(GUI_CFLAGS) $(TCL_LIBINC) -o $@ $(GUI-OBJ) $(LINKFLAGS) $(TCL_LIBS) -+ $(CC) $(GUI_CFLAGS) $(TCL_LIBINC) -o $@ $(GUI-OBJ) $(LINKFLAGS) $(TCL_LIBS) -lselinux - - se_user.tcl: $(TCL-FILES) - cat $(TCL-FILES) | \ -@@ -148,7 +148,7 @@ + install: seaudit seaudit-report +- install -m 755 seaudit $(BINDIR) +- install -m 755 seaudit-report $(BINDIR) ++ install -m 755 seaudit $(SBINDIR) ++ install -m 755 seaudit-report $(SBINDIR) + install -m 644 $(GLADE_FILES) $(INSTALL_LIBDIR) + install -m 644 seaudit_help.txt $(INSTALL_LIBDIR) + install -m 444 dot_seaudit $(INSTALL_LIBDIR) +--- setools-1.5.1/seuser/Makefile.rhat 2004-10-29 17:51:22.000000000 -0400 ++++ setools-1.5.1/seuser/Makefile 2004-11-01 10:15:38.000000000 -0500 +@@ -158,7 +158,7 @@ install: seuser seuserx se_user.tcl install -d $(BINDIR) install -m 755 seuser $(BINDIR) @@ -184,32 +80,12 @@ install -m 755 $(SE_SHELL_SCRIPTS) $(BINDIR) install -m 644 se_user.tcl $(SEUSER_HELP_FILE) $(INSTALL_LIBDIR) install -m 644 $(SEUSER_CONF_FILE) $(INSTALL_LIBDIR); ---- setools-1.4.1/docs-src/Makefile.rhat 2004-07-07 16:37:39.000000000 -0400 -+++ setools-1.4.1/docs-src/Makefile 2004-09-17 14:38:28.805731560 -0400 -@@ -55,3 +55,15 @@ - for file in $(TOP-DOCS); do \ - rm -f ../$$file; \ - done -+ -+install: -+ mkdir -p ${INSTALL_HELPDIR} -+ for file in KNOWN-BUGS README; do \ -+ cat $$file.in | sed -e 's/RELEASE_VERSION/$(shell cat ../VERSION)/g' | \ -+ sed -e 's/MOD_DATE/$(shell date '+%B %d, %G')/g' > ${INSTALL_HELPDIR}/$$file; \ -+ done -+ install -m 644 ../seaudit/seaudit_help.txt ${INSTALL_HELPDIR} -+ install -m 644 ../seuser/seuser_help.txt ${INSTALL_HELPDIR} -+ install -m 644 ../sepct/sepcut_help.txt ${INSTALL_HELPDIR} -+ install -m 644 ../apol/*.txt ${INSTALL_HELPDIR} -+ ---- setools-1.4.1/awish/Makefile.rhat 2004-07-07 16:37:39.000000000 -0400 -+++ setools-1.4.1/awish/Makefile 2004-09-17 14:38:28.802731897 -0400 -@@ -4,7 +4,7 @@ - AWISH_OBJ = awish.o $(LIBSEUSER-TCL) $(LIBAPOL-TCL) +--- setools-1.5.1/packages/Makefile.rhat 2004-10-29 17:51:22.000000000 -0400 ++++ setools-1.5.1/packages/Makefile 2004-11-01 10:15:38.000000000 -0500 +@@ -16,4 +16,4 @@ + clean: + rm -Rf BWidget-1.4.1 - awish: $(AWISH_OBJ) -- $(CC) $(TCL_LIBINC) -o $@ $(AWISH_OBJ) $(LINKFLAGS) $(TCL_LIBS) -+ $(CC) $(TCL_LIBINC) -o $@ $(AWISH_OBJ) $(LINKFLAGS) $(TCL_LIBS) -lselinux - - - %.o: %.c +-bare: clean +\ No newline at end of file ++bare: clean diff --git a/setools.spec b/setools.spec index 1d3d7cb..abc44fd 100644 --- a/setools.spec +++ b/setools.spec @@ -1,7 +1,7 @@ Summary: SELinux tools for managing policy Name: setools -Version: 1.4.1 -Release: 5 +Version: 1.5.1 +Release: 1 License: GPL Group: System Environment/Base Source: http://www.tresys.com/Downloads/selinux-tools/setools-%{version}.tgz @@ -21,7 +21,6 @@ BuildRequires: libselinux-devel, libxml2-devel BuildPrereq: bison, flex, pkgconfig Patch0: setools-rhat.patch -Patch1: setools-1.4.1.patch Obsoletes: setools-devel %description @@ -87,7 +86,6 @@ tools. %prep %setup -q %patch0 -p1 -b .rhat -%patch1 -p1 -b .selinux_usr %build make LIBDIR=%{_libdir} all @@ -99,11 +97,14 @@ mkdir -p $RPM_BUILD_ROOT/%_sbindir mkdir -p $RPM_BUILD_ROOT/%_libdir mkdir -p $RPM_BUILD_ROOT/usr/include/selinux/apol mkdir -p $RPM_BUILD_ROOT/usr/share/doc/setools-%{version} -make DESTDIR="${RPM_BUILD_ROOT}" INSTALL_HELPDIR=$RPM_BUILD_ROOT/usr/share/doc/setools-%{version} install +mkdir -p $RPM_BUILD_ROOT/usr/share/tcl8.4 +make DESTDIR="${RPM_BUILD_ROOT}" INSTALL_HELPDIR=$RPM_BUILD_ROOT/usr/share/doc/setools-%{version} install install-bwidget rm -f ${RPM_BUILD_ROOT}/etc/selinux/strict/src/policy/domains/program/seuser.te rm -f ${RPM_BUILD_ROOT}/etc/selinux/strict/src/policy/file_contexts/program/seuser.fc rm -f ${RPM_BUILD_ROOT}/usr/bin/findcon rm -f ${RPM_BUILD_ROOT}/usr/bin/replcon +rm -f ${RPM_BUILD_ROOT}/usr/bin/searchcon +rm -f ${RPM_BUILD_ROOT}/usr/bin/indexcon install -D %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d/apol install -D %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d/seuserx install -D %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/pam.d/seaudit @@ -132,6 +133,7 @@ rm -rf ${RPM_BUILD_ROOT} %_bindir/awish %_bindir/seaudit %_sbindir/seaudit +%_sbindir/seaudit-report %{_datadir}/applications/apol.desktop %{_datadir}/applications/seuserx.desktop %{_datadir}/applications/seaudit.desktop @@ -157,6 +159,9 @@ rm -rf ${RPM_BUILD_ROOT} /usr/share/doc/setools-%{version}/* %changelog +* Mon Nov 1 2004 Dan Walsh 1.5.1-1 +- Update to latest from Upstream + * Wed Oct 6 2004 Dan Walsh 1.4.1-5 - Update tresys patch diff --git a/sources b/sources index b8f527f..c3c8b35 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6afb10ee33873892772cdaa7f04a136a setools-1.4.1.tgz +92186df0e71894df8a84da32b87d8aec setools-1.5.1.tgz