[opensips] Rebuild with refreshed tarball
Peter Lemenkov
peter at fedoraproject.org
Mon Jul 11 11:12:57 UTC 2011
commit 06ffbc5b2c91d8898fe19c074b0798e2dd9d4421
Author: Peter Lemenkov <lemenkov at gmail.com>
Date: Mon Jul 11 15:12:39 2011 +0400
Rebuild with refreshed tarball
Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
.gitignore | 1 +
...stall-modules-by-install-modules-all-in-i.patch | 28 --------
0002-fixed-install-modules-doc.patch | 31 ---------
...ps-0001-Check-for-stale-nonce-in-pre_auth.patch | 70 ++++++++++++++++++++
...overlapping-both-auth-realm-and-auth-resp.patch | 29 ++++++++
opensips.spec | 17 +++--
sources | 2 +-
7 files changed, 111 insertions(+), 67 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b22786f..2425c1a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
opensips-1.6.2-tls_src.tar.gz
opensips-1.6.3-tls_src.tar.gz
/opensips-1.6.4-tls_src.tar.gz
+/opensips-1.6.4-2-tls_src.tar.gz
diff --git a/opensips-0001-Check-for-stale-nonce-in-pre_auth.patch b/opensips-0001-Check-for-stale-nonce-in-pre_auth.patch
new file mode 100644
index 0000000..f2f185b
--- /dev/null
+++ b/opensips-0001-Check-for-stale-nonce-in-pre_auth.patch
@@ -0,0 +1,70 @@
+From 5ce7165bfb2869300258193fdabbdf442435362b Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Mon, 6 Dec 2010 15:56:54 +0300
+Subject: [PATCH 1/2] Check for stale nonce in pre_auth
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ modules/auth/api.c | 35 ++++++++++++++++++-----------------
+ 1 files changed, 18 insertions(+), 17 deletions(-)
+
+diff --git a/modules/auth/api.c b/modules/auth/api.c
+index f076e85..ea54f20 100644
+--- a/modules/auth/api.c
++++ b/modules/auth/api.c
+@@ -215,6 +215,12 @@ auth_result_t pre_auth(struct sip_msg* _m, str* _realm, hdr_types_t _hftype,
+ return ERROR;
+ }
+
++ if (is_nonce_stale(&c->digest.nonce)) {
++ LM_DBG("stale nonce value received\n");
++ c->stale = 1;
++ return STALE_NONCE;
++ }
++
+ if (check_nonce(&c->digest.nonce, &secret) != 0) {
+ LM_DBG("invalid nonce value received\n");
+ c->stale = 1;
+@@ -240,27 +246,22 @@ auth_result_t post_auth(struct sip_msg* _m, struct hdr_field* _h)
+ (_m->REQ_METHOD == METHOD_CANCEL))
+ return AUTHORIZED;
+
+- if (is_nonce_stale(&c->digest.nonce)) {
+- LM_DBG("response is OK, but nonce is stale\n");
++ if(!disable_nonce_check) {
++ /* Verify if it is the first time this nonce is received */
++ index= get_nonce_index(&c->digest.nonce);
++ if(index== -1) {
++ LM_ERR("failed to extract nonce index\n");
++ return ERROR;
++ }
++ LM_DBG("nonce index= %d\n", index);
++
++ if(!is_nonce_index_valid(index)) {
++ LM_DBG("nonce index not valid\n");
+ c->stale = 1;
+ return STALE_NONCE;
+- } else {
+- if(!disable_nonce_check) {
+- /* Verify if it is the first time this nonce is received */
+- index= get_nonce_index(&c->digest.nonce);
+- if(index== -1) {
+- LM_ERR("failed to extract nonce index\n");
+- return ERROR;
+- }
+- LM_DBG("nonce index= %d\n", index);
+-
+- if(!is_nonce_index_valid(index)) {
+- LM_DBG("nonce index not valid\n");
+- c->stale = 1;
+- return STALE_NONCE;
+- }
+ }
+ }
++
+ return AUTHORIZED;
+
+ }
+--
+1.7.6
+
diff --git a/opensips-0002-fixed-pvar-overlapping-both-auth-realm-and-auth-resp.patch b/opensips-0002-fixed-pvar-overlapping-both-auth-realm-and-auth-resp.patch
new file mode 100644
index 0000000..3ac6a08
--- /dev/null
+++ b/opensips-0002-fixed-pvar-overlapping-both-auth-realm-and-auth-resp.patch
@@ -0,0 +1,29 @@
+From faaaacc7d9ad641e3d18b670703e2ca8108c9cda Mon Sep 17 00:00:00 2001
+From: bogdan_iancu <bogdan_iancu at 689a6050-402a-0410-94f2-e92a70836424>
+Date: Fri, 28 Jan 2011 10:17:40 +0000
+Subject: [PATCH 2/2] - fixed pvar overlapping - both auth realm and auth
+ response were defined as $ar. auth response moved as
+ $auth.resp Credits for report go to medve on IRC
+ channel
+
+git-svn-id: https://opensips.svn.sourceforge.net/svnroot/opensips/trunk@7686 689a6050-402a-0410-94f2-e92a70836424
+---
+ pvar.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/pvar.c b/pvar.c
+index a3cda2a..3b6c46e 100644
+--- a/pvar.c
++++ b/pvar.c
+@@ -2958,7 +2958,7 @@ static pv_export_t _pv_names_table[] = {
+ {{"an", (sizeof("an")-1)}, /* */
+ PVT_AUTH_NONCE, pv_get_authattr, 0,
+ 0, 0, pv_init_iname, 6},
+- {{"ar", (sizeof("ar")-1)}, /* */
++ {{"auth.resp", (sizeof("auth.resp")-1)}, /* */
+ PVT_AUTH_RESPONSE, pv_get_authattr, 0,
+ 0, 0, pv_init_iname, 7},
+ {{"aU", (sizeof("aU")-1)}, /* */
+--
+1.7.6
+
diff --git a/opensips.spec b/opensips.spec
index 752945c..3c9872f 100644
--- a/opensips.spec
+++ b/opensips.spec
@@ -10,13 +10,13 @@
Summary: Open Source SIP Server
Name: opensips
Version: 1.6.4
-Release: 7%{?dist}
+Release: 8%{?dist}
License: GPLv2+
Group: System Environment/Daemons
-Source0: http://opensips.org/pub/%{name}/%{version}/src/%{name}-%{version}-tls_src.tar.gz
+Source0: http://opensips.org/pub/%{name}/%{version}/src/%{name}-%{version}-2-tls_src.tar.gz
Source1: %{name}.sysconfig
-Patch0: 0001-replaced-install-modules-by-install-modules-all-in-i.patch
-Patch1: 0002-fixed-install-modules-doc.patch
+Patch1: opensips-0001-Check-for-stale-nonce-in-pre_auth.patch
+Patch2: opensips-0002-fixed-pvar-overlapping-both-auth-realm-and-auth-resp.patch
URL: http://opensips.org
BuildRequires: expat-devel
@@ -516,9 +516,9 @@ the exchange of instant messages between SIP clients and XMPP(jabber)
clients.
%prep
-%setup -q -n %{name}-%{version}-tls
-%patch0 -p1 -b .orig
-%patch1 -p1 -b .orig
+%setup -q -n %{name}-%{version}-2-tls
+%patch1 -p1 -b .nonce
+%patch2 -p1 -b .rename
%build
LOCALBASE=/usr CFLAGS="%{optflags}" %{__make} all %{?_smp_mflags} TLS=1 \
@@ -1010,6 +1010,9 @@ fi
%doc docdir/README.xmpp
%changelog
+* Mon Jul 11 2011 Peter Lemenkov <lemenkov at gmail.com> - 1.6.4-8
+- Upstream re-released traball with several new patches (API compatible)
+
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano at redhat.com> - 1.6.4-7
- Perl mass rebuild
diff --git a/sources b/sources
index dd6914b..41e404a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d4c00298997e1ecb492871050f7c295e opensips-1.6.4-tls_src.tar.gz
+e9869d9a726d70f83de4a1e77cd24d40 opensips-1.6.4-2-tls_src.tar.gz
More information about the scm-commits
mailing list