Support for RFC4372 (Chargeable User Identity)
Maja Wolniewicz
mgw at umk.pl
Mon Jan 21 17:33:17 CET 2008
Alan DeKok pisze:
> Maja Wolniewicz wrote:
>> I'm now running freeradius from CVS
>> FreeRADIUS Version 2.0.1-pre
>>
>> in post-auth I have:
>> if ("%{FreeRADIUS-Proxied-To}" == "127.0.0.1") {
>> if ("%{Chargeable-User-Identity}") {
>
> Please fix this. Putting double quotes around *everything* was never
> necessary, and is much less necessary in 2.0.1. See the examples from
> my original message, and in "man unlang".
Thanks. Now it works.
>
> What you want is:
>
> if (FreeRADIUS-Proxied-To == 127.0.01) {
> ...
> if (Chargeable-User-Identity) {
> ...
>
>> update reply {
>> Chargeable-User-Identity:="%{reply:Chargeable-User-Identity}@%{Realm}"
>> }
>
> Huh? You're updating the reply attribute with the reply attribute?
> What do you think this is doing?
Yes, I want to add current realm to reply attribute
Chargeable-User-Identity which comes form LDAP.
When Chargeable-User-Identity attribute isn't present in request I want
to remove Chargeable-User-Identity from reply.
if (Chargeable-User-Identity) {
update reply {
Chargeable-User-Identity:="%{reply:Chargeable-User-Identity}@%{Realm}"
}
}
else {
update reply {
Chargeable-User-Identity-="%{reply:Chargeable-User-Identity}"
}
}
What is wrong in it?
Maja
>
>> and it still doesn't work for me:
>
> Perhaps you could explain why you think it should do *anything* useful.
>
>> when Chargeable-User-Identity in request has a nul value, I'm getting:
> ...
>> expand: %{Chargeable-User-Identity} ->
>> ? Evaluating ("%{Chargeable-User-Identity}") -> FALSE
>
> Update this to use my example above. See also "man unlang":
>
> If the word 'foo' is not a quoted string, then it can be taken
> as a reference to a named attribute. See "Referencing attribute
> lists", below, for examples of attribute references. The condi-
> tion evaluates to true if the named attribute exists.
>
> This *is* documented. I *did* say I had updated the documentation.
>
> Alan DeKok.
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
--
Maja Gorecka-Wolniewicz mgw at umk.pl
http://www.umk.pl/~mgw
PGP key: http://www.umk.pl/~mgw/pgp_pub_key.asc
Uczelniane Centrum Information & Communication
Informatyczne Technology Centre
Uniwersytet Mikolaja Kopernika Nicolaus Copernicus University
Coll. Maximum, pl. Rapackiego 1, 87-100 Torun, Poland
tel.: +48 56-611-27-40 fax: +48 56-622-18-50 tel. kom.: +48-693032574
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 2916 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20080121/603fcdb9/attachment.bin>
More information about the Freeradius-Users
mailing list