[Pkg-voip-commits] [asterisk] 01/02: Refresh patches
tzafrir at debian.org
tzafrir at debian.org
Fri Dec 20 18:52:37 UTC 2013
This is an automated email from the git hooks/post-receive script.
tzafrir pushed a commit to branch wheezy
in repository asterisk.
commit 9851fae6280aa2983e6717bfc32c86f8b2debfa2
Author: Tzafrir Cohen <tzafrir at debian.org>
Date: Fri Dec 20 14:37:19 2013 +0200
Refresh patches
---
debian/patches/AST-2013-007 | 113 ++++++++++++++++--------------------------
debian/patches/ASTERISK-20658 | 13 ++---
2 files changed, 46 insertions(+), 80 deletions(-)
diff --git a/debian/patches/AST-2013-007 b/debian/patches/AST-2013-007
index 3137df0..ac6d7ab 100644
--- a/debian/patches/AST-2013-007
+++ b/debian/patches/AST-2013-007
@@ -33,8 +33,6 @@ Review: http://reviewboard.digium.internal/r/432/
main/tcptls.c | 11 ++
12 files changed, 473 insertions(+), 38 deletions(-)
-diff --git a/README-SERIOUSLY.bestpractices.txt b/README-SERIOUSLY.bestpractices.txt
-index b470fd6..281d0d3 100644
--- a/README-SERIOUSLY.bestpractices.txt
+++ b/README-SERIOUSLY.bestpractices.txt
@@ -26,6 +26,9 @@ Sections
@@ -47,7 +45,7 @@ index b470fd6..281d0d3 100644
----------------
Additional Links
----------------
-@@ -344,3 +347,24 @@ same as the class authorization "system". Good system configuration, such as
+@@ -344,3 +347,24 @@ same as the class authorization "system"
not running Asterisk as root, can prevent serious problems from arising when
allowing external connections to originate calls into Asterisk.
@@ -72,11 +70,9 @@ index b470fd6..281d0d3 100644
+
+For backwards compatibility, live_dangerously defaults to yes, and must be
+explicitly set to no to enable this privilege escalation protection.
-diff --git a/UPGRADE.txt b/UPGRADE.txt
-index c28be5a..408a3fa 100644
--- a/UPGRADE.txt
+++ b/UPGRADE.txt
-@@ -27,6 +27,15 @@ from 1.8.23.0 to 1.8.24.0:
+@@ -18,6 +18,15 @@
===
===========================================================
@@ -92,11 +88,9 @@ index c28be5a..408a3fa 100644
From 1.8.11 to 1.8.12:
* In AEL dialplans, the "h" extension will now be inherited from prior
calling contexts, just as it had in 1.4. If you have created an AEL
-diff --git a/configs/asterisk.conf.sample b/configs/asterisk.conf.sample
-index 618ecea..5fe70e1 100644
--- a/configs/asterisk.conf.sample
+++ b/configs/asterisk.conf.sample
-@@ -73,6 +73,12 @@ documentation_language = en_US ; Set the language you want documentation
+@@ -73,6 +73,12 @@ documentation_language = en_US ; Set the
;lockconfdir = no ; Protect the directory containing the
; configuration files (/etc/asterisk) with a
; lock.
@@ -109,11 +103,9 @@ index 618ecea..5fe70e1 100644
; Changing the following lines may compromise your security.
;[files]
-diff --git a/funcs/func_db.c b/funcs/func_db.c
-index 8bd4d58..282a962 100644
--- a/funcs/func_db.c
+++ b/funcs/func_db.c
-@@ -97,6 +97,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -97,6 +97,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
<para>This function will retrieve a value from the Asterisk database
and then remove that key from the database. <variable>DB_RESULT</variable>
will be set to the key's value if it exists.</para>
@@ -126,7 +118,7 @@ index 8bd4d58..282a962 100644
</description>
<see-also>
<ref type="application">DBdel</ref>
-@@ -243,10 +249,22 @@ static int function_db_delete(struct ast_channel *chan, const char *cmd,
+@@ -243,10 +249,22 @@ static int function_db_delete(struct ast
return 0;
}
@@ -158,11 +150,9 @@ index 8bd4d58..282a962 100644
return res;
}
-diff --git a/funcs/func_env.c b/funcs/func_env.c
-index cbc80e8..7fc1823 100644
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
-@@ -71,6 +71,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -71,6 +71,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
<parameter name="filename" required="true" />
</syntax>
<description>
@@ -174,7 +164,7 @@ index cbc80e8..7fc1823 100644
</description>
</function>
<function name="FILE" language="en_US">
-@@ -167,6 +172,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -167,6 +172,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
<para> Set(FILE(/tmp/foo.txt,-1,,l)=bar)</para>
<para> ; Append "bar" to the file with a newline</para>
<para> Set(FILE(/tmp/foo.txt,,,al)=bar)</para>
@@ -186,7 +176,7 @@ index cbc80e8..7fc1823 100644
</description>
<see-also>
<ref type="function">FILE_COUNT_LINE</ref>
-@@ -197,6 +207,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -197,6 +207,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
</syntax>
<description>
<para>Returns the number of lines, or <literal>-1</literal> on error.</para>
@@ -198,7 +188,7 @@ index cbc80e8..7fc1823 100644
</description>
<see-also>
<ref type="function">FILE</ref>
-@@ -216,6 +231,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -216,6 +231,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
<para>'d' - DOS "\r\n" format</para>
<para>'m' - Macintosh "\r" format</para>
<para>'x' - Cannot be determined</para>
@@ -225,11 +215,9 @@ index cbc80e8..7fc1823 100644
return res;
}
-diff --git a/funcs/func_lock.c b/funcs/func_lock.c
-index 92d5776..40deb20 100644
--- a/funcs/func_lock.c
+++ b/funcs/func_lock.c
-@@ -59,6 +59,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -59,6 +59,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
Returns <literal>1</literal> if the lock was obtained or <literal>0</literal> on error.</para>
<note><para>To avoid the possibility of a deadlock, LOCK will only attempt to
obtain the lock for 3 seconds if the channel already has another lock.</para></note>
@@ -241,7 +229,7 @@ index 92d5776..40deb20 100644
</description>
</function>
<function name="TRYLOCK" language="en_US">
-@@ -72,6 +77,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -72,6 +77,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
<para>Attempts to grab a named lock exclusively, and prevents other channels
from obtaining the same lock. Returns <literal>1</literal> if the lock was
available or <literal>0</literal> otherwise.</para>
@@ -253,7 +241,7 @@ index 92d5776..40deb20 100644
</description>
</function>
<function name="UNLOCK" language="en_US">
-@@ -86,6 +96,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -86,6 +96,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
had a lock or <literal>0</literal> otherwise.</para>
<note><para>It is generally unnecessary to unlock in a hangup routine, as any locks
held are automatically freed when the channel is destroyed.</para></note>
@@ -265,7 +253,7 @@ index 92d5776..40deb20 100644
</description>
</function>
***/
-@@ -502,9 +517,9 @@ static int unload_module(void)
+@@ -497,9 +512,9 @@ static int unload_module(void)
static int load_module(void)
{
@@ -278,10 +266,9 @@ index 92d5776..40deb20 100644
ast_pthread_create_background(&broker_tid, NULL, lock_broker, NULL);
return res;
}
-index 6d7338c..8e0d2c6 100644
--- a/funcs/func_realtime.c
+++ b/funcs/func_realtime.c
-@@ -115,6 +115,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -115,6 +115,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
<description>
<para>This function acts in the same way as REALTIME(....) does, except that
it destroys the matched record in the RT engine.</para>
@@ -294,7 +281,7 @@ index 6d7338c..8e0d2c6 100644
</description>
<see-also>
<ref type="function">REALTIME</ref>
-@@ -439,28 +445,32 @@ static int function_realtime_readdestroy(struct ast_channel *chan, const char *c
+@@ -432,28 +438,32 @@ static int function_realtime_readdestroy
return -1;
}
@@ -304,14 +291,6 @@ index 6d7338c..8e0d2c6 100644
- resultslen += strlen(var->name) + strlen(var->value);
- /* add space for delimiters and final '\0' */
- resultslen += n * (strlen(args.delim1) + strlen(args.delim2)) + 1;
--
-- if (resultslen > len) {
-- /* Unfortunately this does mean that we cannot destroy the row
-- * anymore. But OTOH, we're not destroying someones data without
-- * giving him the chance to look at it. */
-- ast_log(LOG_WARNING, "Failed to fetch/destroy. Realtime data is too large: need %zu, have %zu.\n", resultslen, len);
-- return -1;
-- }
+ if (len > 0) {
+ resultslen = 0;
+ n = 0;
@@ -320,7 +299,14 @@ index 6d7338c..8e0d2c6 100644
+ }
+ /* add space for delimiters and final '\0' */
+ resultslen += n * (strlen(args.delim1) + strlen(args.delim2)) + 1;
-+
+
+- if (resultslen > len) {
+- /* Unfortunately this does mean that we cannot destroy the row
+- * anymore. But OTOH, we're not destroying someones data without
+- * giving him the chance to look at it. */
+- ast_log(LOG_WARNING, "Failed to fetch/destroy. Realtime data is too large: need %zu, have %zu.\n", resultslen, len);
+- return -1;
+- }
+ if (resultslen > len) {
+ /* Unfortunately this does mean that we cannot destroy
+ * the row anymore. But OTOH, we're not destroying
@@ -347,7 +333,7 @@ index 6d7338c..8e0d2c6 100644
ast_destroy_realtime(args.family, args.fieldmatch, args.value, SENTINEL);
ast_variables_destroy(head);
-@@ -471,6 +481,15 @@ static int function_realtime_readdestroy(struct ast_channel *chan, const char *c
+@@ -464,6 +474,15 @@ static int function_realtime_readdestroy
return 0;
}
@@ -363,7 +349,7 @@ index 6d7338c..8e0d2c6 100644
static struct ast_custom_function realtime_function = {
.name = "REALTIME",
.read = function_realtime_read,
-@@ -496,6 +515,7 @@ static struct ast_custom_function realtime_store_function = {
+@@ -489,6 +508,7 @@ static struct ast_custom_function realti
static struct ast_custom_function realtime_destroy_function = {
.name = "REALTIME_DESTROY",
.read = function_realtime_readdestroy,
@@ -371,7 +357,7 @@ index 6d7338c..8e0d2c6 100644
};
static int unload_module(void)
-@@ -514,7 +534,7 @@ static int load_module(void)
+@@ -507,7 +527,7 @@ static int load_module(void)
int res = 0;
res |= ast_custom_function_register(&realtime_function);
res |= ast_custom_function_register(&realtime_store_function);
@@ -380,11 +366,9 @@ index 6d7338c..8e0d2c6 100644
res |= ast_custom_function_register(&realtimefield_function);
res |= ast_custom_function_register(&realtimehash_function);
return res;
-diff --git a/funcs/func_shell.c b/funcs/func_shell.c
-index bad10b3..e403efc 100644
--- a/funcs/func_shell.c
+++ b/funcs/func_shell.c
-@@ -88,12 +88,17 @@ static int shell_helper(struct ast_channel *chan, const char *cmd, char *data,
+@@ -88,12 +88,17 @@ static int shell_helper(struct ast_chann
</syntax>
<description>
<para>Returns the value from a system command</para>
@@ -408,7 +392,7 @@ index bad10b3..e403efc 100644
</description>
</function>
-@@ -109,7 +115,7 @@ static int unload_module(void)
+@@ -110,7 +115,7 @@ static int unload_module(void)
static int load_module(void)
{
@@ -417,11 +401,9 @@ index bad10b3..e403efc 100644
}
AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Returns the output of a shell command");
-diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
-index 52710e8..2531413 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
-@@ -1149,16 +1149,44 @@ struct ast_custom_function* ast_custom_function_find(const char *name);
+@@ -1139,16 +1139,44 @@ struct ast_custom_function* ast_custom_f
int ast_custom_function_unregister(struct ast_custom_function *acf);
/*!
@@ -466,7 +448,7 @@ index 52710e8..2531413 100644
* \brief Retrieve the number of active calls
*/
int ast_active_calls(void);
-@@ -1271,6 +1299,32 @@ unsigned int ast_hashtab_hash_contexts(const void *obj);
+@@ -1261,6 +1289,32 @@ unsigned int ast_hashtab_hash_contexts(c
*/
char *ast_complete_applications(const char *line, const char *word, int state);
@@ -499,11 +481,9 @@ index 52710e8..2531413 100644
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
-diff --git a/main/asterisk.c b/main/asterisk.c
-index fe4088b..c563b70 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
-@@ -3036,6 +3036,8 @@ static void ast_readconfig(void)
+@@ -2959,6 +2959,8 @@ static void ast_readconfig(void)
unsigned int dbdir:1;
unsigned int keydir:1;
} found = { 0, 0 };
@@ -512,7 +492,7 @@ index fe4088b..c563b70 100644
if (ast_opt_override_config) {
cfg = ast_config_load2(ast_config_AST_CONFIG_FILE, "" /* core, can't reload */, config_flags);
-@@ -3245,8 +3247,11 @@ static void ast_readconfig(void)
+@@ -3166,8 +3168,11 @@ static void ast_readconfig(void)
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_HIDE_CONSOLE_CONNECT);
} else if (!strcasecmp(v->name, "lockconfdir")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_LOCK_CONFIG_DIR);
@@ -524,11 +504,9 @@ index fe4088b..c563b70 100644
for (v = ast_variable_browse(cfg, "compat"); v; v = v->next) {
float version;
if (sscanf(v->value, "%30f", &version) != 1) {
-diff --git a/main/pbx.c b/main/pbx.c
-index 996ac25..e370ae7 100644
--- a/main/pbx.c
+++ b/main/pbx.c
-@@ -821,6 +821,17 @@ static struct ast_taskprocessor *device_state_tps;
+@@ -805,6 +805,17 @@ static struct ast_taskprocessor *device_
AST_THREADSTORAGE(switch_data);
AST_THREADSTORAGE(extensionstate_buf);
@@ -546,7 +524,7 @@ index 996ac25..e370ae7 100644
/*!
\brief ast_exten: An extension
-@@ -1175,6 +1186,19 @@ static int totalcalls;
+@@ -1150,6 +1161,19 @@ static int totalcalls;
static AST_RWLIST_HEAD_STATIC(acf_root, ast_custom_function);
@@ -566,7 +544,7 @@ index 996ac25..e370ae7 100644
/*! \brief Declaration of builtin applications */
static struct pbx_builtin {
char name[AST_MAX_APP];
-@@ -3748,6 +3772,7 @@ struct ast_custom_function *ast_custom_function_find(const char *name)
+@@ -3499,6 +3523,7 @@ struct ast_custom_function *ast_custom_f
int ast_custom_function_unregister(struct ast_custom_function *acf)
{
struct ast_custom_function *cur;
@@ -574,7 +552,7 @@ index 996ac25..e370ae7 100644
if (!acf) {
return -1;
-@@ -3764,9 +3789,64 @@ int ast_custom_function_unregister(struct ast_custom_function *acf)
+@@ -3515,9 +3540,64 @@ int ast_custom_function_unregister(struc
}
AST_RWLIST_UNLOCK(&acf_root);
@@ -639,7 +617,7 @@ index 996ac25..e370ae7 100644
/*! \internal
* \brief Retrieve the XML documentation of a specified ast_custom_function,
* and populate ast_custom_function string fields.
-@@ -3868,6 +3948,50 @@ int __ast_custom_function_register(struct ast_custom_function *acf, struct ast_m
+@@ -3619,6 +3699,50 @@ int __ast_custom_function_register(struc
return 0;
}
@@ -690,7 +668,7 @@ index 996ac25..e370ae7 100644
/*! \brief return a pointer to the arguments of the function,
* and terminates the function name with '\\0'
*/
-@@ -3889,6 +4013,124 @@ static char *func_args(char *function)
+@@ -3640,6 +3764,124 @@ static char *func_args(char *function)
return args;
}
@@ -815,7 +793,7 @@ index 996ac25..e370ae7 100644
int ast_func_read(struct ast_channel *chan, const char *function, char *workspace, size_t len)
{
char *copy = ast_strdupa(function);
-@@ -3901,6 +4143,8 @@ int ast_func_read(struct ast_channel *chan, const char *function, char *workspac
+@@ -3652,6 +3894,8 @@ int ast_func_read(struct ast_channel *ch
ast_log(LOG_ERROR, "Function %s not registered\n", copy);
} else if (!acfptr->read && !acfptr->read2) {
ast_log(LOG_ERROR, "Function %s cannot be read\n", copy);
@@ -824,7 +802,7 @@ index 996ac25..e370ae7 100644
} else if (acfptr->read) {
if (acfptr->mod) {
u = __ast_module_user_add(acfptr->mod, chan);
-@@ -3938,6 +4182,8 @@ int ast_func_read2(struct ast_channel *chan, const char *function, struct ast_st
+@@ -3689,6 +3933,8 @@ int ast_func_read2(struct ast_channel *c
ast_log(LOG_ERROR, "Function %s not registered\n", copy);
} else if (!acfptr->read && !acfptr->read2) {
ast_log(LOG_ERROR, "Function %s cannot be read\n", copy);
@@ -833,7 +811,7 @@ index 996ac25..e370ae7 100644
} else {
if (acfptr->mod) {
u = __ast_module_user_add(acfptr->mod, chan);
-@@ -3977,11 +4223,13 @@ int ast_func_write(struct ast_channel *chan, const char *function, const char *v
+@@ -3728,11 +3974,13 @@ int ast_func_write(struct ast_channel *c
char *args = func_args(copy);
struct ast_custom_function *acfptr = ast_custom_function_find(copy);
@@ -850,11 +828,9 @@ index 996ac25..e370ae7 100644
int res;
struct ast_module_user *u = NULL;
if (acfptr->mod)
-diff --git a/main/tcptls.c b/main/tcptls.c
-index c25f63f..32931b9 100644
--- a/main/tcptls.c
+++ b/main/tcptls.c
-@@ -48,6 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+@@ -44,6 +44,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revisi
#include "asterisk/options.h"
#include "asterisk/manager.h"
#include "asterisk/astobj2.h"
@@ -862,7 +838,7 @@ index c25f63f..32931b9 100644
/*! \brief
* replacement read/write functions for SSL support.
-@@ -161,6 +162,16 @@ static void *handle_tcptls_connection(void *data)
+@@ -149,6 +150,16 @@ static void *handle_tcptls_connection(vo
char err[256];
#endif
@@ -879,6 +855,3 @@ index c25f63f..32931b9 100644
/*
* open a FILE * as appropriate.
*/
---
-1.7.10.4
-
diff --git a/debian/patches/ASTERISK-20658 b/debian/patches/ASTERISK-20658
index e0093a3..a0b21c7 100644
--- a/debian/patches/ASTERISK-20658
+++ b/debian/patches/ASTERISK-20658
@@ -24,11 +24,9 @@ patches:
main/config.c | 11 +++++++++++
2 files changed, 28 insertions(+)
-diff --git a/funcs/func_realtime.c b/funcs/func_realtime.c
-index a1b6d20..6d7338c 100644
--- a/funcs/func_realtime.c
+++ b/funcs/func_realtime.c
-@@ -219,6 +219,13 @@ static int function_realtime_read(struct ast_channel *chan, const char *cmd, cha
+@@ -219,6 +219,13 @@ static int function_realtime_read(struct
/* add space for delimiters and final '\0' */
resultslen += n * (strlen(args.delim1) + strlen(args.delim2)) + 1;
@@ -42,7 +40,7 @@ index a1b6d20..6d7338c 100644
out = ast_str_alloca(resultslen);
for (var = head; var; var = var->next)
ast_str_append(&out, 0, "%s%s%s%s", var->name, args.delim2, var->value, args.delim1);
-@@ -439,6 +446,16 @@ static int function_realtime_readdestroy(struct ast_channel *chan, const char *c
+@@ -432,6 +439,16 @@ static int function_realtime_readdestroy
/* add space for delimiters and final '\0' */
resultslen += n * (strlen(args.delim1) + strlen(args.delim2)) + 1;
@@ -59,11 +57,9 @@ index a1b6d20..6d7338c 100644
out = ast_str_alloca(resultslen);
for (var = head; var; var = var->next) {
ast_str_append(&out, 0, "%s%s%s%s", var->name, args.delim2, var->value, args.delim1);
-diff --git a/main/config.c b/main/config.c
-index 4a71c1f..f90cfc1 100644
--- a/main/config.c
+++ b/main/config.c
-@@ -1524,6 +1524,17 @@ static struct ast_config *config_text_file_load(const char *database, const char
+@@ -1514,6 +1514,17 @@ static struct ast_config *config_text_fi
while (!feof(f)) {
lineno++;
if (fgets(buf, sizeof(buf), f)) {
@@ -81,6 +77,3 @@ index 4a71c1f..f90cfc1 100644
if (ast_test_flag(&flags, CONFIG_FLAG_WITHCOMMENTS) && lline_buffer && ast_str_strlen(lline_buffer)) {
CB_ADD(&comment_buffer, ast_str_buffer(lline_buffer)); /* add the current lline buffer to the comment buffer */
ast_str_reset(lline_buffer); /* erase the lline buffer */
---
-1.7.10.4
-
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git
More information about the Pkg-voip-commits
mailing list