[asterisk-bugs] [Asterisk 0018134]: Missing error message from System() app, if sh binary is missing

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Oct 14 07:47:11 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18134 
====================================================================== 
Reported By:                Bernd
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18134
Category:                   Applications/app_system
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           1.6.2.13 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-10-13 10:09 CDT
Last Modified:              2010-10-14 07:47 CDT
====================================================================== 
Summary:                    Missing error message from System() app, if sh
binary is missing
Description: 
Asterisk was run in a change root using chroot. The System() calls from the
dialplan ended with $SYSTEMSTATUS = APPERROR. No error message about a
missing sh binary was given, making it hard to debug the error.
This problem should appear not only when using chroot, but everytime the
sh binary could not be found (for some reason).
====================================================================== 

---------------------------------------------------------------------- 
 (0128015) davidw (reporter) - 2010-10-14 07:47
 https://issues.asterisk.org/view.php?id=18134#c128015 
---------------------------------------------------------------------- 
There is one other place where it is run in the wrong process (unless
called indirectly).  Only the bit between the fork and the else matters.

This code will fail if you run non-root, on many non-Linux systems, and
will also fail if /bin/sh is not executable.

It will also fail if any dependency of /bin/sh is missing, e.g. on our
system, these would include:

        linux-gate.so.1 =>  (0x00bdc000)
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x047d1000)
        libdl.so.2 => /lib/libdl.so.2 (0x00cf5000)
        libc.so.6 => /lib/libc.so.6 (0x00110000)
        /lib/ld-linux.so.2 (0x00b69000)

(These are probably dependencies of asterisk, so if the chroot is outside
of asterisk, you may get away with it.) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-10-14 07:47 davidw         Note Added: 0128015                          
======================================================================




More information about the asterisk-bugs mailing list