46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
Author: rousseau
|
|
Date: Tue May 19 14:43:56 2009
|
|
New Revision: 4213
|
|
|
|
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4213
|
|
Log:
|
|
main(): force access rights on /var/run/pcscd to be sure it can be used
|
|
by a libpcsclite client without privileges
|
|
|
|
Thanks to Sébastien Lorquet for the bug report
|
|
|
|
Modified:
|
|
trunk/PCSC/src/pcscdaemon.c
|
|
|
|
Modified: trunk/PCSC/src/pcscdaemon.c
|
|
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/pcscdaemon.c?rev=4213&op=diff
|
|
==============================================================================
|
|
--- trunk/PCSC/src/pcscdaemon.c (original)
|
|
+++ trunk/PCSC/src/pcscdaemon.c Tue May 19 14:43:56 2009
|
|
@@ -396,14 +396,20 @@
|
|
rv = SYS_Stat(PCSCLITE_IPC_DIR, &fStatBuf);
|
|
if (rv < 0)
|
|
{
|
|
- rv = SYS_Mkdir(PCSCLITE_IPC_DIR,
|
|
- S_IROTH | S_IXOTH | S_IRGRP | S_IXGRP | S_IRWXU);
|
|
+ int mode = S_IROTH | S_IXOTH | S_IRGRP | S_IXGRP | S_IRWXU;
|
|
+
|
|
+ rv = SYS_Mkdir(PCSCLITE_IPC_DIR, mode);
|
|
if (rv != 0)
|
|
{
|
|
Log2(PCSC_LOG_CRITICAL,
|
|
"cannot create " PCSCLITE_IPC_DIR ": %s", strerror(errno));
|
|
return EXIT_FAILURE;
|
|
}
|
|
+
|
|
+ /* set mode so that the directory is world readable and
|
|
+ * executable even is umask is restrictive
|
|
+ * The directory containes files used by libpcsclite */
|
|
+ (void)SYS_Chmod(PCSCLITE_IPC_DIR, mode);
|
|
}
|
|
|
|
/*
|
|
|
|
|
|
|