Hi,

On linux if a program using the pcsc-lite client library (1.4.0) calls
another program via fork() and exec() then the child process inherits
a gratuitous file descriptor pointing at /var/run/pcscd.pub

This can easily be fixed by adding the close on exec flag to the file
descriptor when it is first opened.



--- src/winscard_clnt.c-orig    2007-02-05 16:48:13.000000000 +0000
+++ src/winscard_clnt.c 2007-02-26 13:59:32.000000000 +0000
@@ -324,6 +324,7 @@
                                PCSCLITE_PUBSHM_FILE);
                        return SCARD_E_NO_SERVICE;
                }
+               fcntl(mapAddr, F_SETFD, FD_CLOEXEC);
 
                pageSize = SYS_GetPageSize();
 
-- 
        Bob Dunlop
_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to