Hello,<br><br>I've tested adding my vendor specific attributes to check list, and the problem persist.<br><br>Here is the debug info:<br><br>rad_recv: Access-Request packet from host x.x.x.x port 32880, id=4, length=75<br>
User-Name = "<a href="mailto:ana@unex.es">ana@unex.es</a>"<br> User-Password = "1111111"<br> Calling-Station-Id = "..."<br>...<br><br>[ldap1] performing user authorization for ana<br>
[ldap1] expand: %{Stripped-User-Name} -> ana<br>[ldap1] expand: (cn=%{%{Stripped-User-Name}:-%{User-Name}}) -> (cn=ana)<br>...<br> [ldap1] Bind was successful<br>...<br>[ldap1] looking for check items in directory...<br>
[ldap1] Relaciones -> Relaciones += "06"<br> [ldap1] Relaciones -> Relaciones += "01"<br> [ldap1] ntPassword -> NT-Password == 0x44...<br>[ldap1] looking for reply items in directory...<br>
[ldap1] sn -> Nombre-Completo = "Ana Gllardo"<br>...<br>[ldap1] user ana authorized to use remote access<br>...<br>rlm_perl: RAD_REQUEST: User-Name = <a href="mailto:ana@unex.es">ana@unex.es</a><br>rlm_perl: RAD_REQUEST: User-Password = 1111111<br>
rlm_perl: RAD_REQUEST: Intentos-Reject = 0<br>rlm_perl: RAD_REQUEST: SQL-User-Name = ana<br>rlm_perl: RAD_REQUEST: Realm = <a href="http://unex.es">unex.es</a><br>rlm_perl: RAD_REQUEST: Stripped-User-Name = ana<br>rlm_perl: RAD_REQUEST: Calling-Station-Id = ...<br>
rlm_perl: RAD_CHECK: NT-Password = 0x44...<br>rlm_perl: RAD_CHECK: Simultaneous-Use = 1<br>rlm_perl: RAD_CHECK: Relaciones = ARRAY(0x1d59618)<br>rlm_perl: RAD_CHECK: Ldap-UserDn = ...<br>rlm_perl: RAD_REREPLY: Nombre-Completo = Ana Gallardo<br>
rlm_perl: relacion: 06<br>rlm_perl: relacion: 01<br>rlm_perl: relacion: 0x44...<br><br>...<br><br>Finally, my solution was delete the undesired member from the hash. <br><br># cat /etc/freeradius/perl/checkRelaciones.pm <br>
#!/usr/bin/perl<br>use strict;<br>use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK);<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><br> &solucion_bug;<br> return &check_relaciones;<br>}<br><br>sub solucion_bug {<br> my $r;<br> my @array;<br><br> if (exists $RAD_CHECK{'Relaciones'} && defined $RAD_CHECK{'Relaciones'}){<br>
$r=$RAD_CHECK{'Relaciones'};<br> if (ref($r) eq "ARRAY") {<br> foreach (@{$r}) {<br> #&radiusd::radlog(1, "relacion: $_");<br> if ($_ =~ /^[0-9]{2}/) {<br>
push(@array, $_);<br> }<br> }<br> if ($#array > 0){<br> $RAD_REPLY{'Relaciones'}=\@array;<br> }<br> elsif ($#array == 0){<br> $RAD_REPLY{'Relaciones'}=$array[0];<br>
}<br> }<br> unless (ref($r)) {<br> #&radiusd::radlog(1, "relacion: $r");<br> if ($r =~ /^[0-9]{2}/) {<br> $RAD_REPLY{'Relaciones'}=$r;<br> }<br>
}<br>
delete($RAD_CHECK{'Relaciones'});<br> }<br>}<br><br>sub check_relaciones {<br>
my $r; <br>
<br>
if (exists $RAD_REPLY{'Relaciones'} && defined $RAD_REPLY{'Relaciones'}){<br>
return RLM_MODULE_OK;<br>
}<br>
else{<br>
$RAD_REPLY{'Codigo-Reject'}=11; #Sin-Relacion-UEX<br>
return RLM_MODULE_REJECT;<br>
}<br>
}<br>
<br><br>Thank you very much.<br><br><br><br>++++++++++++++++++++<br>++ Ana Gallardo Gómez ++<br>
++++++++++++++++++++<br>