On 04/18/2014 07:31 PM, Michael Rodrigues wrote:
> I tried adding an AuthBy INTERNAL to the outer handler, using the perl
> snippet you had suggested with RequestHook. I get a hook error whenever
> it is called. I'm not a perl guru but I tried changing "${$_[1]}" to
> just "$_[1]" and got rid of the SCALAR error, but I was still getting a
> "Hook error" with no specific information.
Hello Michael,
your hook needs a couple of small changes. Try this.
RequestHook sub { my $rp = $_[1];
$rp->changeUserName($rp->{inner_identity}); return $main::ACCEPT;}
The hook parameter types depend on the hook. With RequestHook the Hook
gets passed a reference, not a reference to a reference like it does for
some Hooks. Also, you need to return a suitable return value because
AuthBy INTERNAL checks what the hook returns.
Thanks,
Heikki
--
Heikki Vatiainen <[email protected]>
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, Active Directory, EAP, TLS,
TTLS, PEAP, TNC, WiMAX, RSA, Vasco, Yubikey, MOTP, HOTP, TOTP,
DIAMETER etc. Full source on Unix, Windows, MacOSX, Solaris, VMS,
NetWare etc.
_______________________________________________
radiator mailing list
[email protected]
http://www.open.com.au/mailman/listinfo/radiator