Hi Michael!!, How are you?. El dom, 27-09-2009 a las 15:51 +0200, M. Boelen escribió: > Hi Francisco, > > I tried to test this issue with my Ubuntu setup. By default /bin/sh is > linked to /bin/dash. However, no issues under Ubuntu.
In Ubuntu /bin/sh is linked to /bin/dash, so if you execute: ubu...@ubuntu:~$ sh $ echo -e "Hello" -e Hello $ But, If you execute: ubu...@ubuntu:~$ sh $ /bin/echo -e "Hello" Hello $ This way Lynis works fine in Ubuntu, but it fails in Debian because the Display function in include/functions execute: case ${OS} in "MacOS") ECHOCMD="echo" ;; "Solaris") ECHOCMD="echo" ;; "Linux") case ${LINUX_VERSION} in "Ubuntu") ECHOCMD="/bin/echo -e" ;; *) ECHOCMD="echo -e" ;; esac .... The problem will be fixed changing 'ECHOCMD="echo -e" ;;' by 'ECHOCMD="/bin/echo -e" ;;'. Or apply the bit complex patch attached in diff file (probably unneeded). Or maybe just removing the LINUX_VERSION check (beware with other distributions). Please, patch it as you prefer in the next lynis release, or I could patch it provisionally in Debian. Thank you for your work. Best regards, Francisco. > > > Francisco García wrote: > > Hello Michael, > > > > There is another bug filed against Lynis Debian package [1], > > > > I looks like a problem with dash shell. When /bin/sh links > > to /bin/dash. > > > > Dash shell doesn't understand "-e" option in "echo -e .." command. > > I think it could be fixed detecting this in include/functions file, > > in Dysplay function. > > > > Anyway, could be possible to fix it next releases? > > > > Thanks, > > > > Best regards, > > Francisco. > > > > > > [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=523432 > > > -- Francisco M. García Claramonte <franciscomanuel.gar...@hispalinux.es> Debian GNU/Linux Developer <franci...@debian.org> GPG: public key ID 556ABA51
diff -ru lynis-1.2.6.orig/include/functions lynis-1.2.6/include/functions --- lynis-1.2.6.orig/include/functions 2009-09-28 23:16:24.000000000 +0200 +++ lynis-1.2.6/include/functions 2009-09-28 23:18:11.000000000 +0200 @@ -84,14 +84,16 @@ { INDENT=0; TEXT=""; RESULT=""; COLOR="" # Set correct echo parameters - case ${OS} in - "MacOS") ECHOCMD="echo" ;; - "Solaris") ECHOCMD="echo" ;; - "Linux") - case ${LINUX_VERSION} in - "Ubuntu") ECHOCMD="/bin/echo -e" ;; - *) ECHOCMD="echo -e" ;; - esac + SH_VERSION=`ls -l /bin/sh | cut -d ">" -f 2` + case ${OS} in + "MacOS") ECHOCMD="echo" ;; + "Solaris") ECHOCMD="echo" ;; + "Linux") + case ${SH_VERSION} in + " bash") ECHOCMD="echo -e" ;; + " dash") ECHOCMD="echo" ;; + *) ECHOCMD="echo -e" ;; + esac ;; *) ECHOCMD="echo -e" ;; esac
signature.asc
Description: Esta parte del mensaje está firmada digitalmente