Bluehost.com Web Hosting $6.95

Re: rlm_perl and perl modules

This is a discussion on Re: rlm_perl and perl modules within the FreeRADIUS Users forums, part of the Networking and Network Related category; On Tuesday 19 April 2005 11:03, Emil Wilmanski wrote: > Hi, > > Can I use any perl modules ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2005
Jakub Wartak
 
Posts: n/a
Default Re: rlm_perl and perl modules

On Tuesday 19 April 2005 11:03, Emil Wilmanski wrote:
> Hi,
>
> Can I use any perl modules in rlm_perl script?


Yes, you can.

> I try to use DBI and I get
>
> freeradius: relocation error: /usr/lib/perl5/auto/DBI/DBI.so: undefined
> symbol: Perl_Gthr_key_ptr
>
> I try to use Socket and I get
>
> freeradius: relocation error: /usr/lib/perl/5.8/auto/Socket/Socket.so:
> undefined symbol: Perl_Tstack_sp_ptr
>
> I'm using Debian with perl 5.8.4
> DBI 1.46 (but I tested with newest end older)


It works for me(c) on:
a) FreeBSD 5.x
b) OpenWall Linux
c) Slackware Linux 10.0 & 10.1

simple snippet from radiusd.conf:
=A0 =A0 =A0 =A0 perl macauth {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 func_authenticate =3D authenticate
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 func_authorize =3D authorize
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 func_detach =3D detach
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 module =3D [path_to_script]/auth.pl
=A0 =A0 =A0 =A0 }

simple parts from auth.pl:
#!/usr/bin/perl -W

use strict;
use vars qw(%RAD_REQUEST %RAD_REPLY %RAD_CHECK);
use Data::Dumper;

# your code here
sub authenticate =A0{
}

sub authorize {
}

sub detach {
}

&detach;

=2D--8<---
but you must rember about returing good values from authorize and authentic=
ate=20
( look at example.pl in freeradius source directory or in raddb )

=2D-=20
Jakub Wartak
=2Dvnull
=46reeBSD/OpenBSD/Linux/Network Administrator

-
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 07:04 PM.


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