lib: FILE_LOCK::lock() makes lockfile group-writable so both client and manager can create and write it under sandbox security

svn path=/trunk/boinc/; revision=18340
This commit is contained in:
Charlie Fenton 2009-06-09 18:46:47 +00:00
parent 09a2564058
commit dfc0bb3184
2 changed files with 8 additions and 1 deletions

View File

@ -5205,3 +5205,10 @@ Rom 9 June 2009
lib/
stackwalker_win.cpp
Charlie 9 June 2009
- lib: FILE_LOCK::lock() makes lockfile group-writable so both client and
manager can create and write it under sandbox security.
lib/
filesys.cpp

View File

@ -658,7 +658,7 @@ int FILE_LOCK::lock(const char* filename) {
}
#else
if (fd<0) {
fd = open(filename, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
fd = open(filename, O_WRONLY|O_CREAT, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH);
}
if (fd<0) {
return ERR_OPEN;