Hello Alan, and thank you for your response.<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;"> You can't really do that with "unlang". I suggest using the perl module.<br>
</blockquote><div><br><br>I flow your suggestion and write this:<br><br># cat /etc/freeradius/perl/checkRelaciones.pm <br><br>use strict;<br>use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK);<br>use Data::Dumper;<br><br>use constant RLM_MODULE_REJECT=> 0;# /* immediately reject the request */<br>
use constant RLM_MODULE_OK=> 2;# /* the module is OK, continue */<br><br>sub authorize {<br> my $attr;<br> my $valor;<br><br> while (($attr,$valor)= each(%RAD_REPLY{'Relaciones'}){<br> if ($valor =~ /^([0-9]{2})/) {<br>
return RLM_MODULE_OK;<br> }<br> }<br><br> return RLM_MODULE_REJECT;<br>}<br><br><br>and I use this in authorize section:<br><br>authorize{<br> ...<br> files<br> ...<br> perl<br>
expiration<br>
...<br>}<br><br>but, when I try to run freeradius in debug mode:<br>...<br> perl {<br> module = "/etc/freeradius/perl/checkRelaciones.pm"<br> func_authorize = "authorize"<br> func_authenticate = "authenticate"<br>
func_accounting = "accounting"<br> func_preacct = "preacct"<br> func_checksimul = "checksimul"<br> func_detach = "detach"<br> func_xlat = "xlat"<br> func_pre_proxy = "pre_proxy"<br>
func_post_proxy = "post_proxy"<br> func_post_auth = "post_auth"<br> func_recv_coa = "recv_coa"<br> func_send_coa = "send_coa"<br> }<br><br>Can't load '/usr/lib/perl/5.10/auto/Data/Dumper/Dumper.so' for module Data::Dumper: /usr/lib/perl/5.10/auto/Data/Dumper/Dumper.so: undefined symbol: Perl_sv_cmp at /usr/lib/perl/5.10/XSLoader.pm line 64.<br>
at /usr/lib/perl/5.10/Data/Dumper.pm line 36<br><br><br>So, I think thah I need to upgrade or something like this.<br><br>Thank you again. <br></div><br></div>____________________<br><br> Ana Gallardo Gómez<br>____________________<br>