[Pcsclite-cvs-commit] r3080 - /trunk/PCSC/src/pcscdaemon.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Wed Aug 6 09:07:58 UTC 2008
Author: rousseau
Date: Wed Aug 6 09:07:58 2008
New Revision: 3080
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3080
Log:
main(): call SYS_OpenFile() with the modes used by SYS_Chmod() and
remove useless SYS_Chmod() call
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=3080&op=diff
==============================================================================
--- trunk/PCSC/src/pcscdaemon.c (original)
+++ trunk/PCSC/src/pcscdaemon.c Wed Aug 6 09:07:58 2008
@@ -426,17 +426,16 @@
{
int f;
- if ((f = SYS_OpenFile(PCSCLITE_RUN_PID, O_RDWR | O_CREAT, 00644)) != -1)
+ /* set mode so that the file is world readable.
+ * The file is used by libpcsclite */
+ if ((f = SYS_OpenFile(PCSCLITE_RUN_PID, O_RDWR | O_CREAT,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) != -1)
{
char pid[PID_ASCII_SIZE];
snprintf(pid, sizeof(pid), "%u\n", (unsigned) getpid());
SYS_WriteFile(f, pid, strlen(pid));
SYS_CloseFile(f);
-
- /* set mode so that the file is world readable.
- * The file is used by libpcsclite */
- SYS_Chmod(PCSCLITE_RUN_PID, 0644);
}
else
Log2(PCSC_LOG_CRITICAL, "cannot create " PCSCLITE_RUN_PID ": %s",
More information about the Pcsclite-cvs-commit
mailing list