mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1819] unexpected behavior when jails have the same name ? #1237
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#1237
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 @thiswillbeyourgithub on GitHub (Mar 17, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1819
Hi,
I think I just found an issue : you can create several jails with the same name without seeing any warning.
Here's how to replicate it :
1 -
firejail --name=test --privatethis creates a jail inside the terminal.2 - then in another terminal
firejail --name=test --privatethis creates another jail in another terminal but with the same name, without any warning that I'm aware of.3 - I also noticed that doing
firejail --join=testjoined without warning or error the first jail.I think a better behavior would be to issue a warning and automatically append a "-n" to the jail name (here it would be
test-2) or at least to output a warning when trying to join an ambiguously named jail.This problem could be a real issue for users that frequently generate jails with a keyboard shortcut (I use private jail all the time to generate unaltered firefox profile for "regular browsing" with
firejail --private firefox -no-remote -privatefor instance).@startx2017 commented on GitHub (Mar 17, 2018):
This is a bug, I'll fix it. Thanks!
@thiswillbeyourgithub commented on GitHub (Mar 23, 2018):
I don't understand. This does not actually fix the issue but is just a workaround.
You can't know which jail's PID is the one you want to use short of joining the jail and looking inside. This makes scripting with jails really hard too.
Am I missing something ?
@startx2017 commented on GitHub (Mar 23, 2018):
Try to use the PID number instead of the name of the sandbox - @netblue30 put some fixes, also I found some bugs with the name resolution. You don't need to update to the latest version in git, it doesn't affect you.
$ firejail --list
7906:startx:test:firejail --name=test
7915:startx:test:firejail --name=test
7924:startx:test:firejail --name=test
$ firejail --shutdown=7915 # shutdonw second instance
@startx2017 commented on GitHub (Mar 23, 2018):
It is a workaround until the real fix comes in. However, the numbers go up and you can tell what the order is.
@thiswillbeyourgithub commented on GitHub (Mar 23, 2018):
Oh okay I thought this was the actual fix or something. I'll use the workaround in the mean time. Thanks for taking the time :) !
@startx2017 commented on GitHub (Mar 23, 2018):
No problem.
@netblue30 commented on GitHub (Mar 24, 2018):
All set in git. You''ll get a name,name-1,name-2 up to name-9. After that it will just add the sandbox pid (name-PID). All of them reported properly in "firejail --list". Let us know if you run into problems, quite a number of fixes went into this one. Thanks!