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

Clear more temporary file paths from env #5168

Merged
merged 1 commit into from
Nov 10, 2022
Merged

Clear more temporary file paths from env #5168

merged 1 commit into from
Nov 10, 2022

Conversation

Erick555
Copy link
Contributor

@Erick555 Erick555 commented Nov 6, 2022

This supplements clearing TMPDIR env variable which is only one among variables used for storing temporary files. Any of those leaking from host may confuse flatpak apps which try to save temporary files under non-existing directory in sandbox.

See flathub/com.logseq.Logseq#29 for real world example.

This supplements clearing TMPDIR env variable which is only one among variables used for storing temporary files. Any of those leaking from host may confuse flatpak apps which try to save temporary files under non-existing directory in sandbox.

See flathub/com.logseq.Logseq#29 for real world example.
@smcv
Copy link
Collaborator

smcv commented Nov 7, 2022

C++17 std::filesystem::temp_directory_path as implemented in GNU libstdc++ uses the four variables you mentioned here, so that seems like a reasonable justification for clearing all of them. Are there any other libraries you're targeting here?

@Erick555
Copy link
Contributor Author

Erick555 commented Nov 7, 2022

I'm not aware of other variables used for temporary files beside those listed here.

@smcv smcv merged commit d8695f3 into flatpak:main Nov 10, 2022
@Erick555 Erick555 deleted the patch-1 branch November 10, 2022 12:38
smcv added a commit that referenced this pull request Nov 17, 2022
smcv added a commit that referenced this pull request Nov 17, 2022
Signed-off-by: Simon McVittie <[email protected]>
smcv added a commit that referenced this pull request Nov 17, 2022
Signed-off-by: Simon McVittie <[email protected]>
(cherry picked from commit 26fbf69)
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.

None yet

2 participants