[SSSD] [PATCH] Fix FD leak in pam_sss.so

Jakub Hrozek jhrozek at redhat.com
Fri Jul 29 07:57:40 UTC 2011


On 07/28/2011 09:23 PM, Simo Sorce wrote:
> Attached patch that makes sure we alays close the socket on modeule
> unloading.
> It is defined in common.c so all clients that use that file get it, so
> nss_sss.so has it as well.
> 
> Ticket #942
> 
> Simo.
> 
> 

I was getting warnings from autoreconf with the patch. I had to do 2
adjustments to get rid of them:
1) add a _cv_ into the cache variable name
2) wrap the source into a AC_LANG_SOURCE() macro.

Feel free to squash in the attached patch.

While the __destructor__ attribute is GCC-specific, I tested that LLVM
supports it as well.

One question, though - while this ensures that we always call the close
function when the module is unloaded, do we still have a bug in the code
where it's possible that a codepath that should call the close function
explicitly does not?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Silence-autoconf-2.28-warnings.patch
Type: text/x-patch
Size: 1319 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20110729/73d6476a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20110729/73d6476a/attachment.sig>


More information about the sssd-devel mailing list