Hugh Irvine writes:
> On Tue, 26 Oct 1999, Scott Adkins wrote:
> > I want to add a couple new attribute pairs to this output, so it would look
> > more like the following:
> > 
> >     Tue Oct 26 00:30:13 1999
> >         User-Name = "jdoe"
> >         My-Item-1 = "xxxxxx"                <======== New attribute
> >         My-Item-2 = "xxxxxx"                <======== New attribute
> >         Client-Id = 192.192.192.192
> >         Acct-Status-Type = Start
> >         <and so forth>
> 
> You can alter the accounting log output with the AcctLogFileName and the
> AcctLogFileFormat configuration parameters. See section 6.13.4 and 6.13.5
> in the Radiator 2.14.1 reference manual. If the attributes you want to add 
> are not in the accounting packets already, you can add them with a Hook
> (PreClientHook or PreHandlerHook). See the examples in sections 6.3.21 and
> 6.4.10 of the manual and note the dereferencing of the pointer (${$_[0]}).
>
> # Fake a new attribute into the request
> PreHandlerHook sub { ${$_[0]}->add_attr(`test-attr',`test-value'); }
> 
> If you tell me more about what you want to do, we may come up with a 
> better way.

Okay, after giving it some thought, I think I can better ask the question 
now.  I need to insert something into the account stream *after* the user
successfully authenticates to the system.  The information that is inserted
will describe how this particular session will be billed.  For example:

    Tue Oct 26 00:30:13 1999
        User-Name = "jdoe"
        Budget-Code = "1234 56 7890"    <======== New attribute
        User-Flags = "BxRN1xx5"         <======== New attribute
        <and so forth>

The budget code will depend on the password they enter.  Each username can 
have multiple passwords, with each password tied to different budget codes
for the purposes of billing.  The User-Flags field is used in the billing
process to help determine the final charge the user will have for that 
particular session (among other things).

The main point I am making here is that the Budget-Code and User-Flags 
attributes indicate the status of that account at that moment in time and
are subject to change in the password file at any time down the road.  The
next time the user logs in with that same username/password may show a 
different Budget-Code and User-Flags field in the account output.  

For this reason, I need to be able to inject these items into the accounting
stream at the time authentication succeeds.  This rules out any pre-hooks
that Radiator provides.  All I really need is the short little blurb to put
in my Auth module that does what Hugh suggested above.

Does this make a little more sense than it did before?

Scott
-- 
 +-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-+
      Scott W. Adkins                    http://www.cns.ohiou.edu/~sadkins/
   UNIX Systems Engineer                    mailto:[EMAIL PROTECTED]
        ICQ 7626282                     Work (740)593-9478 Fax (740)593-1944
 +-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-+
       CNS, HDL Center, Suite 301, Ohio University, Athens, OH 45701-2979

===
Archive at http://www.thesite.com.au/~radiator/
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to