diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index 23f023b..0000000 --- a/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -sectool-0.9.1.tar.bz2 diff --git a/Makefile b/Makefile deleted file mode 100644 index 460a38b..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: sectool -# $Id$ -NAME := sectool -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..0e76cf2 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +The sectool project is no longer developed nor maintained upstream. As a replacement, try the OpenSCAP project (https://www.open-scap.org) and its sectool SCL content (openscap-content-sectool package). diff --git a/sectool-0.9.1-cronieReq.patch b/sectool-0.9.1-cronieReq.patch deleted file mode 100644 index 5e1436e..0000000 --- a/sectool-0.9.1-cronieReq.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up sectool-0.9.1/tests/12_cron.dsc.cronieReq sectool-0.9.1/tests/12_cron.dsc ---- sectool-0.9.1/tests/12_cron.dsc.cronieReq 2008-10-23 14:10:21.000000000 +0200 -+++ sectool-0.9.1/tests/12_cron.dsc 2008-10-23 14:10:34.000000000 +0200 -@@ -6,6 +6,7 @@ DESCRIPTION="Basic crontab checking. - permissions of cron related dirs and commands listed in crontab." - LEVELS="1 2 3 4 5" - GROUPS="daemons" -+REQUIRES="cronie" - AUTHOR="Daniel Kopecek " - - [DEFAULT] diff --git a/sectool-0.9.1-getValueFromH.patch b/sectool-0.9.1-getValueFromH.patch deleted file mode 100644 index dd11bae..0000000 --- a/sectool-0.9.1-getValueFromH.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff --git a/tests/bash_defs.sh b/tests/bash_defs.sh -index 47aa4ec..09e06b3 100644 ---- a/tests/bash_defs.sh -+++ b/tests/bash_defs.sh -@@ -187,16 +187,17 @@ function canLogIn { - # getValueFromH '/usr/include/bits/utmp.h' 'UT_NAMESIZE' - # echo $ReturnVal - function getValueFromH { -- if ! [[ -r "$1" ]] -- then -- report 'WARNING' 0 "Can't read a constant $2, header file $1 not found" -+ if ! [[ -r "$1" ]]; then -+ report 'WARNING' 1234 "Can't read a constant $2, header file $1 not found" -+ return 0 - else - line="$(egrep "^#define $2..*" $1)" -- if [[ -n "$line" ]] -- then -- ReturnVal="$(echo "$line" | cut -f2)" -+ if [[ -n "$line" ]]; then -+ l_int retval=$(echo "$line" | cut -f2) -+ return $retval - else -- report 'WARNING' 0 "Can't read a constant $2 from file $1, definition of the constant not found in this file" -+ report 'WARNING' 1234 "Can't read a constant $2 from file $1, definition of the constant not found in this file" -+ return 0 - fi - fi - } -diff --git a/tests/bash_defs_debug.sh b/tests/bash_defs_debug.sh -index a0d548d..d3beeff 100644 ---- a/tests/bash_defs_debug.sh -+++ b/tests/bash_defs_debug.sh -@@ -352,18 +352,19 @@ function canLogIn { - # getValueFromH '/usr/include/bits/utmp.h' 'UT_NAMESIZE' - # echo $ReturnVal - function getValueFromH { -- if ! [[ -r "$1" ]] -- then -- report 'WARNING' 0 "Can't read a constant $2, header file $1 not found" -- else -- line="$(egrep "^#define $2..*" $1)" -- if [[ -n "$line" ]] -- then -- ReturnVal="$(echo "$line" | cut -f2)" -- else -- report 'WARNING' 0 "Can't read a constant $2 from file $1, definition of the constant not found in this file" -- fi -- fi -+ if ! [[ -r "$1" ]]; then -+ report 'WARNING' 1234 "Can't read a constant $2, header file $1 not found" -+ return 0 -+ else -+ line="$(egrep "^#define $2..*" $1)" -+ if [[ -n "$line" ]]; then -+ l_int retval=$(echo "$line" | cut -f2) -+ return $retval -+ else -+ report 'WARNING' 1234 "Can't read a constant $2 from file $1, definition of the constant not found in this file" -+ return 0 -+ fi -+ fi - } - - # function isValidName -diff --git a/tests/group.sh b/tests/group.sh -index ef24886..4c43d94 100755 ---- a/tests/group.sh -+++ b/tests/group.sh -@@ -106,7 +106,7 @@ fi - - ##### too long groupname ##### - getValueFromH '/usr/include/bits/utmp.h' 'UT_NAMESIZE' -- MaxLength=$ReturnVal -+ MaxLength=$? - length="`echo \"$groupname\" | wc -m`" - if [ $length -gt $MaxLength ] - then -diff --git a/tests/passwd.sh b/tests/passwd.sh -index 536697f..c1bf10d 100755 ---- a/tests/passwd.sh -+++ b/tests/passwd.sh -@@ -123,8 +123,8 @@ check_file_perm $group_shadow 400 root:root 1 $E_BAD_PERMISSIONS "Shadow group - - ##### too long username ##### - getValueFromH '/usr/include/bits/utmp.h' 'UT_NAMESIZE' -- MaxLength=$ReturnVal -- length="`echo \"$username\" | wc -m`" -+ MaxLength=$? -+ length=$(echo "$username" | wc -m) - if [ $length -gt $MaxLength ] - then - report 'ERROR' $E_LONG_USERNAME "\$passwd: Line \$i: User \$username has too long username." -diff --git a/tests/shadow.sh b/tests/shadow.sh -index 778f39e..48773e2 100755 ---- a/tests/shadow.sh -+++ b/tests/shadow.sh -@@ -104,7 +104,7 @@ check_file_perm $group_shadow 400 root:root 1 $E_BAD_PERMISSIONS_SHADOW "Group - - ##### too long username ##### - getValueFromH '/usr/include/bits/utmp.h' 'UT_NAMESIZE' -- MaxLength=$ReturnVal -+ MaxLength=$? - length=`echo "$username" | wc -m` - if [ $length -gt $MaxLength ] - then diff --git a/sectool-0.9.1-selinux.patch b/sectool-0.9.1-selinux.patch deleted file mode 100644 index d5ccf85..0000000 --- a/sectool-0.9.1-selinux.patch +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/tests/selinuxtest.py b/tests/selinuxtest.py -index 1e04813..e4d655b 100755 ---- a/tests/selinuxtest.py -+++ b/tests/selinuxtest.py -@@ -108,6 +108,7 @@ def bool_state_to_id(state, was = False): - - - def bools_test(): -+ report(INFO, 0, "Starting booleans change test") - old_fname = os.path.join(testenv['TDATA_DIR'], testenv['OLDBOOLS_FILE']) - bools = get_bools() - testname = testenv['NAME'] -@@ -134,16 +135,16 @@ def get_msgtype(str): - if str == 'HINT' : return HINT - - def enabled_test(): -- mode = cmd.getoutput('getenforce') -- if mode != testenv['MODE'] and mode != 'Enforcing': -+ (status, mode) = cmd.getstatusoutput('getenforce') -+ if status != 0 or (mode != testenv['MODE'] and mode != 'Enforcing'): -+ if (mode == ''): mode = 'disabled' - report(get_msgtype(testenv['DISABLED_MSGTYPE']), ID_ENABLED, "Selinux is in " + mode + " mode.") - report(HINT, ID_ENABLED, "Using Enforing mode is highly recommended. See selinux manual page for switching to Enforcing mode.") - - - def main(): -- report(INFO, 0, "Starting booleans change test") -- bools_test() - enabled_test() -+ if se.is_selinux_enabled(): bools_test() - - if __name__ == '__main__': - main() diff --git a/sectool-0.9.1-setVar.patch b/sectool-0.9.1-setVar.patch deleted file mode 100644 index aeaafad..0000000 --- a/sectool-0.9.1-setVar.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff --git a/src/sectool-gui.py b/src/sectool-gui.py -index 9b6faeb..608d6af 100755 ---- a/src/sectool-gui.py -+++ b/src/sectool-gui.py -@@ -500,6 +500,7 @@ class TestHandler( Handler ): - self.environ.update( dict([ (key.upper(), self.scheduler_conf['ENVIRONMENT'][key]) for key in self.scheduler_conf['ENVIRONMENT'] ]) ) - self.environ.update( { 'TDATA_DIR_BASE' : self.environ['TDATA_DIR_BASE'] } ) - self.environ.update( { 'PATH' : self.environ['PATH'] } ) -+ self.environ.update( DEBUG='0' ) - self.suitesAll = self.ST_TestLoader.loadFromPath( self.environ["DSC_DIR"], self.environ["TESTS_DIRS"] ) - - def __remove_mark( self, string ): -@@ -511,6 +512,12 @@ class TestHandler( Handler ): - return str.group(0)[1:-1] - else: return string - -+ def set_environ( REFRESH=None, LEVEL=None, DEBUG=None ): -+ -+ if REFRESH != None: self.environ.update( REFRESH = REFRESH ) -+ if DEBUG != None: self.environ.update( DEBUG = DEBUG ) -+ if LEVEL != None: self.environ.update( LEVEL = LEVEL ) -+ - def set_default_level( self ): - - self.__formatter.select_level( self.scheduler_conf['ACTION']['LEVEL'] ) -@@ -586,6 +593,8 @@ class TestHandler( Handler ): - - if len( test_list ) == 0: return - suite = self.suitesAll.filter( self.filterTestNames, test_list=test_list ) -+ if level == -1: self.environ.update( REFRESH = '1' ) -+ else: self.environ.update( REFRESH = '0' ) - suite.updateEnviron(self.environ) - - self.threadHandler = ThreadHandler( self.__formatter, suite, test_list, level ) #: run tests in new thread -@@ -734,8 +743,9 @@ class ThreadHandler(threading.Thread, Handler): - gtk.gdk.threads_leave() - #self.__formatter.show_test_summary( test.dsc['HEADER']['NAME'] ) - # TODO: update selected test -- -+ - else: -+ - for test in self.__suite: - - if self.__stopthread.isSet(): break - diff --git a/sectool-0.9.1-zsh.patch b/sectool-0.9.1-zsh.patch deleted file mode 100644 index 52927f4..0000000 --- a/sectool-0.9.1-zsh.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/tests/home_files.sh b/tests/home_files.sh -index 9faaff5..ea016f0 100755 ---- a/tests/home_files.sh -+++ b/tests/home_files.sh -@@ -80,7 +80,12 @@ NO_WRITE_FILES="\ - .viminfo \ - .xsession \ - .xinitrc \ -- .Xdefaults" -+ .Xdefaults \ -+ .zshenv \ -+ .zprofile \ -+ .zshrc \ -+ .zlogin \ -+ .zlogout" - - if (( ${REFRESH} == 1 )); then - test_exit ${E_OK} diff --git a/sectool-0.9.2-man_files.patch b/sectool-0.9.2-man_files.patch deleted file mode 100644 index 23f14d2..0000000 --- a/sectool-0.9.2-man_files.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -up sectool-0.9.2/src/sectool.8.man_files sectool-0.9.2/src/sectool.8 ---- sectool-0.9.2/src/sectool.8.man_files 2008-09-10 11:44:31.000000000 +0200 -+++ sectool-0.9.2/src/sectool.8 2008-12-02 09:50:18.000000000 +0100 -@@ -156,6 +156,24 @@ The configuration file is stored in /etc - - sectool --level 5 --mail admin@mydomain.com - -+.SH FILES -+. -+.TP -+/etc/sectool/sectool.conf -+Configuration file -+. -+.TP -+/etc/sectool/tests -+Test directory with description files ( .dsc files ) -+. -+.TP -+/etc/share/sectool/tests -+Test directory with source files -+. -+.TP -+/var/log/sectool.log -+Log file, where sectool stores output from tests -+. - .SH BUGS - Of course there are no bugs. If you still believe you have found one, please include a session with debug information turned on (option - .B --debug). diff --git a/sectool.log b/sectool.log deleted file mode 100644 index b8c5f70..0000000 --- a/sectool.log +++ /dev/null @@ -1,7 +0,0 @@ -/var/log/sectool.log { - missingok - notifempty - size 250k - create 0644 root root -} - diff --git a/sectool.spec b/sectool.spec deleted file mode 100644 index 52065d3..0000000 --- a/sectool.spec +++ /dev/null @@ -1,223 +0,0 @@ -Summary: A security audit system and intrusion detection system -Name: sectool -Version: 0.9.1 -Release: 9 -URL: https://hosted.fedoraproject.org/sectool/wiki/WikiStart -Source0: %{name}-%{version}.tar.bz2 -Source1: sectool.log -Patch1: sectool-0.9.1-cronieReq.patch -Patch2: sectool-0.9.1-setVar.patch -Patch3: sectool-0.9.1-getValueFromH.patch -Patch4: sectool-0.9.1-selinux.patch -Patch5: sectool-0.9.1-zsh.patch -Patch6: sectool-0.9.2-man_files.patch -License: GPLv2+ -Group: Applications/System -Requires: gettext coreutils which libselinux -Requires: python2 rpm-python libselinux-python -BuildRequires: desktop-file-utils gettext intltool rpm-devel asciidoc libselinux-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -%package gui -Summary: GUI for sectool - security audit system and intrusion detection system -License: GPLv2+ -Group: Applications/System -Requires: sectool = %{version}-%{release} -Requires: pygtk2 usermode - -%description -sectool is a security tool that can be used both as a security audit -and intrusion detection system. It consists of set of tests, library -and command line interface tool. Tests are sorted into groups and security -levels. Admins can run certain tests, groups or whole security levels. -The library and the tools are implemented in python and tests are -language independent. - -%description gui -sectool-gui provides a GTK-based graphical user interface to sectool. - -%prep -%setup -q -%patch1 -p1 -b .cronieReq -%patch2 -p1 -b .setVar -%patch3 -p1 -b .getValueFromH -%patch4 -p1 -b .selinux -%patch5 -p1 -b .zsh -%patch6 -p1 -b .man_files - -%build -make %{?_smp_mflags} - -%install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install -desktop-file-install --delete-original \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - --vendor=fedora \ - $RPM_BUILD_ROOT%{_datadir}/applications/sectool.desktop - -#logrotate -install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d -install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sectool -#adjust paths in sectool.conf -sed -i 's,DSC_DIR=\(.*\),DSC_DIR=%{_sysconfdir}/sectool/tests,' $RPM_BUILD_ROOT%{_sysconfdir}/sectool/sectool.conf -sed -i 's,TESTS_DIRS=\(.*\),TESTS_DIRS=%{_datadir}/sectool/tests,' $RPM_BUILD_ROOT%{_sysconfdir}/sectool/sectool.conf -sed -i 's,TDATA_DIR_BASE=\(.*\),TDATA_DIR_BASE=%{_localstatedir}/lib/sectool,' $RPM_BUILD_ROOT%{_sysconfdir}/sectool/sectool.conf -#adjust icons path in guiOutput.py -sed -i 's,__ico_path = \(.*\),__ico_path = "%{_datadir}/pixmaps/sectool/",' $RPM_BUILD_ROOT%{_datadir}/sectool/guiOutput.py -#this file is just for development -rm $RPM_BUILD_ROOT/%{_datadir}/sectool/scheduler/selftest.py - -%find_lang %{name} - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -f %{name}.lang -%defattr(-,root,root) -%doc COPYING AUTHORS README doc/tests_documentation.html -%config(noreplace) %{_sysconfdir}/sectool/ -%config(noreplace) %{_sysconfdir}/logrotate.d/sectool -%dir %{_localstatedir}/lib/sectool -%dir %{_datadir}/sectool -%{_sbindir}/sectool -#library with tests -%{_datadir}/sectool/scheduler -%{_datadir}/sectool/tests -# command line tool -%{_datadir}/sectool/actions.py* -%{_datadir}/sectool/__init__.py* -%{_datadir}/sectool/output.py* -%{_datadir}/sectool/mailoutput.py* -%{_datadir}/sectool/sectool.py* -%{_datadir}/sectool/tuierrors.py* -%{_mandir}/man8/sectool.8.gz - - -%files gui -%defattr(-,root,root) -%config(noreplace) %{_sysconfdir}/pam.d/sectool-gui -%config(noreplace) %{_sysconfdir}/security/console.apps/sectool-gui -%{_bindir}/sectool-gui -%{_datadir}/sectool/gui*.py* -%{_datadir}/sectool/sectool-gui.py* -%{_datadir}/pixmaps/sectool-gui.png -%{_datadir}/pixmaps/sectool-min.png -%{_datadir}/applications/fedora-sectool.desktop -%dir %{_datadir}/pixmaps/sectool -%{_datadir}/pixmaps/sectool/*.png - - -%changelog -* Fri Mar 06 2009 Jesse Keating - 0.9.1-9 -- Rebuild for new rpm - -* Wed Feb 25 2009 Fedora Release Engineering - 0.9.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Thu Dec 4 2008 Jakub Hrozek - 0.9.1-7 -- apply mbarabas' manpage patch - -* Mon Dec 1 2008 Michael Schwendt - 0.9.1-6 -- Include /usr/share/pixmaps/sectool directory in -gui package. - -* Mon Dec 01 2008 Ignacio Vazquez-Abrams - 0.9.1-5 -- Rebuild for Python 2.6 - -* Mon Nov 03 2008 Peter Vrabec - 0.9.1-4 -- checking zsh home files (#469913) -- fix selinux test failure (#469910) - -* Mon Nov 03 2008 Peter Vrabec - 0.9.1-3 -- fix getValueFromH() (#469368) -- fix GUI: set REFRESH, DEBUG, LEVEL - -* Thu Oct 23 2008 Peter Vrabec - 0.9.1-2 -- add missing requirement (468033) -- fix deps of cron test (468033) - -* Wed Oct 22 2008 Peter Vrabec - 0.9.1-1 -- upgrade, bugfix release - -* Thu Oct 09 2008 Peter Vrabec - 0.9.0-1 -- upgrade, see changelog for changes - -* Sat Sep 06 2008 Peter Vrabec - 0.8.6-2 -- fix selinux DEPS, quick workaround - -* Fri Sep 05 2008 Peter Vrabec - 0.8.6-1 -- upgrade, see changelog - -* Thu Jul 03 2008 Peter Vrabec - 0.8.0-1 -- upgrade - -* Fri Jun 06 2008 Peter Vrabec - 0.7.6-1 -- upgrade - -* Mon May 26 2008 Peter Vrabec - 0.7.5-1 -- upgrade - -* Wed May 21 2008 Peter Vrabec - 0.7.4-1 -- new upstream release, lots of fixes and improvements, - see changelog - -* Mon Apr 28 2008 Peter Vrabec - 0.7.3-1 -- new upstream release -- better test integration - -* Fri Apr 25 2008 Peter Vrabec - 0.7.2-1 -- new upstream release -- Support overriding level configuration in ~/.sectoolrc -- Add saving level configuration in GUI: - -* Mon Apr 21 2008 Peter Vrabec - 0.7.1-1 -- new upstream release - -* Tue Apr 08 2008 Peter Vrabec - 0.7.0-1 -- new upstream release - -* Mon Mar 31 2008 Maros Barabas - 0.6.0-4 -- improved killing system in gui - -* Fri Mar 28 2008 Maros Barabas - 0.6.0-3 -- code review: cleaning code in OuputFormatter - adding comments - migrating public formatter methods to private - -* Tue Mar 25 2008 Maros Barabas - 0.6.0-2 -- repaired sensitivity of popup buttons -- code review: migrating public methods to private - more comments - -* Fri Mar 21 2008 Peter Vrabec - 0.6.0-1 -- gui improvements -- new feature include/exclude tests -- new sectool.conf - -* Mon Mar 18 2008 Jakub Hrozek - 0.5.1-1 -- Fix mail output - -* Wed Mar 05 2008 Peter Vrabec - 0.5.0-1 -- email sending support - -* Wed Mar 05 2008 Peter Vrabec - 0.4.0-1 -- new tests -- bugfixes -- support diff results -- improved GUI - -* Wed Jan 23 2008 Peter Vrabec - 0.2.0-1 -- stable demo release - -* Fri Jan 18 2008 Peter Vrabec - 0.1.0-4 -- fix rpmbuild on fc8 - -* Wed Jan 16 2008 Peter Vrabec - 0.1.0-3 -- fix license issues -- some macros clean up in makefile and spec - -* Wed Jan 16 2008 Peter Vrabec - 0.1.0-2 -- make rpmlint happy, very important cleanup - -* Tue Jan 15 2008 Peter Vrabec - 0.1.0-1 -- initial packaging diff --git a/sources b/sources deleted file mode 100644 index d73b14a..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -1bf9e281318b77044c96eb68028157ce sectool-0.9.1.tar.bz2