Subject: Re: need for end*ent()?
To: John Nemeth <jnemeth@victoria.tc.ca>
From: Jason Thorpe <thorpej@shagadelic.org>
List: tech-security
Date: 09/14/2005 10:22:35
On Sep 13, 2005, at 10:29 PM, John Nemeth wrote:

>      I am working on libwrap to remove a reference to getgrnam().
> Immediately after the use of getgrnam(), it calls endgrent() (there is
> also a call to endpwent()).  I'm considering removing these in  
> order to
> reduce possible side effects on applications using the library.
> However, I'm wondering if they should be left to ensure database
> updates are seen in long running daemons as per this paragraph in the
> manpage:
>
>      It is dangerous for long-running programs to keep the file  
> descriptors
>      open as the database will become out of date if it is updated  
> while the
>      program is running.
>
> Does anybody else have any thoughts on this issue?

Uh, getgrnam() isn't defined to "require" and endgrent() after, is  
it??  I always throught it was for pairing with setgrent() /  
setgroupent().

-- thorpej