<div dir="ltr">Thank you. I now understand.<div><br></div><div>A stock install of freeRadius in Fedora, (i.e. via yum), does not provide a man page for unlang. Had you not helped me, I'd simply not know.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Aug 5, 2013 at 6:00 PM, Arran Cudbard-Bell <span dir="ltr"><<a href="mailto:a.cudbardb@freeradius.org" target="_blank">a.cudbardb@freeradius.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On 5 Aug 2013, at 22:37, Joseph Perrin <<a href="mailto:joseph@lifeonthestreet.org">joseph@lifeonthestreet.org</a>> wrote:<br>
<br>
> The following appears to now work, but I don't understand some things:<br>
><br>
> files<br>
><br>
> if (control:Local-Group != "%{NAS-Identifier}" ) {<br>
><br>
> Why does control:Local-Group not need to be enclosed in "%{ }", but NAS-Identifier does?<br>
<br>
</div>In 2.x.x bareword left operand is assumed to be an attribute reference. Right bareword operand is assumed to be a number literal, or a member of the set of string values associated with an integer attribute.<br>
<br>
LHS/RHS operands are not interchangeable in their roles.<br>
<div class="im"><br>
> And why does %{ } content need to be within quotes<br>
<br>
</div>It's a string expansion, string expansions only function inside double quotes. This is similar to variable expansion in most scripting languages.<br>
<div class="im"><br>
> , when the documentation doesn't say anything about them needing to be in quotes?<br>
<br>
</div>Man unlang<br>
<br>
VARIABLES<br>
Run-time variables are referenced using the following syntax<br>
<br>
%{Variable-Name}<br>
<br>
Note that unlike C, there is no way to declare variables, or to refer to them outside of a string<br>
context. All references to variables MUST be contained inside of a double-quoted or back-quoted<br>
string."<br>
<div class="im"><br>
> It's clear I must have a call to "files" prior to this in order to populate the "control" list, right?<br>
<br>
</div>Yes.<br>
<div class="HOEnZb"><div class="h5"><br>
Arran Cudbard-Bell <<a href="mailto:a.cudbardb@freeradius.org">a.cudbardb@freeradius.org</a>><br>
FreeRADIUS Development Team<br>
<br>
-<br>
List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">http://www.freeradius.org/list/users.html</a><br>
</div></div></blockquote></div><br></div>