pbx.c: Allow dangerous functions when adding a hint to dialplan.

We can allow dangerous functions when adding a hint since altering
dialplan is itself a privileged activity.  Otherwise, we could never
execute dangerous functions.

ASTERISK-25996 #close
Reported by: Andrew Nagy

Change-Id: I4929ff100ad1200a0198262d069a34f2296e77ba
This commit is contained in:
Richard Mudgett
2016-07-27 17:17:53 -05:00
parent 7883f128d5
commit 873fc0fda5
3 changed files with 41 additions and 2 deletions

View File

@@ -1598,6 +1598,18 @@ void pbx_live_dangerously(int new_live_dangerously);
*/
int ast_thread_inhibit_escalations(void);
/*!
* \brief Swap the current thread escalation inhibit setting.
* \since 11.24.0
*
* \param inhibit New setting. Non-zero to inhibit.
*
* \retval 1 if dangerous function execution was inhibited.
* \retval 0 if dangerous function execution was allowed.
* \retval -1 on error.
*/
int ast_thread_inhibit_escalations_swap(int inhibit);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif