Hello again,<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I have a string attribute named Relaciones in my ldap. <br>
<br>This attribute can have more than one value. Actually I return those values in the reply:<br><br>Sending Access-Accept of id 229 to X.X.X.X port 32796<br>
Relaciones += "-11"<br> Relaciones += "03"<br> Relaciones += "-01"<br><br>I want to authorize the access only if there is one attibute Relaciones whith a positive value. So I would like to use unlang in authorize module to check all the attributes "Relaciones" whit a regex, but I don't know how can I check all the attributes, and how can I stop procesing the attributes if I found one wihtout a minus sign.<br>
<br><br>if ("%{reply:Relaciones}" =~ /^([0-9]{2})/) {<br><br>}<br><br><br></blockquote><div><br>maybe I can check the value with a check item:<br><br>#cat /etc/freeradius/ldap.attrmap<br><br>checkItem NT-Password ntPassword<br>
checkItem Relaciones Relaciones ~= /^([0-9]{2})/<br><br>replyItem Nombre-Completo sn<br>replyItem Relaciones Relaciones +=<br><br>anyway i test both ideas, but don't work:<br>
<br>[ldap] looking for check items in directory...<br> [ldap] ntPassword -> NT-Password == 0x3...<br>[ldap1] looking for reply items in directory...<br> [ldap1] Relaciones -> Relaciones += "-11"<br> [ldap1] Relaciones -> Relaciones += "03"<br>
[ldap1] Relaciones -> Relaciones += "-01"<br>WARNING: No "known good" password was found in LDAP. Are you sure that the user is configured correctly?<br>[ldap1] user XXX authorized to use remote access<br>
[ldap1] ldap_release_conn: Release Id: 0<br>++++[ldap1] returns ok<br>++++? if (fail)<br>? Evaluating (fail) -> FALSE<br>++++? if (fail) -> FALSE<br>++++- entering else else {...}<br>+++++? if ("%{reply:Relaciones}" =~ /^([0-9]{2})/)<br>
expand: %{reply:Relaciones} -> -11<br>? Evaluating ("%{reply:Relaciones}" =~ /^([0-9]{2})/) -> FALSE<br>+++++? if ("%{reply:Relaciones}" =~ /^([0-9]{2})/) -> FALSE<br>++++- else else returns ok<br>
<br><br>any ideas?<br><br>thank you very much.<br><br></div></div>____________________<br><br> Ana Gallardo Gómez<br>____________________<br>