r20576 - gnucash/trunk/src/backend/xml - Bug #646729: Create the lockfile with at least read write user permissions

Christian Stimming cstim at code.gnucash.org
Thu Apr 21 06:54:39 EDT 2011


Author: cstim
Date: 2011-04-21 06:54:39 -0400 (Thu, 21 Apr 2011)
New Revision: 20576
Trac: http://svn.gnucash.org/trac/changeset/20576

Modified:
   gnucash/trunk/src/backend/xml/gnc-backend-xml.c
Log:
Bug #646729: Create the lockfile with at least read write user permissions

Patch by Jim Radford:

My backups fail when they attempt to read a GnuCash LCK or LNK file because
they are created without read permissions.  As best I can tell it can't hurt to
create them with user read permissions.

Modified: gnucash/trunk/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/trunk/src/backend/xml/gnc-backend-xml.c	2011-04-21 10:53:33 UTC (rev 20575)
+++ gnucash/trunk/src/backend/xml/gnc-backend-xml.c	2011-04-21 10:54:39 UTC (rev 20576)
@@ -131,7 +131,7 @@
         return FALSE;
     }
 
-    be->lockfd = g_open (be->lockfile, O_RDWR | O_CREAT | O_EXCL , 0);
+    be->lockfd = g_open (be->lockfile, O_RDWR | O_CREAT | O_EXCL , S_IRUSR | S_IWUSR);
     if (be->lockfd < 0)
     {
         /* oops .. we can't create the lockfile .. */



More information about the gnucash-changes mailing list