8 Jun
2006
8 Jun
'06
5:22 p.m.
I am trying to rewrite the username (sql_user_name) to always add the realm to the username. I am getting different 'User-Name' and 'Realm' from different NAS units. My db storage format is: user@domain One unit is sending it in this way already (user@domain), the other unit from a different vendor can send the domain in the 'Realm' part: User-Name = user Realm = domain How can I rewrite the User-Name that I always get it in my preferred db format? I tried: sql_user_name = "%{%{Realm:+%{User-Name}@%{Realm}}:-%{User-Name}}" But it seems that the conditional sh syntax :+ does not work, only :- And I do not exactly know if this nested approach could work anyhow. Any hints?