[asterisk-bugs] [Asterisk 0010812]: safe_asterisk includes bashisms

Asterisk Bug Tracker noreply at bugs.digium.com
Sat May 23 10:42:36 CDT 2009


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=10812 
====================================================================== 
Reported By:                paravoid
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10812
Category:                   Utilities/General
Reproducibility:            always
Severity:                   trivial
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.11  
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2007-09-24 01:39 CDT
Last Modified:              2009-05-23 10:42 CDT
====================================================================== 
Summary:                    safe_asterisk includes bashisms
Description: 
contrib/scripts/safe_asterisk includes so-called bashims, i.e. shell
features that can only be found on bash and not on the POSIX definition of
shell.

However, the intepreter of that file is /bin/sh which is not guaranteed to
be bash.

Either the bashisms should get removed or the interpreter should be
changed to /bin/bash.
On Debian, we've done the latter, for obvious reasons.
====================================================================== 

---------------------------------------------------------------------- 
 (0105350) tzafrir (manager) - 2009-05-23 10:42
 https://issues.asterisk.org/view.php?id=10812#c105350 
---------------------------------------------------------------------- 
Apparently the issue was not fixed - the interpreter is still /bin/sh .
However most bashism issues seem simple to resolve. A patch is attached.

The script checkbashism (on Debian / Ubuntu: part of devscripts) still
complains about the usage of ulimit, but I'm not sure about the usage of
ulimit, which is not guaranteed by the standard, from what I understand.
However it seems to be supported by dash and busybox ash, and I can't think
of a simple workaround right not. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-05-23 10:42 tzafrir        Note Added: 0105350                          
2009-05-23 10:42 tzafrir        Status                   closed => new       
2009-05-23 10:42 tzafrir        Resolution               fixed => reopened   
======================================================================




More information about the asterisk-bugs mailing list