From 20729633608a88693d4f66835fc79d3452550c1d Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Sat, 10 Jun 2006 00:17:52 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=10293 --- checkin_notes | 5 +++++ client/main.C | 6 ++---- clientgui/BOINCGUIApp.cpp | 7 ++++++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/checkin_notes b/checkin_notes index 675d40abe9..f742b73147 100755 --- a/checkin_notes +++ b/checkin_notes @@ -5754,10 +5754,15 @@ Charlie 9 June 2006 - Changes for sandbox: Renamed global variable boinc_project_gid to g_boinc_project_gid. Change shared memory segment group to g_boinc_project_gid. + Set umask to 002 in both client and manager so files are writable + by both user and group. client/ app_start.C client_state.C,h client_types.C + main.C + clientgui/ + BOINCGUIApp.cpp lib/ shmem.C,h diff --git a/client/main.C b/client/main.C index 7785e4f5d9..df00aabe8c 100644 --- a/client/main.C +++ b/client/main.C @@ -345,10 +345,8 @@ static void init_core_client(int argc, char** argv) { #endif -#ifdef __APPLE__ - -// We have postponed implementing the umask change due to security concerns. -// umask(0); // Set file creation mask to make all files world-writable +#ifdef sandbox + umask (2); // Set file creation mask to be writable by both user and group // Our umask will be inherited by all our child processes #endif diff --git a/clientgui/BOINCGUIApp.cpp b/clientgui/BOINCGUIApp.cpp index 5afdae1295..a29b5aee54 100644 --- a/clientgui/BOINCGUIApp.cpp +++ b/clientgui/BOINCGUIApp.cpp @@ -241,6 +241,11 @@ bool CBrandingScheme::OnInit( wxConfigBase *pConfig ) { bool CBOINCGUIApp::OnInit() { +#ifdef sandbox + umask (2); // Set file creation mask to be writable by both user and group + // Our umask will be inherited by all our child processes +#endif + // Setup variables with default values m_bBOINCStartedByManager = false; m_bFrameVisible = true; @@ -249,7 +254,7 @@ bool CBOINCGUIApp::OnInit() { m_hBOINCCoreProcess = NULL; m_hClientLibraryDll = NULL; #endif - m_strDefaultWindowStation = wxT(""); + m_strDefaultWindowStation = wxT(""); m_strDefaultDesktop = wxT(""); m_strDefaultDisplay = wxT("");