From 5ecbaafa4faff3d3fb6dcbcd8f72308ee15dc490 Mon Sep 17 00:00:00 2001 From: mboelen Date: Wed, 25 Mar 2015 16:47:37 +0100 Subject: Use improved function with return values --- include/tests_hardening | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/tests_hardening b/include/tests_hardening index 31308933..055cd4b5 100644 --- a/include/tests_hardening +++ b/include/tests_hardening @@ -53,12 +53,8 @@ if [ ! "${ASBINARY}" = "" ]; then logtext "Test: Check file permissions for as (Assembler)" IsWorldExecutable ${ASBINARY} - if [ ${SYMLINK} -eq 0 ]; then + if [ $? -eq 1 ]; then logtext "Binary: ${ASBINARY} (world executable: ${FileIsWorldExecutable})" - else - logtext "Binary: ${ASBINARY} (symlinked to: ${sFILE}) (world executable: ${FileIsWorldExecutable})" - fi - if [ ${FileIsWorldExecutable} = "TRUE" ]; then AddHP 2 3 HARDEN_COMPILERS_NEEDED=1 else @@ -69,12 +65,8 @@ if [ ! "${GCCBINARY}" = "" ]; then logtext "Test: Check file permissions for GCC compiler" IsWorldExecutable ${GCCBINARY} - if [ ${SYMLINK} -eq 0 ]; then + if [ $? -eq 1 ]; then logtext "Binary: ${GCCBINARY} (world executable: ${FileIsWorldExecutable})" - else - logtext "Binary: ${GCCBINARY} (symlinked to: ${sFILE}) (world executable: ${FileIsWorldExecutable})" - fi - if [ ${FileIsWorldExecutable} = "TRUE" ]; then AddHP 2 3 HARDEN_COMPILERS_NEEDED=1 else -- cgit v1.2.3