(RADIATOR) Writing to Radiator's Logfile from an AuthBy EXTERNAL program
Hugh Irvine
hugh at open.com.au
Tue Nov 6 03:37:51 CST 2001
Hello Bart -
At 15:20 +1100 01/11/6, Bart Masters wrote:
>Folks,
>
>Got a lil prob here - hopefully someone can see a way through it.
>I've got a perl program which I'm calling from the AuthBy EXTERNAL
>clause within my handler.cfg file. Within my program, I want to
>write entries to the main Radiator logfile, ie the one that Radiator
>itself is writing to. I can't use the call that a hook would use, ie
>
> &main::log($main::LOG_DEBUG, "This is an error message");
>
>because being its own separate program, it can't get to the
>main::log subroutine.
>
>I could try using Radius::Log in my own program - but that would
>also mean having to get hold of the logname from Radius.cfg and the
>like, and I fear that could turn out to be a nightmare.
>
>Has anyone done this before? Is there a simple option that I'm just
>missing? Any ideas/answers would be greatly appreciated.
Given that you are dealing with two complelely different program
spaces, I don't see how you can do what you are describing without
hard-coding the logfile name in the external program, or possibly
passing something in the arguments to the external program. You may
be able to do the latter by inserting the relevant value into a
pseudo-attribute in the current request before you call the external
program.
It would be fairly simple to do this in a PreAuthHook and you will
find some example hooks in the file "goodies/hooks.txt" in the
distribution.
regards
Hugh
--
NB: I am travelling this week, so there may be delays in our correspondence.
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/2000, NT, MacOS X.
===
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