rlm_perl and accounting
KES
kes-kes at yandex.ru
Thu Aug 24 00:53:49 CEST 2006
JC> My goal is to inspect the received attributes
JC> using rlm_perl in the preacct{} phase before they are written to log in
JC> the accounting{} phase and possibly remove/rewrite/add attributes before
JC> they are logged. Is this possible with rlm_perl?
1) You are trying this thing:
preacct{
if( $RAD_REQUEST{'SomeAttr'} > someExpr ) {
$RAD_REQUEST{'SomeAttr'}= NewValue;
}
}
accounting{
logThisToYouDB( $RAD_REQUEST{'SomeAttr'} );
}
2) Why not to do this simply:
accounting{
if( $RAD_REQUEST{'SomeAttr'} > someExpr ) {
logThisToYouDB( NewValue )
else
logThisToYouDB( $RAD_REQUEST{'SomeAttr'} );
}
I think allow users to rewrite RAD_REQUEST attributes will be case for
errors. Because this is a perverted logic
Tell me plz a cause to do 1) not 2)?
More information about the Freeradius-Users
mailing list