summaryrefslogtreecommitdiffstats
path: root/recipes-security/bastille
diff options
context:
space:
mode:
authorAndrei Dinu <andrei.adrianx.dinu@intel.com>2013-07-30 16:47:36 +0300
committerAndrei Dinu <andrei.adrianx.dinu@intel.com>2013-07-30 16:47:36 +0300
commitce5be7fd76250e63007a707a814f2cc46d611a77 (patch)
tree55f23702654356100912e3628c57a10a7780e889 /recipes-security/bastille
parenta76f79b1c6620e3e5858dc1a9bbf8e6c862f3825 (diff)
downloadmeta-security-ce5be7fd76250e63007a707a814f2cc46d611a77.tar.gz
Solved bastille config saving issue
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
Diffstat (limited to 'recipes-security/bastille')
-rw-r--r--recipes-security/bastille/bastille_3.2.1.bb8
-rw-r--r--recipes-security/bastille/files/Curses-and-IOLoader-changes.patch21
2 files changed, 15 insertions, 14 deletions
diff --git a/recipes-security/bastille/bastille_3.2.1.bb b/recipes-security/bastille/bastille_3.2.1.bb
index dcc072d..2c192d5 100644
--- a/recipes-security/bastille/bastille_3.2.1.bb
+++ b/recipes-security/bastille/bastille_3.2.1.bb
@@ -3,10 +3,11 @@ DESCRIPTION = "Bastille Linux is a Hardening and Reporting/Auditing Program whic
3LICENSE = "GPLv2" 3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" 4LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
5# Bash is needed for set +o privileged (check busybox), might also need ncurses 5# Bash is needed for set +o privileged (check busybox), might also need ncurses
6DEPENDS = "virtual/kernel"
6RDEPENDS_${PN} = "perl bash tcl perl-module-getopt-long perl-module-text-wrap lib-perl perl-module-file-path perl-module-mime-base64 perl-module-file-find perl-module-errno perl-module-file-glob perl-module-tie-hash-namedcapture perl-module-file-copy perl-module-english perl-module-exporter perl-module-cwd curses-perl coreutils" 7RDEPENDS_${PN} = "perl bash tcl perl-module-getopt-long perl-module-text-wrap lib-perl perl-module-file-path perl-module-mime-base64 perl-module-file-find perl-module-errno perl-module-file-glob perl-module-tie-hash-namedcapture perl-module-file-copy perl-module-english perl-module-exporter perl-module-cwd curses-perl coreutils"
7FILES_${PN} += "/run/lock/subsys/bastille" 8FILES_${PN} += "/run/lock/subsys/bastille"
8 9
9inherit allarch 10inherit allarch module-base
10 11
11SRC_URI = "http://sourceforge.net/projects/bastille-linux/files/bastille-linux/3.2.1/Bastille-3.2.1.tar.bz2 \ 12SRC_URI = "http://sourceforge.net/projects/bastille-linux/files/bastille-linux/3.2.1/Bastille-3.2.1.tar.bz2 \
12 file://AccountPermission.pm \ 13 file://AccountPermission.pm \
@@ -17,7 +18,7 @@ SRC_URI = "http://sourceforge.net/projects/bastille-linux/files/bastille-linux/3
17 file://config \ 18 file://config \
18 file://fix_version_parse.patch \ 19 file://fix_version_parse.patch \
19 file://yocto-standard-patch.patch \ 20 file://yocto-standard-patch.patch \
20 file://Curses-and-IOLoader-changes.patch \ 21 file://0001-Curses-and-IOLoader-changes.patch \
21 " 22 "
22 23
23SRC_URI[md5sum] = "df803f7e38085aa5da79f85d0539f91b" 24SRC_URI[md5sum] = "df803f7e38085aa5da79f85d0539f91b"
@@ -128,13 +129,14 @@ do_install () {
128 install -m 0644 OSMap/HP-UX.service ${D}${datadir}/Bastille/OSMap 129 install -m 0644 OSMap/HP-UX.service ${D}${datadir}/Bastille/OSMap
129 install -m 0644 OSMap/OSX.bastille ${D}${datadir}/Bastille/OSMap 130 install -m 0644 OSMap/OSX.bastille ${D}${datadir}/Bastille/OSMap
130 install -m 0644 OSMap/OSX.system ${D}${datadir}/Bastille/OSMap 131 install -m 0644 OSMap/OSX.system ${D}${datadir}/Bastille/OSMap
131 install -m 0644 ${WORKDIR}/config ${D}${sysconfdir}/Bastille/config 132 install -m 0777 ${WORKDIR}/config ${D}${sysconfdir}/Bastille/config
132 133
133 for file in `cat Modules.txt` ; do 134 for file in `cat Modules.txt` ; do
134 install -m 0644 Questions/$file.txt ${D}${datadir}/Bastille/Questions 135 install -m 0644 Questions/$file.txt ${D}${datadir}/Bastille/Questions
135 done 136 done
136 137
137 ln -s ${D}${sbindir}/RevertBastille ${D}${sbindir}/UndoBastille 138 ln -s ${D}${sbindir}/RevertBastille ${D}${sbindir}/UndoBastille
139 sed -i 's/3.8.11-yocto-standard/${KERNEL_VERSION}/g' ${D}${libdir}/Bastille/API.pm
138} 140}
139 141
140FILES_${PN} += "${datadir}/Bastille ${libdir}/Bastille ${libdir}/perl* ${sysconfdir}/*" 142FILES_${PN} += "${datadir}/Bastille ${libdir}/Bastille ${libdir}/perl* ${sysconfdir}/*"
diff --git a/recipes-security/bastille/files/Curses-and-IOLoader-changes.patch b/recipes-security/bastille/files/Curses-and-IOLoader-changes.patch
index 1fb2235..dfe0698 100644
--- a/recipes-security/bastille/files/Curses-and-IOLoader-changes.patch
+++ b/recipes-security/bastille/files/Curses-and-IOLoader-changes.patch
@@ -1,22 +1,22 @@
1From 456daee3ce57d3a46bf9ccf0a85ec4880ca5b262 Mon Sep 17 00:00:00 2001 1From afa9a32db7f9423b45e0cff898a868de05ad3dee Mon Sep 17 00:00:00 2001
2From: Andrei Dinu <andrei.adrianx.dinu@intel.com> 2From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
3Date: Tue, 4 Jun 2013 14:56:21 +0300 3Date: Tue, 30 Jul 2013 12:05:39 +0300
4Subject: [PATCH] Curses and IOLoader changes 4Subject: [PATCH] Curses and IOLoader changes
5 5
6The linux distribution couldn't be identified when 6The linux distribution couldn't be identified when
7running Bastille, and the question pruning method 7running Bastille, and the question pruning method
8couldn't get a match on the questions relevant to 8couldn't get a match on the questions relevant to
9the repo, so it eliminated all quetions. 9the repo, so it eliminated all questions.
10 10
11After answering the questions the checkAndSaveConfig routine 11After answering the questions the checkAndSaveConfig routine
12was called which was missing. Replaced it with Run_Bastille_ 12was called which was missing. Replaced it with outputConfig
13with_Config which exists. 13which exists.
14 14
15Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com> 15Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
16--- 16---
17 Bastille/IOLoader.pm | 2 +- 17 Bastille/IOLoader.pm | 2 +-
18 Bastille_Curses.pm | 4 +++- 18 Bastille_Curses.pm | 3 ++-
19 2 files changed, 4 insertions(+), 2 deletions(-) 19 2 files changed, 3 insertions(+), 2 deletions(-)
20 20
21diff --git a/Bastille/IOLoader.pm b/Bastille/IOLoader.pm 21diff --git a/Bastille/IOLoader.pm b/Bastille/IOLoader.pm
22index abb94d7..995d2c2 100644 22index abb94d7..995d2c2 100644
@@ -32,17 +32,16 @@ index abb94d7..995d2c2 100644
32 &B_log("DEBUG","Load Questions, first question: $first_question"); 32 &B_log("DEBUG","Load Questions, first question: $first_question");
33 &validate_questions(); 33 &validate_questions();
34diff --git a/Bastille_Curses.pm b/Bastille_Curses.pm 34diff --git a/Bastille_Curses.pm b/Bastille_Curses.pm
35index 2e1eef4..edbbe45 100644 35index 2e1eef4..a2dfb34 100644
36--- a/Bastille_Curses.pm 36--- a/Bastille_Curses.pm
37+++ b/Bastille_Curses.pm 37+++ b/Bastille_Curses.pm
38@@ -84,7 +84,9 @@ sub do_Bastille { 38@@ -84,7 +84,8 @@ sub do_Bastille {
39 } 39 }
40 40
41 # Output answers to the script and display 41 # Output answers to the script and display
42- &checkAndSaveConfig(&getGlobal('BFILE', "config")); 42- &checkAndSaveConfig(&getGlobal('BFILE', "config"));
43+ #&checkAndSaveConfig(&getGlobal('BFILE', "config"));
44+ 43+
45+ &Run_Bastille_with_Config; 44+ &outputConfig
46 45
47 # Run Bastille 46 # Run Bastille
48 47