Alrighty... I just upgraded the version of Radiator I was running.  I guess
I was running 2.13.1.  I am now running 2.14.1 with the various patched 
files installed.

I have a home-grown auth module that logs some extra attributes to the 
accounting files.  Here is a blurb in the handle_request function:

    if ($p->code eq 'Access-Request') {
        # Reason = "$budget_code:$social:$flags" on success
        my ($user, $reason) = findUser($p->getUserName, $p);

        return ($main::REJECT_IMMEDIATE, $reason) unless $user;

        $rp->add_attr("Class", $reason);
        return ($main::ACCEPT);
    }

    if ($p->code eq 'Accounting-Request') {
        my $class = $p->get_attr("Class");

        if (defined $class) {
            my ($budget_code, $social, $flags) = split /:/, $class;
            $p->add_attr("DialNet-Budget", $budget_code);
            $p->add_attr("DialNet-Social", $social);
            $p->add_attr("DialNet-Flags", $flags);
            $p->delete_attr("Class");
        }

        return ($main::ACCEPT);
    }

Basically, I would fill up the Class attribute in the access request and
then split it apart in the Accounting-Request and make them seperate items
in the accounting log.  I then delete out the Class attribute, since it is
no longer needed.

This worked great in 2.13.1, however, it no longer works at all in 2.14.1.
In fact, the Class attribute remains, and the DialNet attributes don't get
added to the accounting log file.  I have tried both $p->add_attr and I
have tried $rp->add_attr (which I figured wouldn't work).  Neither worked.

I don't want to resort to a PostAuthHook, since I don't think I should hack
a config file to implement something that can't be done in a Auth module,
after all, the config file should be more powerful than the actual source
code, should it?

Any ideas what happened, or what I should do to the above to add the new
attributes and delete the old from the accounting log file?

Thanks,
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