mirror of
https://git.yoctoproject.org/meta-security
synced 2026-01-11 15:00:34 +00:00
Solved bastille config saving issue
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
This commit is contained in:
@@ -3,10 +3,11 @@ DESCRIPTION = "Bastille Linux is a Hardening and Reporting/Auditing Program whic
|
||||
LICENSE = "GPLv2"
|
||||
LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b"
|
||||
# Bash is needed for set +o privileged (check busybox), might also need ncurses
|
||||
DEPENDS = "virtual/kernel"
|
||||
RDEPENDS_${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"
|
||||
FILES_${PN} += "/run/lock/subsys/bastille"
|
||||
|
||||
inherit allarch
|
||||
inherit allarch module-base
|
||||
|
||||
SRC_URI = "http://sourceforge.net/projects/bastille-linux/files/bastille-linux/3.2.1/Bastille-3.2.1.tar.bz2 \
|
||||
file://AccountPermission.pm \
|
||||
@@ -17,7 +18,7 @@ SRC_URI = "http://sourceforge.net/projects/bastille-linux/files/bastille-linux/3
|
||||
file://config \
|
||||
file://fix_version_parse.patch \
|
||||
file://yocto-standard-patch.patch \
|
||||
file://Curses-and-IOLoader-changes.patch \
|
||||
file://0001-Curses-and-IOLoader-changes.patch \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "df803f7e38085aa5da79f85d0539f91b"
|
||||
@@ -128,13 +129,14 @@ do_install () {
|
||||
install -m 0644 OSMap/HP-UX.service ${D}${datadir}/Bastille/OSMap
|
||||
install -m 0644 OSMap/OSX.bastille ${D}${datadir}/Bastille/OSMap
|
||||
install -m 0644 OSMap/OSX.system ${D}${datadir}/Bastille/OSMap
|
||||
install -m 0644 ${WORKDIR}/config ${D}${sysconfdir}/Bastille/config
|
||||
install -m 0777 ${WORKDIR}/config ${D}${sysconfdir}/Bastille/config
|
||||
|
||||
for file in `cat Modules.txt` ; do
|
||||
install -m 0644 Questions/$file.txt ${D}${datadir}/Bastille/Questions
|
||||
done
|
||||
|
||||
ln -s ${D}${sbindir}/RevertBastille ${D}${sbindir}/UndoBastille
|
||||
sed -i 's/3.8.11-yocto-standard/${KERNEL_VERSION}/g' ${D}${libdir}/Bastille/API.pm
|
||||
}
|
||||
|
||||
FILES_${PN} += "${datadir}/Bastille ${libdir}/Bastille ${libdir}/perl* ${sysconfdir}/*"
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
From 456daee3ce57d3a46bf9ccf0a85ec4880ca5b262 Mon Sep 17 00:00:00 2001
|
||||
From afa9a32db7f9423b45e0cff898a868de05ad3dee Mon Sep 17 00:00:00 2001
|
||||
From: Andrei Dinu <andrei.adrianx.dinu@intel.com>
|
||||
Date: Tue, 4 Jun 2013 14:56:21 +0300
|
||||
Date: Tue, 30 Jul 2013 12:05:39 +0300
|
||||
Subject: [PATCH] Curses and IOLoader changes
|
||||
|
||||
The linux distribution couldn't be identified when
|
||||
running Bastille, and the question pruning method
|
||||
couldn't get a match on the questions relevant to
|
||||
the repo, so it eliminated all quetions.
|
||||
the repo, so it eliminated all questions.
|
||||
|
||||
After answering the questions the checkAndSaveConfig routine
|
||||
was called which was missing. Replaced it with Run_Bastille_
|
||||
with_Config which exists.
|
||||
was called which was missing. Replaced it with outputConfig
|
||||
which exists.
|
||||
|
||||
Signed-off-by: Andrei Dinu <andrei.adrianx.dinu@intel.com>
|
||||
---
|
||||
Bastille/IOLoader.pm | 2 +-
|
||||
Bastille_Curses.pm | 4 +++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
Bastille_Curses.pm | 3 ++-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Bastille/IOLoader.pm b/Bastille/IOLoader.pm
|
||||
index abb94d7..995d2c2 100644
|
||||
@@ -32,17 +32,16 @@ index abb94d7..995d2c2 100644
|
||||
&B_log("DEBUG","Load Questions, first question: $first_question");
|
||||
&validate_questions();
|
||||
diff --git a/Bastille_Curses.pm b/Bastille_Curses.pm
|
||||
index 2e1eef4..edbbe45 100644
|
||||
index 2e1eef4..a2dfb34 100644
|
||||
--- a/Bastille_Curses.pm
|
||||
+++ b/Bastille_Curses.pm
|
||||
@@ -84,7 +84,9 @@ sub do_Bastille {
|
||||
@@ -84,7 +84,8 @@ sub do_Bastille {
|
||||
}
|
||||
|
||||
# Output answers to the script and display
|
||||
- &checkAndSaveConfig(&getGlobal('BFILE', "config"));
|
||||
+ #&checkAndSaveConfig(&getGlobal('BFILE', "config"));
|
||||
+
|
||||
+ &Run_Bastille_with_Config;
|
||||
+ &outputConfig
|
||||
|
||||
# Run Bastille
|
||||
|
||||
|
||||
Reference in New Issue
Block a user