File handle leak in single thread mode

Dale E. Reed Jr. (daler@iea.com)
Thu, 02 May 1996 10:03:06 -0700

Could somebody do me a favor and look at the Livingston 1.16 code,
specifically the users.c file. Trace a call into user_find() from
rad_authenticate and see if, in the situation where the user IS found,
if the userfd file descriptor is ever closed?

>From the tracing which I have done, user_read() is passed userfd, but
user_read ONLY closes the file if it hits the end of the file. It
returns normally without closing the file if it does find a user.
So in the instance where the user is found, user_read() does not
close the file, and nor does user_find.

If this instance was fork()'ed, the userfd will be closed when the
fork() ends, but in the case of a single threaded mode, it will
never be shut, and you run out of file handles.

Can someone PLEASE give me a sanity check here? This one thing has
been driving me up a wall, and tracing the user functions can be
a real pain at time becauses there is so many different ways to
go depending on the user data.

I appreciate any feedback given on this.

-- 
 Dale E. Reed Jr.  (daler@iea.com)
_____________________________________________________________________
 Internet Engineering Associates   |  RadiusNT, Emerald, and NT FAQs
  Internet Solutions for Today     |     http://www.iea.com/~daler