libexec/tftp-proxy: should to call endpwent()

2010-06-02 Thread Gleydson Soares
endpwent() here to close file descriptor opened by getpwnam(), since that all work with the password database was done. Index: tftp-proxy.c === RCS file: /cvs/src//libexec/tftp-proxy/tftp-proxy.c,v retrieving revision 1.6 diff -u

Re: libexec/tftp-proxy: should to call endpwent()

2010-06-02 Thread Theo de Raadt
endpwent() here to close file descriptor opened by getpwnam(), since that all work with the password database was done. But no file descriptor is open. setpassent() was never called to keep the fd open. It's even explained in the manual page. Index: tftp-proxy.c

Re: libexec/tftp-proxy: should to call endpwent()

2010-06-02 Thread Theo de Raadt
sure but make sense to remove bad examples in tree What bad examples? I've done this audit before. As far as I know, the endpwent()'s in the tree are all there because of setpwent() or setpassent() is called; or because of getpwent()'s instead of getpwnam()'s, and in situations where there is