[Pcsclite-cvs-commit] r2449 - trunk/PCSC/src

Ludovic Rousseau rousseau at alioth.debian.org
Mon Feb 26 15:48:27 CET 2007


Author: rousseau
Date: 2007-02-26 15:48:27 +0100 (Mon, 26 Feb 2007)
New Revision: 2449

Modified:
   trunk/PCSC/src/winscard_clnt.c
Log:
SCardEstablishContextTH(): call fcntl(mapAddr, F_SETFD, FD_CLOEXEC); to
close on exec the file descriptor on /var/run/pcscd.pub so that child
processes do not inherits it. The child process will call
SCardEstablishContext() if needed.


Modified: trunk/PCSC/src/winscard_clnt.c
===================================================================
--- trunk/PCSC/src/winscard_clnt.c	2007-02-26 07:37:06 UTC (rev 2448)
+++ trunk/PCSC/src/winscard_clnt.c	2007-02-26 14:48:27 UTC (rev 2449)
@@ -325,6 +325,11 @@
 			return SCARD_E_NO_SERVICE;
 		}
 
+		/* close on exec so that child processes do not inherits the file
+		 * descriptor. The child process will call SCardEstablishContext()
+		 * if needed. */
+		fcntl(mapAddr, F_SETFD, FD_CLOEXEC);
+
 		pageSize = SYS_GetPageSize();
 
 		/*




More information about the Pcsclite-cvs-commit mailing list