-
Notifications
You must be signed in to change notification settings - Fork 739
SOLR-17800: Security Manager should handle symlink on /tmp #3359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, this makes total sense. My only thought is that it's adding a bit more complexity to this already incredibly complex script! If we removed Security Manager, would that obviate the need for this? And, if that statement is true, how can we make sure to back this change out in the future when that happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on a Mac and this fixes the issue. It seems that you also covered all places in the solr script, good job! 👍
Have you checked if the cross-dc-manager may be also affected by this bug? I never used the tool before to know how the script works.
@malliaridis From a quick look, I don't think cross-dc-manager sets the security manager so wouldn't be affected by this. |
https://issues.apache.org/jira/browse/SOLR-17800
Description
On Mac /tmp is a symlink and this causes issues with the Solr security manager. SOLR-16457 / #1282 fixed a similar issue with symlinks and the security manager. This applies the same type of solution but specifically for
java.io.tmpdir
to ensure that on Macs (and Linux) the full path is used not the symlink. This makes the security manager checking the path happy since its not trying to compare to a symlink anymore.This assumes that
TMPDIR
is already defined which looks like it is probably the case, but not 100% sure. Otherwise we fall back toTEMP
and thenTMP
and finally/tmp
. If someone wants to override the tmp dir they should setTMPDIR
and not try to just set-Djava.io.tmpdir...
References:
Checklist
Please review the following and check all that apply:
main
branch../gradlew check
.