mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #703] When using non-default shell, FireJail shouldn't throw an error if Bash is missing inside the chroot #480
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#480
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 @nuxwin on GitHub (Aug 12, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/703
We use FireJail on top of our jail builder (MakeJail) to isolate our restricted shells. We use makejail to create the chroot and then, we set the login shell to
/usr/local/bin/firejail. Depending on the chroot configuration, we can havebusyboxinside our chroot or bash. We tells firejail to use the correct shell using the--shelloption in the login.users file. For instance:The problem is that if we use busybox (ASH) without copying bash inside the chroot, FireJail throws an error. This shouldn't occurs.
Thank you.
@manevich commented on GitHub (Aug 12, 2016):
Can you provide more detail about error? Which version of firejail you are using?
firejail --shell=/bin/shworks for me on busybox system without/bin/bash.@nuxwin commented on GitHub (Aug 12, 2016):
@manevich
I used latest release:
I've created a chroot with makejail script and I've done some bind mounts as usually. I copied the
busyboxbinary inside the chroot and created a symlink on it (/bin/ash to /bin/busybox ) inside the chroot. Then, I've set the--shelloption to/bin/ash(not /bin/sh) but this should not change anything. In the chroot, I've not copied/bin/bash(expected since I want only ASH).The problem is that when login through SSH, firejail throws an error because
/bin/bashis missing inside the chroot. If I copy it, that works as expected and login shell is ASH as expected...I'll reproduce the problem and show you the exact output in few minutes.
@nuxwin commented on GitHub (Aug 12, 2016):
@manevich
Exact output:
my passwd entry for the
nuxwinuser is as follow:My
login.usersfile is as follow:The
/bindirectory of the chroot (seen from outside) is as follow:Info about my environment:
@manevich commented on GitHub (Aug 12, 2016):
Thanks, found it https://github.com/netblue30/firejail/blob/master/src/firejail/fs.c#L1114
This is a bug.
Will look at it latter.
@nuxwin commented on GitHub (Aug 12, 2016):
@manevich
Thank you so much ;)
@netblue30 commented on GitHub (Aug 13, 2016):
Fixed on master branch, thanks for the bug.