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

openvas-bugs@wald.intevation.org openvas-bugs at wald.intevation.org
Wed Sep 23 16:32:59 CEST 2009


Bugs item #1122, was opened at 2009-09-23 14:32
Status: Open
Priority: 3
Submitted By: Jan Wagner (waja)
Assigned to: Nobody (None)
Summary: tools/openvas-ssh-client-rpm-creator.sh is full of bashism 
Architecture: None
Resolution: None
Severity: normal
Version: v2.0.5
Component: openvas-client
Operating System: All
Product: OpenVAS
Hardware: None
URL: 


Initial Comment:
$ 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.

----------------------------------------------------------------------

You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=220&aid=1122&group_id=29


More information about the Openvas-devel mailing list