[asterisk-bugs] [Asterisk 0010772]: safe_asterisk incorrectly invokes /bin/sh instead of /bin/bash
noreply at bugs.digium.com
noreply at bugs.digium.com
Thu Sep 20 15:42:29 CDT 2007
The following issue has been ASSIGNED.
======================================================================
http://bugs.digium.com/view.php?id=10772
======================================================================
Reported By: culrich
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 10772
Category: Core-General
Reproducibility: always
Severity: major
Priority: normal
Status: assigned
Asterisk Version: 1.4.11
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!): 81744
Disclaimer on File?: N/A
Request Review:
======================================================================
Date Submitted: 09-20-2007 14:14 CDT
Last Modified: 09-20-2007 15:42 CDT
======================================================================
Summary: safe_asterisk incorrectly invokes /bin/sh instead of
/bin/bash
Description:
The /contrib/script/safe_asterisk script invocation line refers to /bin/sh.
/bin/sh should only be invoked for a script that is compatible with the
original Bourne shell, which safe_asterisk is not. It contains shell
language constructs that are valid only in the Bourne Again shell, which is
commonly invoked as /bin/bash.
On most Linux distributions, this is a not a problem since /bin/sh is
usually a symbolic link to /bin/bash. On other systems like FreeBSD and
Ubuntu, /bin/sh is an actual Bourne shell, not /bin/bash. This script fails
on these systems and because shell scripts are notoriously bad at error
reporting, the error message on failure is not helpful at determining the
cause of the failure.
The proper fix to this is to either change the shell invocation line to
invoke /bin/bash or modify the script to conform to Bourne shell syntax.
There may be other shell scripts in the Asterisk distribution with this
issue, but safe_asterisk is the only one that I have noticed thus far.
======================================================================
----------------------------------------------------------------------
svnbot - 09-20-07 15:42
----------------------------------------------------------------------
Repository: asterisk
Revision: 83316
------------------------------------------------------------------------
r83316 | russell | 2007-09-20 15:42:28 -0500 (Thu, 20 Sep 2007) | 3 lines
Change safe_asterisk to explicitly ask for /bin/bash, as it uses bashisms.
(closes issue http://bugs.digium.com/view.php?id=10772, reported by culrich)
------------------------------------------------------------------------
Issue History
Date Modified Username Field Change
======================================================================
09-20-07 15:42 svnbot Note Added: 0070853
09-20-07 15:42 svnbot Status new => assigned
09-20-07 15:42 svnbot Assigned To => russell
======================================================================
More information about the asterisk-bugs
mailing list