mirror of https://github.com/BOINC/boinc.git
Mac Sandbox: check_security() writes path of bad file to stderr for some error codes
svn path=/trunk/boinc/; revision=18392
This commit is contained in:
parent
5f6f1fe8a6
commit
08c302746c
|
@ -5498,3 +5498,11 @@ David 11 June 2009
|
|||
html/inc/
|
||||
countries.inc
|
||||
forum.inc
|
||||
|
||||
Mac Sandbox: check_security() writes path of bad file to stderr for some
|
||||
error codes.
|
||||
|
||||
client/
|
||||
check_security.cpp
|
||||
clientgui/
|
||||
BOINCGUIApp.cpp
|
||||
|
|
|
@ -485,6 +485,7 @@ static int CheckNestedDirectories(char * basepath, int depth, int use_sandbox) {
|
|||
int retval = 0;
|
||||
DIR *dirp;
|
||||
dirent *dp;
|
||||
static int errShown = 0;
|
||||
|
||||
dirp = opendir(basepath);
|
||||
if (dirp == NULL) // Should never happen
|
||||
|
@ -572,6 +573,10 @@ static int CheckNestedDirectories(char * basepath, int depth, int use_sandbox) {
|
|||
|
||||
closedir(dirp);
|
||||
|
||||
if (retval && !errShown) {
|
||||
fprintf(stderr, "Permissions error %d at %s\n", retval, full_path);
|
||||
errShown = 1;
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
|
@ -247,6 +247,32 @@ bool CBOINCGUIApp::OnInit() {
|
|||
}
|
||||
|
||||
if (!success) iErrorCode = -1016;
|
||||
|
||||
// Initialize the BOINC Diagnostics Framework
|
||||
int dwDiagnosticsFlags =
|
||||
BOINC_DIAG_DUMPCALLSTACKENABLED |
|
||||
BOINC_DIAG_HEAPCHECKENABLED |
|
||||
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||
BOINC_DIAG_REDIRECTSTDERR |
|
||||
BOINC_DIAG_REDIRECTSTDOUT |
|
||||
#endif
|
||||
BOINC_DIAG_TRACETOSTDOUT;
|
||||
|
||||
diagnostics_init(
|
||||
dwDiagnosticsFlags,
|
||||
"stdoutgui",
|
||||
"stderrgui"
|
||||
);
|
||||
|
||||
|
||||
// Enable Logging and Trace Masks
|
||||
m_pLog = new wxLogBOINC();
|
||||
wxLog::SetActiveTarget(m_pLog);
|
||||
|
||||
m_pLog->AddTraceMask(wxT("Function Start/End"));
|
||||
m_pLog->AddTraceMask(wxT("Function Status"));
|
||||
|
||||
|
||||
#ifdef SANDBOX
|
||||
// Make sure owners, groups and permissions are correct for the current setting of g_use_sandbox
|
||||
|
@ -282,32 +308,6 @@ bool CBOINCGUIApp::OnInit() {
|
|||
}
|
||||
#endif // SANDBOX
|
||||
|
||||
// Initialize the BOINC Diagnostics Framework
|
||||
int dwDiagnosticsFlags =
|
||||
BOINC_DIAG_DUMPCALLSTACKENABLED |
|
||||
BOINC_DIAG_HEAPCHECKENABLED |
|
||||
BOINC_DIAG_MEMORYLEAKCHECKENABLED |
|
||||
#if defined(__WXMSW__) || defined(__WXMAC__)
|
||||
BOINC_DIAG_REDIRECTSTDERR |
|
||||
BOINC_DIAG_REDIRECTSTDOUT |
|
||||
#endif
|
||||
BOINC_DIAG_TRACETOSTDOUT;
|
||||
|
||||
diagnostics_init(
|
||||
dwDiagnosticsFlags,
|
||||
"stdoutgui",
|
||||
"stderrgui"
|
||||
);
|
||||
|
||||
|
||||
// Enable Logging and Trace Masks
|
||||
m_pLog = new wxLogBOINC();
|
||||
wxLog::SetActiveTarget(m_pLog);
|
||||
|
||||
m_pLog->AddTraceMask(wxT("Function Start/End"));
|
||||
m_pLog->AddTraceMask(wxT("Function Status"));
|
||||
|
||||
|
||||
// Enable known image types
|
||||
wxInitAllImageHandlers();
|
||||
|
||||
|
|
Loading…
Reference in New Issue