Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
00760b73
Commit
00760b73
authored
May 26, 2011
by
mattijs
Browse files
ENH: dynamicCode.C: check for permission even when restarting
parent
3ac90128
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/dynamicLibrary/dynamicCode/dynamicCode.C
View file @
00760b73
...
...
@@ -71,6 +71,27 @@ void Foam::dynamicCode::checkSecurity
<<
"using dlopen)"
<<
exit
(
FatalIOError
);
}
if
(
!
allowSystemOperations
)
{
FatalIOErrorIn
(
title
,
dict
)
<<
"Loading a shared library using case-supplied code is not"
<<
" enabled by default"
<<
nl
<<
"because of security issues. If you trust the code you can"
<<
" enable this"
<<
nl
<<
"facility be adding to the InfoSwitches setting in the system"
<<
" controlDict:"
<<
nl
<<
nl
<<
" allowSystemOperations 1"
<<
nl
<<
nl
<<
"The system controlDict is either"
<<
nl
<<
nl
<<
" ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict"
<<
nl
<<
nl
<<
"or"
<<
nl
<<
nl
<<
" $WM_PROJECT_DIR/etc/controlDict"
<<
nl
<<
endl
<<
exit
(
FatalIOError
);
}
}
...
...
@@ -400,26 +421,6 @@ bool Foam::dynamicCode::copyOrCreateFiles(const bool verbose) const
Info
<<
"Creating new library in "
<<
this
->
libRelPath
()
<<
endl
;
}
if
(
!
allowSystemOperations
)
{
FatalErrorIn
(
"dynamicCode::copyOrCreateFiles() const"
)
<<
"Loading a shared library using case-supplied code is not"
<<
" enabled by default"
<<
nl
<<
"because of security issues. If you trust the code you can"
<<
" enable this"
<<
nl
<<
"facility be adding to the InfoSwitches setting in the system"
<<
" controlDict:"
<<
nl
<<
nl
<<
" allowSystemOperations 1"
<<
nl
<<
nl
<<
"The system controlDict is either"
<<
nl
<<
nl
<<
" ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict"
<<
nl
<<
nl
<<
"or"
<<
nl
<<
nl
<<
" $WM_PROJECT_DIR/etc/controlDict"
<<
nl
<<
endl
<<
exit
(
FatalError
);
}
const
label
nFiles
=
compileFiles_
.
size
()
+
copyFiles_
.
size
();
DynamicList
<
fileName
>
resolvedFiles
(
nFiles
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment