Ascend Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (ASCEND) Patch: radiusd uses db library



On Mon, Nov 10, 1997 at 03:04:00PM +0100, Erik Heinz wrote:
> 
> Ascend's radius daemon linked with the dbm library appearantly has
> a locking problem due to an exclusive read lock when accessing the dbm file.

Yeah, correct. Took me awhile strace(8)'ing the damn thing to find out
why it suddenly thinks no users file would be present.

> At least with Linux and GNU dbm this prevents quasi-simultaneous queries
> which lead to "Couldn't open /etc/raddb/users for reading..." errors.

While fork(2)'ing just to answer a small simple radius query is not
the best of ideas, I actually had to use forking on Linux - radiusd
crashes there far too often to be stable in nonforking mode (occasionally
on every request, but after sending the answer - when it tries to free
its data structures).

> To overcome this problem I have patched radiusd to use the Berkeley db
> library instead of dbm. Morever, db is faster than dbm.
> 
> Anyone who likes to test this may download the patch at:
> ftp://ftp.iks-jena.de/pub/mitarb/erik/admin/radius-ascend.diff.971110.gz 
> 
> This patch is against radius-970814.tar.gz.
> Simply by typing 'make db' you get a radiusd linked with libdb and the
> program 'builddb' to create the file users.db.

Thats great, I'll look into it soon.

Now we should challenge the next problem: a configurable output format
for radius accounting. I have patched my radiusd in order to get a more
civilized one-line output (called "summary") instead of the fat and
overspecific "detail" output that radiusd provides by default (and that
looks to me like an intermediate solution that never made it complete).
But this patch is also nothing but a hack, changing the output to any-
thing different (even adding a field) is code-change and recompile. So
it would be great to have an option to adapt the log format to any
personal need, f.i.:

"%t %Acct-Status-Type %User-Name %Acct-Session-Time %Acct-Input-Octets\
 %Acct-Output-Octets %Framed-Address\n"

to generate the format I'm currently using (with %t beeing a timestamp
in Unix epoch format). It should be possible to resemble the old
format as well (maybe "%O") and make that the default so everyone
is pleased - even if they are using "detail" log at the moment (which
is a hell to parse).

Anyone with enough time to code this ?

Thanks,
Andre.
-- 

Kanther-Line: PGP SSH IDEA MD5 GOST RIPE-MD160 3DES RSA FEAL32 RC4

+-o-+--------------------------------------------------------+-o-+
| o |               \\\- Brain Inside -///                   | o |
| o |                   ^^^^^^^^^^^^^^                       | o |
| o | Andre' Beck (ABPSoft) beck@ibh-dd.de XLink PoP Dresden | o |
+-o-+--------------------------------------------------------+-o-+
++ Ascend Users Mailing List ++
To unsubscribe:	send unsubscribe to ascend-users-request@bungi.com
To get FAQ'd:	<http://www.nealis.net/ascend/faq>


References: