acct segfault in git v2.1.x

James J J Hooper jjj.hooper at bristol.ac.uk
Mon May 9 20:03:50 CEST 2011


On 09/05/2011 12:22, Alan DeKok wrote:
> Alexander Clouter wrote:
>> Updating to git's v2.1.x to go on a post-Easter bughunt and found the
>> following accounting packet[1] seems to segfault freeradius:
> ...
>> #1  0x403075d8 in fnmatch () from /lib/libc.so.6
>> #2  0x409da598 in do_detail (instance=0x114e50, request=0x43443240, packet=0x43446dd8, compat=<value optimized out>) at rlm_detail.c:301
>
>    Hmm... calling fnmatch() when the packet was *not* read from the
> detail file is a bad idea.  Oops.
>
>    On closer inspection, much of the logic in rlm_detail is broken.
>
>> If you need the FreeRADIUS -X malarkey, then do ask, it is just tricker
>> to get on a production box... :)
>
>    Nah.  I think the Feynman method is fine.
>
> 1) look at problem
> 2) think hard
> 3) write down solution
>
>    Give me a bit and I'll push a change to "git".

It now seems to create a *directory* with the name that should be the 
detail *file*...

custard radius # find ./ -type d
./
./radacct
./radacct/eduroamalien-soh-bsql
./radacct/vpi-soh-bsql
./radacct/eduroamlocal-soh-bsql
./radacct/nomadicvpn-bsql
./radacct/uobgear
./radacct/eduroamlocal-inner
./radacct/eduroamlocal-bsql
./radacct/vpi
./radacct/eduroamalien-inner
./radacct/eduroamlocal
./radacct/vpi-inner
./radacct/eduroamalien
./radacct/nomadicvpn
custard radius # killall -9 radiusd ; /usr/local/sbin/radiusd
custard radius # tail -n 0 -f radius*.log
<SNIP>
==> radiusd-eduroamlocal.log <==
Mon May  9 17:50:25 2011 : Error: [detail-bsql] rlm_detail: Couldn't open 
file /var/log/radius/radacct/eduroamlocal-bsql/detail-bsql.log: Is a directory
Mon May  9 17:50:25 2011 : Error: [detail-bsql] rlm_detail: Couldn't open 
file /var/log/radius/radacct/eduroamlocal-bsql/detail-bsql.log: Is a directory


ls -la also shows that radiusd has indeed created a directory with what 
should have been the file name.

module config:
custard radius # cat /usr/local/etc/serviceraddb/modules/detail-bsql | 
grep '[[:print:]]' | grep -v '#'
detail detail-bsql {
	detailfile = ${radacctdir}/%{%{Virtual-Server}:-UNKNOWN}-bsql/detail-bsql.log
	detailperm = 0600
	header = "%t"
}


-James




More information about the Freeradius-Users mailing list