mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #907] firejail --join does not inherit environment #615
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#615
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 @pyamsoft on GitHub (Nov 11, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/907
Originally assigned to: @chiraag-nataraj on GitHub.
Using firejail 0.9.44
If I launch a jail with, for example, the following command:
A new jail is launched running bash. When echoing the PATH in this jail instance, it is as expected
However, when I attempt to join this jail using
firejail --join=<pid>, echoing the PATH returns the PATH of the real machine, not the jail itself. This inconsistency also applies to any other environment variables set via the --env or env in profiles in firejail. This means that a custom environment variable likewill appear in the initially launched jail, but will not be available if you join the jail from somewhere else. It seems like when joining a jail instance, the --env variables are not re-applied to the joined instance.
I believe this behavior to be a bug.
@netblue30 commented on GitHub (Nov 12, 2016):
I'll bring a fix in, thanks.
@chiraag-nataraj commented on GitHub (Aug 21, 2018):
@netblue30 This still appears to be around.
@chiraag-nataraj commented on GitHub (May 21, 2019):
Hmm, this is still an issue.
@chiraag-nataraj commented on GitHub (May 23, 2019):
So default environment variables are being applied, but the issue is that there's no way to know a priori what environment variables need to be set again...
start_applicationdoes aenv_defaults(); env_apply(), which sets up the default environment variables and then applies them.