On 23/02/06, Najam Siddiqui <[EMAIL PROTECTED]> wrote: > SCardUnload() is hidden(not exported) in beta 10, I was wondering if there > would be issues if libpcsclite.so is loaded using dlopen or say a pam module > links with libpcsclite.so and on login the pam module is loaded and unloaded > using dlopen/dlclose, effectively libpcsclite.so will also be unloaded > without SCardUnload being called, would that result in leaks. > > Either we can add SCardUnload to functions to be called on unload using the > linker option -zfiniarray=SCardUnload or export SCardUnload.
SCardUnload is not part of winscard (Windows) API and then should not be exported. The correct solution would be to automatically call this function when the library is unload. I did not know the -zfiniarray=foo option and could not find an "official" documentation of it. Is it portable? Maybe a safer way to the use the same technique used by musclecard_fini() in /libmusclecard/src/musclecard.c Also note that calling this function may create problem as you noted in a previous patch [1] (see the comment in the SCardUnload() function). I don't know yet if this problem is real. Which solution do you prefer? Bye, [1] http://lists.drizzle.com/pipermail/muscle/2005-October/004405.html -- Dr. Ludovic Rousseau _______________________________________________ Muscle mailing list [email protected] http://lists.drizzle.com/mailman/listinfo/muscle
