(RADIATOR) Expanding variables
Michael Hall
mhall at riverside.org
Fri Feb 3 15:54:31 CST 2006
On Fri, Feb 03, 2006 at 01:18:20PM +1100, Hugh Irvine wrote:
>
> Hello Michael -
>
> Yes it looks like the log message is not correct.
>
> Thanks for letting me know.
This seems to fix things:
artemis:/usr/local/radius/Radius $ diff -u Ldap.pm.ORIG Ldap.pm
--- Ldap.pm.ORIG Fri Feb 3 13:47:10 2006
+++ Ldap.pm Fri Feb 3 13:50:55 2006
@@ -212,7 +212,8 @@
}
&Radius::Util::exec_timeout($self->{Timeout},
sub {
- $self->log($main::LOG_INFO, "Attempting to bind to LDAP server $self->{Host}:$self->{Port}");
+ my $host = &Radius::Util::format_special($self->{Host});
+ $self->log($main::LOG_INFO, "Attempting to bind to LDAP server $host:$self->{Port}");
$result = $self->{ld}->bind(@bindargs);
});
> On 3 Feb 2006, at 12:02, Michael Hall wrote:
>
> >On Fri, Feb 03, 2006 at 11:39:48AM +1100, Hugh Irvine wrote:
> >>
> >>Hello Michael -
> >>
> >>I have just successfully tested this here with Radiator 3.14
> >>(latest).
> >>
> >>What version of Radiator are you running?
> >
> >Thu Feb 2 16:50:36 2006: NOTICE: SIGTERM received: stopping
> >Thu Feb 2 16:50:40 2006: DEBUG: Finished reading configuration
> >file '/usr/loca
> >l/etc/radius.cfg'
> >Thu Feb 2 16:50:40 2006: DEBUG: Reading dictionary file '/usr/
> >local/etc/raddb/
> >dictionary'
> >Thu Feb 2 16:50:40 2006: DEBUG: Creating authentication port
> >0.0.0.0:1645
> >Thu Feb 2 16:50:40 2006: DEBUG: Creating accounting port 0.0.0.0:1646
> >Thu Feb 2 16:50:40 2006: NOTICE: Server started: Radiator 3.14 on
> >artemis.rock
> >island.com
> >
> >I've also got the patches installed, just upgraded about a week ago.
> >
> >Looking at the code (Ldap.pm) I see this now:
> >
> >$self->log($main::LOG_INFO, "Connecting to $host, port $self->
> >{Port}");
> >
> >$self->log($main::LOG_INFO, "Attempting to bind to LDAP server
> >$self->{Host}:$self->{Port}");
> >
> >it looks like $host shows the expanded variable, while $self->
> >{Host} doesn't.
> >
> >>On 3 Feb 2006, at 11:00, Michael Hall wrote:
> >>
> >>>
> >>><radius.cfg>
> >>>
> >>>DefineFormattedGlobalVar ldap_host localhost
> >>>
> >>>...
> >>><AuthBy LDAP2>
> >>> Identifier CheckLDAP
> >>> Host %{GlobalVar:ldap_host}
> >>>...
> >>>
> >>><logfile>
> >>>
> >>>...
> >>>Thu Feb 2 00:00:18 2006: DEBUG: Handling with Radius::AuthLDAP2:
> >>>CheckLDAP
> >>>Thu Feb 2 00:00:18 2006: INFO: Connecting to localhost, port 389
> >>>Thu Feb 2 00:00:18 2006: INFO: Attempting to bind to LDAP server %
> >>>{GlobalVar:l
> >>>dap_host}:389
> >>>...
> >>>
> >>>
> >>>Are variables not expanded when logged?
> >
> ><snip>
--
What if there were no hypothetical questions?
Mike Hall,
System Admin - Rock Island Communications <mikeh at rockisland.com>
System Admin - riverside.org, ssdd.org <mhall at riverside.org>
--
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