Re: rlm_perl DEBUG log with garbage output

This is a discussion on Re: rlm_perl DEBUG log with garbage output within the FreeRADIUS Users forums, part of the Networking and Network Related category; It's work!!.. thanks.. --haizam ----- Original Message ----- From: "Bjørn Mork" <bjorn@mork.no> To: "...


Go Back   Usenet Forums > Networking and Network Related > FreeRADIUS Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-26-2007
Rohaizam Abu Bakar
 
Posts: n/a
Default Re: rlm_perl DEBUG log with garbage output

It's work!!.. thanks..

--haizam

----- Original Message -----
From: "Bjørn Mork" <bjorn@mork.no>
To: "FreeRadius users mailing list" <freeradius-users@lists.freeradius.org>
Sent: Thursday, January 25, 2007 6:05 PM
Subject: Re: rlm_perl DEBUG log with garbage output


"Rohaizam Abu Bakar" <haizam@myjaring.net> writes:

> Hi,..
>
> running xlat within rlm_perl.. giving correct result.. but what concern
> me is that.. in debug log.. there are garbage output as below:-
>
>
> radius_xlat: '.*'
> radius_xlat: Running registered xlat function of module y5perl for string
> '%{User-Name}:%{NAS-Identifier}'
> radius_xlat: 'bacang:JARINGWiF'
> rlm_perl: Len is 4 , out is NULL?8???Ù¿¿?49(hÕ¿¿?? freespace is 254
> radius_xlat: 'NULL'



Try this patch:




--------------------------------------------------------------------------------


> diff -u -r1.13.4.7 rlm_perl.c
> --- src/modules/rlm_perl/rlm_perl.c 27 Apr 2006 17:35:44 -0000 1.13.4.7
> +++ src/modules/rlm_perl/rlm_perl.c 25 Jan 2007 10:03:51 -0000
> @@ -694,7 +694,7 @@
> } else if (count > 0) {
> tmp = POPp;
> ret = strlen(tmp);
> - strncpy(out,tmp,ret);
> + strncpy(out,tmp,ret+1);
>
> radlog(L_DBG,"rlm_perl: Len is %d , out is %s freespace is %d",
> ret, out,freespace);
>



--------------------------------------------------------------------------------





Bjørn



--------------------------------------------------------------------------------


>-
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:44 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0