r20577 - gnucash/branches/2.4/src/backend/xml - [20576] Bug #646729: Create the lockfile with at least read write user permissions

Christian Stimming cstim at code.gnucash.org
Fri Apr 22 04:36:18 EDT 2011


Author: cstim
Date: 2011-04-22 04:36:17 -0400 (Fri, 22 Apr 2011)
New Revision: 20577
Trac: http://svn.gnucash.org/trac/changeset/20577

Modified:
   gnucash/branches/2.4/src/backend/xml/gnc-backend-xml.c
Log:
[20576] 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/branches/2.4/src/backend/xml/gnc-backend-xml.c
===================================================================
--- gnucash/branches/2.4/src/backend/xml/gnc-backend-xml.c	2011-04-21 10:54:39 UTC (rev 20576)
+++ gnucash/branches/2.4/src/backend/xml/gnc-backend-xml.c	2011-04-22 08:36:17 UTC (rev 20577)
@@ -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