File descriptor leak in pam_winbind.so

Jelmer Vernooij jelmer at nl.linux.org
Thu Aug 29 07:56:00 GMT 2002


On Thu, Aug 29, 2002 at 07:49:22AM -0400, jra at dp.samba.org wrote about 'Re: File descriptor leak in pam_winbind.so':
> On Thu, Aug 29, 2002 at 05:44:51PM +0100, Paul Flinders wrote:
> >   	return retval;
> > + }
> > + 
> > + void __attribute__ ((destructor))  unload () 
> > + {
> > + 	/* Make sure socket is closed on unload of dll, some apps use PAM in
> > + 	   a manner which leaks FDs otherwise */
> > + 	close_sock();
> This is *horribly* non-portable I'm afraid. If you need this
> can you provide an autoconf test that will determine if this
> hideous construct (__attribute__ ((destructor))  unload ()) is
> supported on the current platform/compiler.
Afaik _fini does about the same but I'm not sure how portable that is
either...

Jelmer

-- 
Jelmer Vernooij <jelmer at nl.linux.org> - http://nl.linux.org/~jelmer/
Development And Underdevelopment: http://library.thinkquest.org/C0110231/
Listening to Error: The server (moosicd) doesn't seem to be running.
 18:54:37 up  3:39,  6 users,  load average: 0.04, 0.08, 0.08



More information about the samba-technical mailing list