[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:53:27 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:53 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).
======================================================================
----------------------------------------------------------------------
(0128016) wdoekes (reporter) - 2010-10-14 07:53
https://issues.asterisk.org/view.php?id=18134#c128016
----------------------------------------------------------------------
> ast_log is used on certain other places even in this function so i dont
think this could be a problem.
Well actually. Above that line it says: """/* Careful with order! Logging
cannot happen after we close FDs */"""
And you're doing logging after closing the FD's.
I'm with davidw here. You're missing the +x check. You miss dependency
checks. And you introduce a rather redundant fopen/fclose for every
System() call.
If you really want to do this, I'd go with either checking at
load(app_system.so)-time or after a failed execl call (do _exit(99) or some
other unlikely return value and check for that).
Issue History
Date Modified Username Field Change
======================================================================
2010-10-14 07:53 wdoekes Note Added: 0128016
======================================================================
More information about the asterisk-bugs
mailing list