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