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:
� � � � perl macauth {
� � � � � � � � func_authenticate = authenticate
� � � � � � � � func_authorize = authorize
� � � � � � � � func_detach = detach
� � � � � � � � module = [path_to_script]/auth.pl
� � � � }

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 �{
}

sub authorize {
}

sub detach {
}

&detach;

---8<---
but you must rember about returing good values from authorize and authenticate 
( look at example.pl in freeradius source directory or in raddb )

-- 
Jakub Wartak
-vnull
FreeBSD/OpenBSD/Linux/Network Administrator

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

Reply via email to