Home
My Page
Projects
OpenVAS

[#1122] tools/openvas-ssh-client-rpm-creator.sh is full of bashism

Date:
2009-09-23 14:32
Priority:
3
State:
Open
Submitted by:
Jan Wagner (waja)
Assigned to:
Nobody (None)
Architecture:
None
Product:
OpenVAS
Operating System:
All
Component:
openvas-manager
Version:
2.0.5
Severity:
normal
Resolution:
Accepted As Bug
Hardware:
None
URL:
 
Summary:
tools/openvas-ssh-client-rpm-creator.sh is full of bashism

Detailed description
$ checkbashisms tools/openvas-ssh-client-rpm-creator.sh

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 16 (type):

if type printf > /dev/null; then

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 88 (type):

MD5_PATH=`exec <&- 2>&-; which md5sum || type md5sum`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 89 (type):

test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which md5 || type md5`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 90 (type):

test -x "$MD5_PATH" || MD5_PATH=`exec <&- 2>&-; which digest || type digest`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 137 (kill -[0-9] or -[A-Z]):

tar $1vf - 2>&1 || { echo Extraction failed. > /dev/tty; kill -15 $$; }

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 279 ($RANDOM):

tmpdir=$TMPROOT/makeself.$RANDOM.`date +"%y%m%d%H%M%S"`.$$

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 304 (type):

if type $a >/dev/null 2>&1; then

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 328 ($RANDOM):

tmpdir="$TMPROOT/selfgz$$$RANDOM"

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 356 (trap with signal numbers):

trap 'echo Signal caught, cleaning up >&2; cd $TMPROOT; /bin/rm -rf $tmpdir; eval $finish; exit 15' 1 2 3 15

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 478 (should be 'b = a'):

if [ $# == 1 ];

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 710 (type):

if type gzip 2>&1 > /dev/null; then

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 952 (type):

MD5_PATH=`exec <&- 2>&-; which md5sum || type md5sum`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 953 (type):

test -x $MD5_PATH || MD5_PATH=`exec <&- 2>&-; which md5 || type md5`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 954 (type):

test -x $MD5_PATH || MD5_PATH=`exec <&- 2>&-; which digest || type digest`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 1818 (type):

under certain conditions; type `show c' for details.

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 2389 (type):

if type gzip 2>&1 > /dev/null; then

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 2631 (type):

MD5_PATH=`exec <&- 2>&-; which md5sum || type md5sum`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 2632 (type):

test -x $MD5_PATH || MD5_PATH=`exec <&- 2>&-; which md5 || type md5`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 2633 (type):

test -x $MD5_PATH || MD5_PATH=`exec <&- 2>&-; which digest || type digest`

possible bashism in tools/openvas-ssh-client-rpm-creator.sh line 3497 (type):

under certain conditions; type `show c' for details.



Beside the 2 false positive, there is a patch attached against openvas-ssh-client-rpm-creator.sh which is fixing that.

As bonus a patch against openvas-lsc-target-preparation is included.

Followup

Message
Date: 2014-11-10 09:12
Sender: BenoƮt Allard

This script doesn't pass the "bash -n" syntax check.
Date: 2010-02-09 07:34
Sender: Felix Wolfsteller

Some bashisms were fixed. However, the situation is complicated, because the script is generated with makeself. The author was contacted and a patch for makeself was supplied by somebody (Jan Wagner, I think) from the community. Unfortunately, there was no response.

I'd suppose to close this issue. Its half fixed and some effort was spent in putting things in order.
Date: 2010-02-08 18:29
Sender: Geoff Galitz

Assigned to Felix because he was working on it earlier. If this should be bounced back, just let me know.

-geoff
Date: 2009-12-16 09:49
Sender: Geoff Galitz


Is this bug resolved for you, or is futher action necessary?

Changes:

Field Old Value Date By
ResolutionWon't Fix2014-11-10 09:12benallard
Componentopenvas-client2014-11-10 09:12benallard
assigned_tofelix2014-11-10 09:12benallard
ResolutionNone2010-02-09 07:34felix
assigned_tonone2010-02-08 18:29geoff
File Added354: openvas-lsc-target-preparation_bashism_fix.diff2009-09-23 14:32waja
File Added353: bashism.diff2009-09-23 14:32waja

This site is hosted by Intevation GmbH