Hello Wilbert,
On Jul 6, 8:59pm, Wilbert de Graaf wrote:
Subject: (RADIATOR) PreAuthHook: add_attr - can't call add_attr() on unbl
I'm trying to add a name-value pair to a request just before authentication
occurs. The documentation of radiator has an example:
Realm
PreAuthHook sub { $_[0]-add_attr('test-attr', 'test-value'); }
AuthBy LDAP
...
AuthBy
/Realm
Without the PreAuthHook, everything is working fine, but when I run a test
with this statement, the logfile says:
ERR: Error in PreAuthHook(): Can't call method "add_attr" on unblessed
reference at (eval 190) line 1.
The problem is that contrary to the documentation, you need to access $_[0]
like this:
PreAuthHook sub { ${$_[0]}-add_attr('test-attr', 'test-value'); }
Apologies, the doc is fixed for the next release.
Cheers.
I tried to put PreAuthHook on different places, but no luck. I also tried
code like
PreAuthHook sub { my($p); \
bless($p); \
$_[0]-add_attr('test-attr', 'test-value'); }
but then the logfile says it cannot reach class through "Handler.pm". I tried
"use Radius::AttrVal" on top of "Handler.pm" but that didn't work either.
Can anyone tell me what it is I'm missing (besides this running) ?
- Wilbert
[ Attachment (text/x-html): 3147 bytes
Character set: iso-8859-1
Encoded with "quoted-printable" ]
-- End of excerpt from Wilbert de Graaf
--
Mike McCauley [EMAIL PROTECTED]
Open System Consultants Pty. LtdUnix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au
Phone +61 3 9598-0985 Fax +61 3 9598-0955
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
NT, Rhapsody
===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.