Skip to content
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

Set temp directory when using shell #4900

Closed
wants to merge 1 commit into from

Conversation

ddanielr
Copy link
Contributor

JLine creates a .so and a .so.lck file when interactively prompting the user for input.
The .so file needs execute permissions to function correctly.

jlinenative-3.25.1-164e07369eff3578-libjlinenative.so
jlinenative-3.25.1-164e07369eff3578-libjlinenative.so.lck

However, these files go in the directory set by java.io.tmpdir which is typically /tmp or /var/tmp and is commonly set with noexec to conform with security best practices.
https://www.stigviewer.com/stig/red_hat_enterprise_linux_8/2023-12-01/finding/V-230513

This prevents Jline from functioning correctly and breaks the shell.

Instead, we can use accumulo's /run directory for these temp files as it is used for ephemeral .pid files already.

JLine creates a executable file when interactively prompting the user
for password input.

Override `java.io.tmpdir` to a known directory that allows for execute permissions.
@ddanielr ddanielr added this to the 2.1.4 milestone Sep 18, 2024
@ddanielr
Copy link
Contributor Author

I was able to remove the execute permission in the jline code and have the shell function correctly.

Opened a PR to get that change merged upstream jline/jline3#1081.
Closing this for now.

@ddanielr ddanielr closed this Sep 27, 2024
@ctubbsii ctubbsii removed this from the 2.1.4 milestone Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants