mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-12 21:09:00 +00:00
ARI - channel recording support
This patch is the first step in adding recording support to the Asterisk REST Interface. Recordings are stored in /var/spool/recording. Since recordings may be destructive (overwriting existing files), the API rejects attempts to escape the recording directory (avoiding issues if someone attempts to record to ../../lib/sounds/greeting, for example). (closes issue ASTERISK-21594) (closes issue ASTERISK-21581) Review: https://reviewboard.asterisk.org/r/2612/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -718,6 +718,19 @@ void ast_enable_packet_fragmentation(int sock);
|
||||
*/
|
||||
int ast_mkdir(const char *path, int mode);
|
||||
|
||||
/*!
|
||||
* \brief Recursively create directory path, but only if it resolves within
|
||||
* the given \a base_path.
|
||||
*
|
||||
* If \a base_path does not exist, it will not be created and this function
|
||||
* returns \c EPERM.
|
||||
*
|
||||
* \param path The directory path to create
|
||||
* \param mode The permissions with which to try to create the directory
|
||||
* \return 0 on success or an error code otherwise
|
||||
*/
|
||||
int ast_safe_mkdir(const char *base_path, const char *path, int mode);
|
||||
|
||||
#define ARRAY_LEN(a) (size_t) (sizeof(a) / sizeof(0[a]))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user