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.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20576 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2011-04-21 10:54:39 +00:00
parent 9f747d167f
commit b5674ed490

View File

@ -131,7 +131,7 @@ gnc_xml_be_get_file_lock (FileBackend *be)
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 .. */