mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1133] [discussion] allow to specify full path to the binary in private-bin #782
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#782
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 @msva on GitHub (Mar 7, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1133
private-bindoesn't allow to specify full path to the binary, but only it's name:Error: "/bin/env" is an invalid filenameBut it can lead to issues like this:
Here, it is happened because firejail copied
envfrom/usr/bin, where it resides for compatibility while actually it is installed (like entire coreutils) to /bin.And, mostly destructive: it can even be situation when it will copy the wrapper from
/usr/local/bin(which have bigger priority than even/usr/bin), but not the target binary which the wrapper actually calls...INB4: yes, it can (partially) be fixed by allowing to follow symlinks, but it:
@LaurentGH commented on GitHub (Aug 23, 2017):
Hello,
I faced the same problem with Ubuntu 16.04, where /usr/bin/which is a symlink to /bin/which. So, using "private-bin which" finds "which" in /usr/bin and adds the symlink to "which" in /bin mapped directory. The /bin directory thus contains a symlink named "which" pointing to "/bin/which" (itself). This creates a symlink loop, and does not work.
In order to solve this, I created a patch (attached), which allows to specify the full path, such as "private-bin /bin/which".
patch.txt