(RADIATOR) AuthBy IMAP problem

Petr Zimak Petr.Zimak at unibas.ch
Mon Feb 20 23:43:06 CST 2006


Hi all

I updated to radiator 3.14 and have a problem with <AuthBy IMAP>. It
does'nt recognize the special formatting characters in the Host (and
also other) parameters. My config is


<Realm /^host((\.subdom)?\.domain\.edu)?$/i>
   RewriteUsername       s/^([^@]+).*/$1\@host.subdom.domain.edu/
   AuthBy                mailbox-auth
   ...
 
     </Realm>

and

<AuthBy GROUP>
   Identifier mailbox-auth
   AuthByPolicy ContinueWhileAccept
   ...
   <AuthBy IMAP>
     Identifier imap-auth
     Host %R
     ...
   </AuthBy>
   ...
 

</AuthBy>


I got an "Invalid parameter" error from the socket creation function.
It turned out that the PeerHost was empty. In the Radiator distribution,
the AuthIMAP.pm module calls the Radius::Util::format_special function
on several parameters, but just with one argument, so that no replacements
can take place. I changed all calls to format_special to have the packet
as a second argument, and everything seems to work again (see the diff
below).

Is there any problen with this change, like security or side effects?

Regards, Petr

--------------------------------------------------------------------

# diff /usr/lib/perl5/site_perl/5.8.6/Radius/AuthIMAP.pm /usr/lib/perl5/site_perl/5.8.6/Radius/AuthIMAP.pm.orig
166c166
<     $args{PeerHost} = &Radius::Util::format_special( $self->{Host}, $p )
---
 >     $args{PeerHost} = &Radius::Util::format_special( $self->{Host} )
168c168
<     $args{PeerPort} = &Radius::Util::format_special( $self->{Port}, $p )
---
 >     $args{PeerPort} = &Radius::Util::format_special( $self->{Port} )
170c170
<     $args{LocalAddr} = &Radius::Util::format_special( $self->{LocalAddr}, $p )
---
 >     $args{LocalAddr} = &Radius::Util::format_special( $self->{LocalAddr} )
177c177
<         $self->log( $main::LOG_DEBUG, "$class: create IMAP socket (Host $args{PeerHost}, Port $args{PeerPort})", $p );
---
 >         $self->log( $main::LOG_DEBUG, "$class: create IMAP socket", $p );
194c194
<         $args{SSL_ca_file} = &Radius::Util::format_special( $self->{SSLCAFile}, $p )
---
 >         $args{SSL_ca_file} = &Radius::Util::format_special( $self->{SSLCAFile} )
196c196
<         $args{SSL_ca_path} = &Radius::Util::format_special( $self->{SSLCAPath}, $p )
---
 >         $args{SSL_ca_path} = &Radius::Util::format_special( $self->{SSLCAPath} )
199c199
<           &Radius::Util::format_special( $self->{SSLCAClientCert}, $p )
---
 >           &Radius::Util::format_special( $self->{SSLCAClientCert} )
202c202
<           &Radius::Util::format_special( $self->{SSLCAClientKey}, $p )
---
 >           &Radius::Util::format_special( $self->{SSLCAClientKey} )
#

--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.


More information about the radiator mailing list