(RADIATOR) PostAuthHook
Mike McCauley
mikem at open.com.au
Tue Jun 3 22:10:48 CDT 2003
Hello Nathan,
The problem is the ordering of subs in your file.
Your anonymous hook sub should be at the end of the file, after your named
subs, not at the beginning.
Cheers.
On Wed, 4 Jun 2003 12:51 pm, Nathan 'Franko' Franklin wrote:
> Hello List,
>
> This is a bit off topic, but i was wandering if you guys could help me
>
> I have a PostAuthHook and inside the postauthhook i want to call some subs
> in that hook file. I am not really a perl programmer, but i try, anyway it
> isnt working
>
> Could someone tell me why
>
> PostAuthHook FILE
>
> sub {
> &main::log($main::LOG_DEBUG,"Start Hook Processing");
>
> # Used for National Ports,
> # Rejecting user if they are not a national customer,
> # IE They have local ports at thier location
> rejectLocationPortNationDialing(\${$_[0]},\${$_[1]},\${$_[2]});
>
> # Used to make sure that customers arnt dialing into
> # DOV access unless they have a DOV account
> denyNonDOVAccessingDOV(\${$_[0]},\${$_[1]},\${$_[2]});
>
> &main::log($main::LOG_DEBUG,"Finish Hook Processing");
> }
> sub rejectLocationPortNationDialing {
> my $request = ${$_[0]};
> my $reply = ${$_[1]};
> my $result = ${$_[2]};
> }
> sub denyNonDOVAccessingDOV {
> my $request = ${$_[0]};
> my $reply = ${$_[1]};
> my $result = ${$_[2]};
> }
>
>
> end of file
>
> there is extra code inside the two subs i am calling but i wont bother
> pasting that because it isnt even getting to that
>
> here is the error i am getting
>
> Wed Jun 4 12:40:28 2003: ERR: Compilation error in PostAuthHook: syntax
> error a t (eval 45) line 16, near "}
>
> sub rejectLocationPortNationDialing "
>
> Can't use global @_ in "my" at (eval 45) line 17, near "{$_"
>
> any help would be greatly appreciated
>
> Kind Regards
>
> Nathan Franklin
> TSN Internet
> nathan at tsn.cc
> MSN: nathanfranko at hotmail.com
>
> 'Always, always, always, live your own life. If not, you only live off
> others and are mass-produced. Individualism is something no one can take
> away.'
--
Mike McCauley mikem at open.com.au
Open System Consultants Pty. Ltd Unix, 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, Active Directory, EAP, TLS,
TTLS, PEAP etc on Unix, Windows, MacOS etc.
===
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