rlm_perl segfault
Grant Zanetti
radius at mani.ac.nz
Wed Mar 8 04:12:55 CET 2006
I've just tried to get the rlm_perl module working.
I'm running debian 3.1 with perl 5.8.8. I've tried installing the
prebuilt debian packages as well as from source with "dpkg-buildpackage
-rfakeroot -uc -b"
However after loading the module freeradius segfaults.
Freeradius config:
modules {
perl ipalloc {
module = /etc/freeradius/dynip.pl
func_accounting = accounting
func_post_auth = post_auth
}
}
post-auth {
ipalloc
}
When running freeradius I get
traffic:/etc/freeradius# freeradius -X
Starting - reading configuration files ...
reread_config: reading radiusd.conf
Config: including file: /etc/freeradius/proxy.conf
Config: including file: /etc/freeradius/clients.conf
Config: including file: /etc/freeradius/snmp.conf
Config: including file: /etc/freeradius/eap.conf
Config: including file: /etc/freeradius/sql.conf
main: prefix = "/usr"
main: localstatedir = "/var"
main: logdir = "/var/log/freeradius"
main: libdir = "/usr/lib/freeradius"
main: radacctdir = "/var/log/freeradius/radacct"
main: hostname_lookups = no
main: max_request_time = 30
main: cleanup_delay = 5
main: max_requests = 1024
main: delete_blocked_requests = 0
main: port = 0
main: allow_core_dumps = no
main: log_stripped_names = no
main: log_file = "/var/log/freeradius/radius.log"
main: log_auth = no
main: log_auth_badpass = no
main: log_auth_goodpass = no
main: pidfile = "/var/run/freeradius/freeradius.pid"
main: user = "freerad"
main: group = "freerad"
main: usercollide = no
main: lower_user = "no"
main: lower_pass = "no"
main: nospace_user = "no"
main: nospace_pass = "no"
main: checkrad = "/usr/sbin/checkrad"
main: proxy_requests = yes
proxy: retry_delay = 5
proxy: retry_count = 3
proxy: synchronous = no
proxy: default_fallback = yes
proxy: dead_time = 120
proxy: post_proxy_authorize = no
proxy: wake_all_if_all_dead = no
security: max_attributes = 200
security: reject_delay = 1
security: status_server = no
main: debug_level = 0
read_config_files: reading dictionary
read_config_files: reading naslist
Using deprecated naslist file. Support for this will go away soon.
read_config_files: reading clients
read_config_files: reading realms
radiusd: entering modules setup
Module: Library search path is /usr/lib/freeradius
Module: Loaded exec
exec: wait = yes
exec: program = "(null)"
exec: input_pairs = "request"
exec: output_pairs = "(null)"
exec: packet_type = "(null)"
rlm_exec: Wait=yes but no output defined. Did you mean output=none?
Module: Instantiated exec (exec)
Module: Loaded expr
Module: Instantiated expr (expr)
Module: Loaded PAP
pap: encryption_scheme = "crypt"
Module: Instantiated pap (pap)
Module: Loaded CHAP
Module: Instantiated chap (chap)
Module: Loaded MS-CHAP
mschap: use_mppe = yes
mschap: require_encryption = no
mschap: require_strong = no
mschap: with_ntdomain_hack = no
mschap: passwd = "(null)"
mschap: authtype = "MS-CHAP"
mschap: ntlm_auth = "(null)"
Module: Instantiated mschap (mschap)
Module: Loaded System
unix: cache = no
unix: passwd = "(null)"
unix: shadow = "/etc/shadow"
unix: group = "(null)"
unix: radwtmp = "/var/log/freeradius/radwtmp"
unix: usegroup = no
unix: cache_reload = 600
Module: Instantiated unix (unix)
Module: Loaded eap
eap: default_eap_type = "md5"
eap: timer_expire = 60
eap: ignore_unknown_eap_types = no
eap: cisco_accounting_username_bug = no
rlm_eap: Loaded and initialized type md5
rlm_eap: Loaded and initialized type leap
gtc: challenge = "Password: "
gtc: auth_type = "PAP"
rlm_eap: Loaded and initialized type gtc
mschapv2: with_ntdomain_hack = no
rlm_eap: Loaded and initialized type mschapv2
Module: Instantiated eap (eap)
Module: Loaded preprocess
preprocess: huntgroups = "/etc/freeradius/huntgroups"
preprocess: hints = "/etc/freeradius/hints"
preprocess: with_ascend_hack = no
preprocess: ascend_channels_per_line = 23
preprocess: with_ntdomain_hack = no
preprocess: with_specialix_jetstream_hack = no
preprocess: with_cisco_vsa_hack = no
Module: Instantiated preprocess (preprocess)
Module: Loaded realm
realm: format = "suffix"
realm: delimiter = "@"
realm: ignore_default = no
realm: ignore_null = no
Module: Instantiated realm (suffix)
Module: Loaded files
files: usersfile = "/etc/freeradius/users"
files: acctusersfile = "/etc/freeradius/acct_users"
files: preproxy_usersfile = "/etc/freeradius/preproxy_users"
files: compat = "no"
Module: Instantiated files (files)
Module: Loaded Acct-Unique-Session-Id
acct_unique: key = "User-Name, Acct-Session-Id, NAS-IP-Address,
Client-IP-Address, NAS-Port"
Module: Instantiated acct_unique (acct_unique)
Module: Loaded detail
detail: detailfile =
"/var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d"
detail: detailperm = 384
detail: dirperm = 493
detail: locking = no
Module: Instantiated detail (detail)
Module: Loaded radutmp
radutmp: filename = "/var/log/freeradius/radutmp"
radutmp: username = "%{User-Name}"
radutmp: case_sensitive = yes
radutmp: check_with_nas = yes
radutmp: perm = 384
radutmp: callerid = yes
Module: Instantiated radutmp (radutmp)
Module: Loaded perl
perl: module = "/etc/freeradius/dynip.pl"
perl: func_authorize = "authorize"
perl: func_authenticate = "authenticate"
perl: func_accounting = "accounting"
perl: func_preacct = "preacct"
perl: func_checksimul = "checksimul"
perl: func_detach = "detach"
perl: func_xlat = "xlat"
perl: func_pre_proxy = "pre_proxy"
perl: func_post_proxy = "post_proxy"
perl: func_post_auth = "post_auth"
perl: perl_flags = "(null)"
perl: func_start_accounting = "(null)"
perl: func_stop_accounting = "(null)"
Segmentation fault
The file "/etc/freeradius/dynip.pl" exists and is readable but the
segfault is the same whether it exists or not.
This is the output from gdb
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1210271424 (LWP 866)]
0xb7c12ca2 in Perl_hv_clear_placeholders () from /usr/lib/libperl.so.5.8
(gdb) bt
#0 0xb7c12ca2 in Perl_hv_clear_placeholders ()
from /usr/lib/libperl.so.5.8
#1 0xb7c13369 in Perl_hv_delayfree_ent () from /usr/lib/libperl.so.5.8
#2 0xb7c142cc in Perl_hv_fetch () from /usr/lib/libperl.so.5.8
#3 0xb7bbf7ba in Perl_gv_fetchpv () from /usr/lib/libperl.so.5.8
#4 0xb7bbc14a in Perl_my_failure_exit () from /usr/lib/libperl.so.5.8
#5 0xb7bbe97d in perl_parse () from /usr/lib/libperl.so.5.8
#6 0xb7cbcd5d in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
#7 0x0812e590 in ?? ()
#8 0xb7cbc130 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
#9 0x00000003 in ?? ()
#10 0xbffa29b0 in ?? ()
#11 0x00000000 in ?? ()
#12 0x0812e590 in ?? ()
#13 0xb7cc0060 in rlm_perl () from /usr/lib/freeradius/rlm_perl-1.1.0.so
#14 0xb7cc0350 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
#15 0xb7b99618 in ?? () from /usr/lib/libperl.so.5.8
#16 0xb7cc0344 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
#17 0x0811a9e8 in ?? ()
#18 0x08119c68 in ?? ()
#19 0x00000000 in ?? ()
#20 0x0812e4c8 in ?? ()
#21 0xb7cbf6a0 in ?? () from /usr/lib/freeradius/rlm_perl-1.1.0.so
#22 0x08050455 in log_debug ()
#23 0x08055332 in find_module_instance ()
#24 0x08056a4f in modcallable_free ()
#25 0x080559e4 in setup_modules ()
#26 0x0804cd80 in main ()
I have tried with perl 5.8.4 with the same result.
Any help would be appreciated. I'm not sure how to get more debug out
of freeradius with gdb.
More information about the Freeradius-Users
mailing list