Hello community, here is the log from the commit of package lynis for openSUSE:Factory checked in at 2014-12-21 12:04:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lynis (Old) and /work/SRC/openSUSE:Factory/.lynis.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lynis" Changes: -------- --- /work/SRC/openSUSE:Factory/lynis/lynis.changes 2014-09-26 11:21:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.lynis.new/lynis.changes 2014-12-21 12:04:28.000000000 +0100 @@ -1,0 +2,5 @@ +Sun Nov 16 00:39:00 UTC 2014 - Led <led...@gmail.com> + +- fix bashisms in scripts + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ prepare_for_suse.sh ++++++ --- /var/tmp/diff_new_pack.jasXYU/_old 2014-12-21 12:04:30.000000000 +0100 +++ /var/tmp/diff_new_pack.jasXYU/_new 2014-12-21 12:04:30.000000000 +0100 @@ -5,7 +5,7 @@ OSVERS=$(grep VERSION /etc/SuSE-release | sed "s/VERSION = //") OS=$(head -n 1 /etc/SuSE-release | sed "s/[()]//g" | sed "s/ /_/g") -function fileperms() +fileperms() { PERMS=$(grep -E "^PERMISSION_SECURITY=" /etc/sysconfig/security | awk -F'=' '{print $2}' | sed s/\"//g) echo $PERMS @@ -24,7 +24,7 @@ ln -s fileperms.db.$OS db/fileperms.db } -function dbussystem() +dbussystem() { for i in $(ls -1 /usr/share/dbus-*/system-services/*.service /etc/dbus-*/system.d/*.conf 2>/dev/null) do ++++++ tests_file_permissionsDB ++++++ --- /var/tmp/diff_new_pack.jasXYU/_old 2014-12-21 12:04:30.000000000 +0100 +++ /var/tmp/diff_new_pack.jasXYU/_new 2014-12-21 12:04:30.000000000 +0100 @@ -37,7 +37,7 @@ HPBAD=0 for LINE in $(cat $DB) do - ((HPMAX++)) + HPMAX=$(($HPMAX + 1)) FN=$(echo $LINE | cut -d: -f2) PM=$(echo $LINE | cut -d: -f3) UN=$(echo $LINE | cut -d: -f4) @@ -55,8 +55,8 @@ #Display --indent 4 --text "${FN}" --result "NOT FOUND" --color WHITE continue; fi - if ! [ "$STR" == "$STAT" ]; then - ((HPBAD++)) + if [ "$STR" != "$STAT" ]; then + HPBAD=$((HPBAD + 1)) Display --indent 4 --text "${FN}" --result WARNING --color RED else Display --indent 4 --text "${FN}" --result OK --color GREEN ++++++ tests_file_permissions_ww ++++++ --- /var/tmp/diff_new_pack.jasXYU/_old 2014-12-21 12:04:30.000000000 +0100 +++ /var/tmp/diff_new_pack.jasXYU/_new 2014-12-21 12:04:30.000000000 +0100 @@ -35,7 +35,7 @@ find / -xdev \( -type f -o -type d -o -type s -o -type b -type p -o -type c \) -a -perm -0002 -print 2>/dev/null > $TMP for i in $(cat $TMP) do - ((HP--)) + HP=$((HP - 1)) Display --indent 4 --text "${i} is world-writeable" --result WARNING --color RED done # echo "AddHP $HP $HPMAX" ++++++ tests_system_dbus ++++++ --- /var/tmp/diff_new_pack.jasXYU/_old 2014-12-21 12:04:30.000000000 +0100 +++ /var/tmp/diff_new_pack.jasXYU/_new 2014-12-21 12:04:30.000000000 +0100 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ################################################################################# # @@ -55,11 +55,11 @@ FOUND=0 for j in $WHITELIST do - if [ "$DF" == "$j" ]; then FOUND=1; fi + if [ "$DF" = "$j" ]; then FOUND=1; fi done if [ $FOUND -eq 0 ] then - ((HPBAD++)) + HPBAD=$((HPBAD + 1)) PKG=$(rpm -qf "$i") Display --indent 4 --text "Warning: Package $PKG installs an unknown D-BUS autostart/system service: $DF" --result WARNING --color RED fi ++++++ tests_system_proc ++++++ --- /var/tmp/diff_new_pack.jasXYU/_old 2014-12-21 12:04:30.000000000 +0100 +++ /var/tmp/diff_new_pack.jasXYU/_new 2014-12-21 12:04:30.000000000 +0100 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ################################################################################# # @@ -38,7 +38,7 @@ HP=$HPMAX for i in $(cat $TMP2) do - ((HP--)) + HP=$((HP - 1)) PID=$(echo $i | cut -d: -f2) PNAME=$(echo $i | cut -d: -f3) Display --indent 4 --text "${PNAME} [PID ${PID}] runs as user 'nobody'" --result WARNING --color RED ++++++ tests_users_wo_password ++++++ --- /var/tmp/diff_new_pack.jasXYU/_old 2014-12-21 12:04:30.000000000 +0100 +++ /var/tmp/diff_new_pack.jasXYU/_new 2014-12-21 12:04:30.000000000 +0100 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ################################################################################# # @@ -38,7 +38,7 @@ HPBAD=0 for i in $(cat $TMPDIR/userwopwd2) do - ((HPBAD++)) + HPBAD=$((HPBAD + 1)) Display --indent 4 --text "${i} has no password set" --result WARNING --color RED done -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org