rpms/asterisk/F-9 0011-Merged-revisions-123952-via-svnmerge-from.patch, NONE, 1.1 0012-Merged-revisions-132778-via-svnmerge-from.patch, NONE, 1.1 .cvsignore, 1.14, 1.15 asterisk.spec, 1.26, 1.27
Jeffrey C. Ollie (jcollie)
fedora-extras-commits at redhat.com
Fri Jul 25 21:00:38 UTC 2008
- Previous message (by thread): rpms/anaconda/devel .cvsignore, 1.552, 1.553 anaconda.spec, 1.694, 1.695 sources, 1.686, 1.687
- Next message (by thread): rpms/intltool/devel .cvsignore, 1.26, 1.27 intltool.spec, 1.46, 1.47 sources, 1.26, 1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jcollie
Update of /cvs/pkgs/rpms/asterisk/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25077
Modified Files:
.cvsignore asterisk.spec
Added Files:
0011-Merged-revisions-123952-via-svnmerge-from.patch
0012-Merged-revisions-132778-via-svnmerge-from.patch
Log Message:
* Fri Jul 25 2008 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.0-0.19.beta9
- Add patch pulled from upstream SVN that fixes AST-2008-010 and AST-2008-011.
0011-Merged-revisions-123952-via-svnmerge-from.patch:
--- NEW FILE 0011-Merged-revisions-123952-via-svnmerge-from.patch ---
>From 5931413c9269ef3fca3444a2c10865860f907758 Mon Sep 17 00:00:00 2001
From: tilghman <tilghman at 614ede4d-c843-0410-af14-a771ab80d22e>
Date: Thu, 19 Jun 2008 17:23:22 +0000
Subject: [PATCH] Merged revisions 123952 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r123952 | tilghman | 2008-06-19 12:22:27 -0500 (Thu, 19 Jun 2008) | 6 lines
Don't change pointers that need to be later passed back for deallocation.
(closes issue #12572)
Reported by: flyn
Patches:
20080613__bug12572.diff.txt uploaded by Corydon76 (license 14)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@123958 614ede4d-c843-0410-af14-a771ab80d22e
---
res/res_config_ldap.c | 85 +++++++++++++++++++++++++-----------------------
1 files changed, 44 insertions(+), 41 deletions(-)
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index 7ce37c6..01050ca 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -282,33 +282,36 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
values = ldap_get_values_len(ldapConn, ldap_entry, ldap_attribute_name); /* these are freed at the end */
if (values) {
- struct berval **v = values;
+ struct berval **v;
+ char *valptr;
- while (*v) {
+ for (v = values; *v; v++) {
value = *v;
- ast_debug(2, "LINE(%d) attribute_name: %s LDAP value: %s\n", __LINE__, attribute_name, value->bv_val);
+ valptr = value->bv_val;
+ ast_debug(2, "LINE(%d) attribute_name: %s LDAP value: %s\n", __LINE__, attribute_name, valptr);
if (is_realmed_password_attribute) {
- if (!strncasecmp(value->bv_val, "{md5}", 5))
- value->bv_val += 5;
- else
- value->bv_val = NULL;
- ast_debug(2, "md5: %s\n", value->bv_val);
+ if (!strncasecmp(valptr, "{md5}", 5)) {
+ valptr += 5;
+ } else {
+ valptr = NULL;
+ }
+ ast_debug(2, "md5: %s\n", valptr);
}
- if (value->bv_val) {
+ if (valptr) {
/* ok, so looping through all delimited values except the last one (not, last character is not delimited...) */
if (is_delimited) {
i = 0;
pos = 0;
- while (!ast_strlen_zero(value->bv_val + i)) {
- if (value->bv_val[i] == ';'){
- value->bv_val[i] = '\0';
+ while (!ast_strlen_zero(valptr + i)) {
+ if (valptr[i] == ';'){
+ valptr[i] = '\0';
if (prev) {
- prev->next = ast_variable_new(attribute_name, &value->bv_val[pos], table_config->table_name);
+ prev->next = ast_variable_new(attribute_name, &valptr[pos], table_config->table_name);
if (prev->next) {
prev = prev->next;
}
} else {
- prev = var = ast_variable_new(attribute_name, &value->bv_val[pos], table_config->table_name);
+ prev = var = ast_variable_new(attribute_name, &valptr[pos], table_config->table_name);
}
pos = i + 1;
}
@@ -317,15 +320,14 @@ static struct ast_variable *realtime_ldap_entry_to_var(struct ldap_table_config
}
/* for the last delimited value or if the value is not delimited: */
if (prev) {
- prev->next = ast_variable_new(attribute_name, &value->bv_val[pos], table_config->table_name);
+ prev->next = ast_variable_new(attribute_name, &valptr[pos], table_config->table_name);
if (prev->next) {
prev = prev->next;
}
} else {
- prev = var = ast_variable_new(attribute_name, &value->bv_val[pos], table_config->table_name);
+ prev = var = ast_variable_new(attribute_name, &valptr[pos], table_config->table_name);
}
}
- v++;
}
ldap_value_free_len(values);
}
@@ -400,23 +402,26 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
values = ldap_get_values_len(ldapConn, ldap_entry, ldap_attribute_name);
if (values) {
- struct berval **v = values;
+ struct berval **v;
+ char *valptr;
- while (*v) {
+ for (v = values; *v; v++) {
value = *v;
+ valptr = value->bv_val;
if (is_realmed_password_attribute) {
- if (strncasecmp(value->bv_val, "{md5}", 5) == 0)
- value->bv_val += 5;
- else
- value->bv_val = NULL;
- ast_debug(2, "md5: %s\n", value->bv_val);
+ if (strncasecmp(valptr, "{md5}", 5) == 0) {
+ valptr += 5;
+ } else {
+ valptr = NULL;
+ }
+ ast_debug(2, "md5: %s\n", valptr);
}
- if (value->bv_val) {
+ if (valptr) {
if (delim_value == NULL
&& !is_realmed_password_attribute
&& (static_table_config != table_config || strcmp(attribute_name, "variable_value") == 0)) {
- delim_value = ast_strdup(value->bv_val);
+ delim_value = ast_strdup(valptr);
if ((delim_tot_count = semicolon_count_str(delim_value)) > 0) {
ast_debug(4, "LINE(%d) is delimited %d times: %s\n", __LINE__, delim_tot_count, delim_value);
@@ -426,11 +431,10 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
if (is_delimited != 0
&& !is_realmed_password_attribute
- && (static_table_config != table_config || strcmp(attribute_name, "variable_value") == 0) ){
+ && (static_table_config != table_config || strcmp(attribute_name, "variable_value") == 0) ) {
/* for non-Static RealTime, first */
- i = pos;
- while (!ast_strlen_zero(value->bv_val + i)) {
+ for (i = pos; !ast_strlen_zero(valptr + i); i++) {
ast_debug(4, "LINE(%d) DELIM pos: %d i: %d\n", __LINE__, pos, i);
if (delim_value[i] == ';') {
delim_value[i] = '\0';
@@ -451,9 +455,8 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
break;
}
}
- i++;
}
- if (ast_strlen_zero(value->bv_val + i)) {
+ if (ast_strlen_zero(valptr + i)) {
ast_debug(4, "LINE(%d) DELIM pos: %d i: %d delim_count: %d\n", __LINE__, pos, i, delim_count);
/* Last delimited value */
ast_debug(4, "LINE(%d) DELIM - attribute_name: %s value: %s pos: %d\n", __LINE__, attribute_name, &delim_value[pos], pos);
@@ -468,9 +471,9 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
/* Remembering to free memory */
is_delimited = 0;
pos = 0;
- free(delim_value);
- delim_value = NULL;
}
+ free(delim_value);
+ delim_value = NULL;
ast_debug(4, "LINE(%d) DELIM pos: %d i: %d\n", __LINE__, pos, i);
} else {
@@ -479,20 +482,19 @@ static struct ast_variable **realtime_ldap_result_to_vars(struct ldap_table_conf
free(delim_value);
delim_value = NULL;
}
- ast_debug(2, "LINE(%d) attribute_name: %s value: %s\n", __LINE__, attribute_name, value->bv_val);
+ ast_debug(2, "LINE(%d) attribute_name: %s value: %s\n", __LINE__, attribute_name, valptr);
if (prev) {
- prev->next = ast_variable_new(attribute_name, value->bv_val, table_config->table_name);
+ prev->next = ast_variable_new(attribute_name, valptr, table_config->table_name);
if (prev->next) {
prev = prev->next;
}
} else {
- prev = var = ast_variable_new(attribute_name, value->bv_val, table_config->table_name);
+ prev = var = ast_variable_new(attribute_name, valptr, table_config->table_name);
}
}
}
- v++;
- } /*!< while(*v) */
+ } /*!< for (v = values; *v; v++) */
ldap_value_free_len(values);
}/*!< if (values) */
ldap_attribute_name = ldap_next_attribute(ldapConn, ldap_entry, ber);
@@ -1459,10 +1461,11 @@ int parse_config(void)
static_table_config = table_config;
}
for (; var; var = var->next) {
- if (!strcasecmp(var->name, "additionalFilter"))
- table_config->additional_filter = strdup(var->value);
- else
+ if (!strcasecmp(var->name, "additionalFilter")) {
+ table_config->additional_filter = ast_strdup(var->value);
+ } else {
ldap_table_config_add_attribute(table_config, var->name, var->value);
+ }
}
}
}
--
1.5.5.2
0012-Merged-revisions-132778-via-svnmerge-from.patch:
--- NEW FILE 0012-Merged-revisions-132778-via-svnmerge-from.patch ---
>From 6c1b2ef859c2ad25a42b62d731d398c77fc3bb71 Mon Sep 17 00:00:00 2001
From: tilghman <tilghman at 614ede4d-c843-0410-af14-a771ab80d22e>
Date: Tue, 22 Jul 2008 21:55:06 +0000
Subject: [PATCH] Merged revisions 132778 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r132778 | tilghman | 2008-07-22 16:53:40 -0500 (Tue, 22 Jul 2008) | 18 lines
Merged revisions 132713 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
................
r132713 | tilghman | 2008-07-22 16:19:39 -0500 (Tue, 22 Jul 2008) | 10 lines
Merged revisions 132711 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r132711 | tilghman | 2008-07-22 16:14:10 -0500 (Tue, 22 Jul 2008) | 2 lines
Fixes for AST-2008-010 and AST-2008-011
........
................
................
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@132780 614ede4d-c843-0410-af14-a771ab80d22e
---
channels/chan_iax2.c | 31 +++++++++++++++++++++++++++++--
configs/iax.conf.sample | 10 ++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index de1b450..055aa17 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -278,6 +278,7 @@ enum iax2_flags {
IAX_DELAYPBXSTART = (1 << 25), /*!< Don't start a PBX on the channel until the peer sends us a
response, so that we've achieved a three-way handshake with
them before sending voice or anything else*/
+ IAX_ALLOWFWDOWNLOAD = (1 << 26), /*!< Allow the FWDOWNL command? */
};
static int global_rtautoclear = 120;
@@ -1701,10 +1702,10 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s
snprintf(host, sizeof(host), "%s:%d", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
now = ast_tvnow();
- start = 1 + (ast_random() % (TRUNK_CALL_START - 1));
+ start = 2 + (ast_random() % (TRUNK_CALL_START - 1));
for (x = start; 1; x++) {
if (x == TRUNK_CALL_START) {
- x = 0;
+ x = 1;
continue;
}
@@ -3447,6 +3448,15 @@ struct parsed_dial_string {
char *options;
};
+static int send_apathetic_reply(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int command, int ts, unsigned char seqno)
+{
+ struct ast_iax2_full_hdr f = { .scallno = htons(0x8000 | callno), .dcallno = htons(dcallno),
+ .ts = htonl(ts), .iseqno = seqno, .oseqno = seqno, .type = AST_FRAME_IAX,
+ .csub = compress_subclass(command) };
+
+ return sendto(defaultsockfd, &f, sizeof(f), 0, (struct sockaddr *)sin, sizeof(*sin));
+}
+
/*!
* \brief Parses an IAX dial string into its component parts.
* \param data the string to be parsed
@@ -7990,6 +8000,17 @@ static int socket_process(struct iax2_thread *thread)
} else {
f.subclass = uncompress_subclass(fh->csub);
}
+
+ /* Deal with POKE/PONG without allocating a callno */
+ if (f.frametype == AST_FRAME_IAX && f.subclass == IAX_COMMAND_POKE) {
+ /* Reply back with a PONG, but don't care about the result. */
+ send_apathetic_reply(1, ntohs(fh->scallno), &sin, IAX_COMMAND_PONG, ntohs(fh->ts), fh->oseqno);
+ return 1;
+ } else if (f.frametype == AST_FRAME_IAX && f.subclass == IAX_COMMAND_ACK && dcallno == 1) {
+ /* Ignore */
+ return 1;
+ }
+
if ((f.frametype == AST_FRAME_IAX) && ((f.subclass == IAX_COMMAND_NEW) || (f.subclass == IAX_COMMAND_REGREQ) ||
(f.subclass == IAX_COMMAND_POKE) || (f.subclass == IAX_COMMAND_FWDOWNL) ||
(f.subclass == IAX_COMMAND_REGREL)))
@@ -9305,6 +9326,10 @@ retryowner2:
break;
case IAX_COMMAND_FWDOWNL:
/* Firmware download */
+ if (!ast_test_flag(&globalflags, IAX_ALLOWFWDOWNLOAD)) {
+ send_command_final(iaxs[fr->callno], AST_FRAME_IAX, IAX_COMMAND_UNSUPPORT, 0, NULL, 0, -1);
+ break;
+ }
memset(&ied0, 0, sizeof(ied0));
res = iax_firmware_append(&ied0, (unsigned char *)ies.devicetype, ies.fwdesc);
if (res < 0)
@@ -10964,6 +10989,8 @@ static int set_config(char *config_file, int reload)
ast_set2_flag((&globalflags), ast_true(v->value), IAX_FORCEJITTERBUF);
else if (!strcasecmp(v->name, "delayreject"))
delayreject = ast_true(v->value);
+ else if (!strcasecmp(v->name, "allowfwdownload"))
+ ast_set2_flag((&globalflags), ast_true(v->value), IAX_ALLOWFWDOWNLOAD);
else if (!strcasecmp(v->name, "rtcachefriends"))
ast_set2_flag((&globalflags), ast_true(v->value), IAX_RTCACHEFRIENDS);
else if (!strcasecmp(v->name, "rtignoreregexpire"))
diff --git a/configs/iax.conf.sample b/configs/iax.conf.sample
index 2441f2c..854a243 100644
--- a/configs/iax.conf.sample
+++ b/configs/iax.conf.sample
@@ -264,6 +264,16 @@ autokill=yes
; The default value is 'host'
;
;codecpriority=host
+;
+; allowfwdownload controls whether this host will serve out firmware to
+; IAX clients which request it. This has only been used for the IAXy,
+; and it has been recently proven that this firmware distribution method
+; can be used as a source of traffic amplification attacks. Also, the
+; IAXy firmware has not been updated for at least 18 months, so unless
+; you are provisioning IAXys in a secure network, we recommend that you
+; leave this option to the default, off.
+;
+;allowfwdownload=yes
;rtcachefriends=yes ; Cache realtime friends by adding them to the internal list
; just like friends added from the config file only on a
--
1.5.5.2
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/asterisk/F-9/.cvsignore,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- .cvsignore 23 Apr 2008 02:52:46 -0000 1.14
+++ .cvsignore 25 Jul 2008 21:00:08 -0000 1.15
@@ -1 +1 @@
-asterisk-1.6.0-beta8-stripped.tar.gz
+asterisk-1.6.0-beta9-stripped.tar.gz
Index: asterisk.spec
===================================================================
RCS file: /cvs/pkgs/rpms/asterisk/F-9/asterisk.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- asterisk.spec 2 Jul 2008 16:39:50 -0000 1.26
+++ asterisk.spec 25 Jul 2008 21:00:08 -0000 1.27
@@ -4,7 +4,7 @@
Summary: The Open Source PBX
Name: asterisk
Version: 1.6.0
-Release: 0.17.beta%{beta}%{?dist}
+Release: 0.19.beta%{beta}%{?dist}
License: GPLv2
Group: Applications/Internet
URL: http://www.asterisk.org/
@@ -44,6 +44,8 @@
Patch8: 0008-Build-using-external-libedit.patch
Patch9: 0009-Update-cdr_tds-to-latest.patch
Patch10: 0010-Update-autoconf.patch
+Patch11: 0011-Merged-revisions-123952-via-svnmerge-from.patch
+Patch12: 0012-Merged-revisions-132778-via-svnmerge-from.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)
@@ -413,6 +415,8 @@
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1
+%patch12 -p1
cp %{SOURCE2} menuselect.makedeps
cp %{SOURCE3} menuselect.makeopts
@@ -1023,6 +1027,12 @@
%{_libdir}/asterisk/modules/codec_zap.so
%changelog
+* Fri Jul 25 2008 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.0-0.19.beta9
+- Add patch pulled from upstream SVN that fixes AST-2008-010 and AST-2008-011.
+
+* Fri Jul 25 2008 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.0-0.18.beta9
+- Add patch for LDAP extracted from upstream SVN (#442011)
+
* Thu Jul 2 2008 Jeffrey C. Ollie <jeff at ocjtech.us> - 1.6.0-0.17.beta9
- Add patch that unbreaks cdr_tds with FreeTDS 0.82.
- Properly obsolete conference subpackage.
- Previous message (by thread): rpms/anaconda/devel .cvsignore, 1.552, 1.553 anaconda.spec, 1.694, 1.695 sources, 1.686, 1.687
- Next message (by thread): rpms/intltool/devel .cvsignore, 1.26, 1.27 intltool.spec, 1.46, 1.47 sources, 1.26, 1.27
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list