Hi Matthias,

why not define a <Realm> with no argument ? 


if you inssist on writing a PreClientHook;
you should do something like the folowing

in your radius.cfg
PreClientHook  file:"/path/to/hook.pl

hook.pl will look something like : 
sub { 
      &main::log($main::LOG_DEBUG, "Entering PreAuthHook");
      my $request = ${$_[0]};
      my ($user, $domain);
      ($user, $domain) = split(/@/, 
$request->getAttrByNum($Radius::Radius::USER_NAME),2);
      if (!defined($domain)) {
            $request->changeAttrByNum($Radius::Radius::USER_NAME, "$user\@cybernet"); 
            ## some extra logging if you want
            &main::log($main::LOG_WARNING, "User $user did not add a realm..");
      }
      &main::log($main::LOG_DEBUG, "Exiting PreAuthHook");
}

kind regards,
robin.

--
Robin Vissers <robinATstaf.planetinternet.be>
Planet Internet NV



On Mon, Sep 18, 2000 at 05:17:24PM +0200, Matthias Fechner (Temp) wrote:
> Hallo,
> 
> i want to write a hook to find out if the user has a realm in his
> username(bla@cybernet) if not the realmname given, cybernet must added to
> the username(it's the default realmname), but all this must be done before
> radiator go to the realm handler.
> Can anyone give me a hind or can say me what i must write to the cfg-file.
> 
> 
> Matthias Fechner
> 
> 
> ===
> Archive at http://www.starport.net/~radiator/
> Announcements on [EMAIL PROTECTED]
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.

===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to