mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4151] Unset TMP if it doesn't exist inside of sandbox #2553
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#2553
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @matthew-cline on GitHub (Mar 31, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4151
I have this weird setup where the
TMPenv var is set to/tmp/$USERand that directory is automatically created. This causes sandboxed apps to not work if the profile usesprivate-tmp, and the error messages the app generates aren't necessarily useful. I solved the problem by making a wrapper script forfirejailwhich unsets TMP, but other users might have TMP point to a non-standard location and have the sandboxed app not give them and useful error messages, leaving them confused frustrated.One way to solve the problem would be, if
TMPis set, to check if what it points to exists within the sandbox, and unset the var if it doesn't.@rusty-snake commented on GitHub (Mar 31, 2021):
We have already code for
TMP=/tmp/user/$UID, maybe this need further adjustments:0c1b99f4d8/src/firejail/fs_whitelist.c (L780-L796)Just add
rmenv TMPto<PROFILE>.local.