Package: freeradius
Version: 2.1.10+dfsg-2
Severity: normal
Tags: patch upstream

This bug renders freeradius essentially useless in proxy configurations,
here is the whole story:

http://freeradius.1045715.n5.nabble.com/Proxy-Issue-td3212706.html

A patch based on upstream git is attached.

Thanks,

-- 
Dmitry Borodaenko


-- System Information:
Debian Release: 6.0
  APT prefers unstable
  APT policy: (990, 'unstable'), (70, 'testing'), (50, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=be_BY.UTF-8, LC_CTYPE=be_BY.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages freeradius depends on:
ii  adduser                 3.112+nmu2       add and remove users and groups
ii  ca-certificates         20090814+nmu2    Common CA certificates
ii  freeradius-common       2.1.10+dfsg-2    FreeRADIUS common files
ii  libc6                   2.11.2-7         Embedded GNU C Library: Shared lib
ii  libfreeradius2          2.1.10+dfsg-2    FreeRADIUS shared library
ii  libgdbm3                1.8.3-9          GNU dbm database routines (runtime
ii  libltdl7                2.2.6b-2         A system independent dlopen wrappe
ii  libpam0g                1.1.1-6.1        Pluggable Authentication Modules l
ii  libperl5.10             5.10.1-17        shared Perl library
ii  libpython2.6            2.6.6-8+b1       Shared Python runtime library (ver
ii  libssl0.9.8             0.9.8o-4         SSL shared libraries
ii  lsb-base                3.2-26           Linux Standard Base 3.2 init scrip
ii  ssl-cert                1.0.28           simple debconf wrapper for OpenSSL
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

Versions of packages freeradius recommends:
ii  freeradius-utils           2.1.10+dfsg-2 FreeRADIUS client utilities

Versions of packages freeradius suggests:
pn  freeradius-krb5               <none>     (no description available)
pn  freeradius-ldap               <none>     (no description available)
pn  freeradius-mysql              <none>     (no description available)
pn  freeradius-postgresql         <none>     (no description available)
diff -urN freeradius-2.1.10+dfsg.orig/debian/changelog freeradius-2.1.10+dfsg/debian/changelog
--- freeradius-2.1.10+dfsg.orig/debian/changelog	2011-01-13 12:27:41.209482002 +0200
+++ freeradius-2.1.10+dfsg/debian/changelog	2011-01-13 13:10:38.157482002 +0200
@@ -1,3 +1,12 @@
+freeradius (2.1.10+dfsg-2.1) unstable; urgency=low
+
+  * Fix the daemon crashing when home server doesn't respond to a proxied
+    request. Cherry-picked upstream commits
+    540a0515de93d99ef45f97b9114185f159587b51 and
+    ab972f1f9b724fc0b71e6ca726078c92ad26bc6b into a Debian patch.
+
+ -- Dmitry Borodaenko <angdr...@debian.org>  Thu, 13 Jan 2011 13:08:11 +0200
+
 freeradius (2.1.10+dfsg-2) unstable; urgency=medium
 
   * The zombie period start time variable mistakenly got set to a random
diff -urN freeradius-2.1.10+dfsg.orig/debian/patches/proxy_timeout_running.diff freeradius-2.1.10+dfsg/debian/patches/proxy_timeout_running.diff
--- freeradius-2.1.10+dfsg.orig/debian/patches/proxy_timeout_running.diff	1970-01-01 03:00:00.000000000 +0300
+++ freeradius-2.1.10+dfsg/debian/patches/proxy_timeout_running.diff	2011-01-13 13:05:27.057482003 +0200
@@ -0,0 +1,35 @@
+diff --git a/src/main/event.c b/src/main/event.c
+index 78bb220..95008a4 100644
+--- a/src/main/event.c
++++ b/src/main/event.c
+@@ -1232,16 +1232,17 @@ static void wait_a_bit(void *ctx)
+ 	case REQUEST_RUNNING:
+ 		/*
+ 		 *	If we're not thread-capable, OR we're capable,
+-		 *	but have been told to run without threads,
+-		 *	complain when the requests is queued for a
+-		 *	thread, or running in a child thread.
++		 *	but have been told to run without threads, and
++		 *	the request is still running.  This is usually
++		 *	because the request was proxied, and the home
++		 *	server didn't respond.
+ 		 */
+ #ifdef HAVE_PTHREAD_H
+ 		if (!have_children)
+ #endif
+ 		{
+-			rad_assert("We do not have threads, but the request is marked as queued or running in a child thread" == NULL);
+-			break;
++			request->child_state = REQUEST_DONE;
++			goto done;
+ 		}
+ 
+ #ifdef HAVE_PTHREAD_H
+@@ -1312,6 +1313,7 @@ static void wait_a_bit(void *ctx)
+ 		 *	and clean it up.
+ 		 */
+ 	case REQUEST_DONE:
++	done:
+ #ifdef HAVE_PTHREAD_H
+ 		request->child_pid = NO_SUCH_CHILD_PID;
+ #endif
diff -urN freeradius-2.1.10+dfsg.orig/debian/patches/series freeradius-2.1.10+dfsg/debian/patches/series
--- freeradius-2.1.10+dfsg.orig/debian/patches/series	2011-01-13 12:27:41.209482002 +0200
+++ freeradius-2.1.10+dfsg/debian/patches/series	2011-01-13 13:06:34.909482003 +0200
@@ -4,4 +4,5 @@
 rlm_sql.libs.diff
 eap.server.key.diff
 eap.random_file.diff
+proxy_timeout_running.diff
 zombie_period_start.diff

Reply via email to