mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3911] firecfg breaking firejail on the command line #2454
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#2454
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 @smitsohu on GitHub (Jan 22, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3911
Bug and expected behavior
Running
firejail applicationon a command line fails in certain circumstances. The problem occurs if a symbolic link to firejail was created in /usr/local/bin, for example by means offirecfg, and the sandbox is too restrictive to allow execution of a shell.Reproduce
Steps to reproduce the behavior. Options usually come from a profile but are passed on the command line here; gedit is an arbitrary example and could be anything:
sudo ln -s /usr/bin/firejail /usr/local/bin/geditfirejail --noprofile --private-lib --shell=none geditorfirejail --profile=/etc/firejail/disable-shell.inc --shell=none geditprivate-binrescues this, becausefirecfglinks in /usr/local/bin are maskedCommand 2 gives me
Command 3 gives me
Additional context / proposed fix
If Firejail is run inside a Firejail sandbox (run_no_sandbox), everything it does requires a shell. Would it be acceptable to remove this dependency and take the
--shell=nonecode path instead?Alternatively it should also work if the sandbox process, with
--shell=noneconfigured, searches the executable in $PATH, skips all these links created byfirecfgand then runs the program from an absolute path (rather than delegating the work toexecvp)@smitsohu commented on GitHub (Jan 26, 2021):
I think this way is better because programs in restrictive sandboxes would be still able to run third programs via firecfg symbolic links.