Issues with rlm_perl in 3.0.2

Sorin Pop sorin.pop at certcore.com
Sun Apr 6 23:22:30 CEST 2014


Hi
   I wanted to ask if anyone came across this problem. I got freeradius
3.0.2 and enabled the perl module. and after fiddling with it I found some
issues

the change that I made was to example.pl by doing this

---
# Function to handle authenticate
sub authenticate {
    my $memcache_key = $RAD_REQUEST{'User-Name'};

    open( my $fh, '>', '/tmp/x2' );
    print $fh $memcache_key;
    close( $fh );
    return RLM_MODULE_OK;
}
---

and I was expecting to get the username in /tmp/x2 file but instead I got
this

---
[root at radius perl]# cat /tmp/x2
this_is_my_user_but_what_is_this pc|wo
▒"
   ▒▒;▒▒;▒▒;▒▒;▒{▒
                  ;b ▒4b|wn''▒▒;        0▒}▒ٞd▒▒;0▒}
▒▒;▒▒;P▒}▒.▒dUNIVERSAL::Ğd(▒▒▒@c@ pc|,,▒.▒d
 ▒▒0▒}▒ٞd▒1[|wn(▒▒▒▒▒▒P
                       ▒.▒d0▒}p
z▒▒2b`{▒{▒Qba▒▒▒▒b▒2b0▒}P▒▒▒▒b
▒"@▒▒
      ▒▒▒P▒}
            0▒}▒2b▒2b▒{▒▒2b;b0
Z<b0▒}0▒}
---

the user that I tested with is: "this_is_my_user_but_what_is_this". I
tested it with different lengths of usernames and it seems to be a leak
somewhere as the returns jumps around

so unless I am doing something completely wrong, this might be an issue
with the way the variables are passed on.

The odd thing is that if I use the internal debugger the strings seem to be
correct.

Kind Regards,
Sorin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/mailman/private/freeradius-devel/attachments/20140407/b28b986d/attachment.html>


More information about the Freeradius-Devel mailing list