<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:tnt@kalik.net">tnt@kalik.net</a> a écrit :
<blockquote cite="mid:S8c8MgPx.1224541401.6689880.tnt@kalik.net"
type="cite">
<blockquote type="cite">
<pre wrap="">Thanks, I saw this, but unfortunaltely whereas in dialup.conf the
variable is '%{Sql-Group}', It seems i cannot re-use it outside of an
sql module.
</pre>
</blockquote>
<pre wrap=""><!---->
That is probably a bug then. Sql-Group should be available outside sql
module. I've used it in huntgroups in 1.1.7.
</pre>
<blockquote type="cite">
<pre wrap="">I have even tried to add an update control directive to add
a Tmp-String-0 (correctly expanded in the sql module) at the end of the
sql module and so re-use it at the end of the aythorize section (outside
sql module), but it doesn't work as it's expanded to an empty string...
</pre>
</blockquote>
<pre wrap=""><!---->
That's OK. unlang doesn't work inside module configuration, only server
configuration.
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">You need to use lists with attributes in unlang (in this case attribute
is from control list) since default is request.
</pre>
</blockquote>
<pre wrap="">same result with "%{control:Tmp-String-0}".
</pre>
</blockquote>
<pre wrap=""><!---->
Let's try a workaround. Get group name by executing query again in
authorize section:
update control {
Tmp-String-0 := "%{sql:SELECT GroupName FROM radusergroup WHERE
UserName='%{User-Name}' ORDER BY priority}"
}
"%{control:Tmp-String-0}" will hold group name then.
</pre>
</blockquote>
<br>
This already works .... the goal was to avoid mulplication of sql
queries.<br>
But if there is no other solutions.....<br>
<br>
thx anyway<br>
<blockquote cite="mid:S8c8MgPx.1224541401.6689880.tnt@kalik.net"
type="cite">
<pre wrap="">
Ivan Kalik
Kalik Informatika ISP
-
List info/subscribe/unsubscribe? See <a class="moz-txt-link-freetext" href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a>
</pre>
</blockquote>
</body>
</html>