tags 300219 +pending
Thankyou Mr Bug Control Robot
On Fri, Mar 18, 2005 at 01:27:44PM +0100, Manuel Menal wrote:
> Package: freeradius
> Severity: important
> Tags: patch

> When pthreads are enabled (default on Debian) and crypt 
> encryption is used, FreeRADIUS crashes.

> The following patch fixes the bug :

> diff -Nurp freeradius-1.0.1/src/lib/crypt.c 
> freeradius-1.0.1.new/src/lib/crypt.c
> --- freeradius-1.0.1/src/lib/crypt.c    2004-02-26 20:04:20.000000000 +0100
> +++ freeradius-1.0.1.new/src/lib/crypt.c        2005-03-18 13:25:55.187248153 
> +0100
> @@ -49,7 +49,7 @@ int lrad_crypt_check(const char *key, co
>         /*
>          *      Ensure we're thread-safe, as crypt() isn't.
>          */
> -       if (!lrad_crypt_init == 0) {
> +       if (lrad_crypt_init == 0) {
>                 pthread_mutex_init(&lrad_crypt_mutex, NULL);
>                 lrad_crypt_init = 1;
>         }

> It's obviously a mistake, which causes pthread_mutex_lock/unlock
> to be called on an uninitialized mutex.

Indeed. A very similar mistake was fixed with the random pool in
the 1.0.2 release. I've sent this upstream, and will endevaour to
drop a new package to my sponsor by Monday.

Good catch, and thankyou. ^_^

-- 
Paul "TBBle" Hampson, [EMAIL PROTECTED]
7th year CompSci/Asian Studies student, ANU

Shorter .sig for a more eco-friendly paperless office.

Attachment: signature.asc
Description: Digital signature

Reply via email to