Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file profile not working with 'private-bin file' #2160

Closed
glitsj16 opened this issue Oct 11, 2018 · 0 comments · Fixed by #2161
Closed

file profile not working with 'private-bin file' #2160

glitsj16 opened this issue Oct 11, 2018 · 0 comments · Fixed by #2161

Comments

@glitsj16
Copy link
Collaborator

Hi, I'm unable to sandbox file, seems like private-bin is the culprit, at least on Arch:

$ grep "private-bin" /etc/firejail/file.profile
private-bin file

$ firejail --ignore=quiet --profile=/etc/firejail/file.profile /usr/bin/file /usr/bin/whoami
Reading profile /etc/firejail/file.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-passwdmgr.local
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-programs.local
Parent pid 5081, child pid 5082

Warning: skipping magic.mgc for private /etc
Warning: skipping magic for private /etc
Private /etc installed in 2.06 ms
1 program installed in 2.13 ms
Standard C library installed in 73.93 ms
Program libraries installed in 10.30 ms
Installed 22 libraries and 2 directories
Blacklist violations are logged to syslog
Child process initialized in 205.49 ms
/usr/bin/whoami: cannot open '/usr/bin/whoami' (No such file or directory)

Parent is shutting down, bye...

$ sudo sed -i -e 's/private-bin/#private-bin/' /etc/firejail/file.profile
$ grep "private-bin" /etc/firejail/file.profile
#private-bin file

$ firejail --ignore=quiet --profile=/etc/firejail/file.profile /usr/bin/file /usr/bin/whoami
Reading profile /etc/firejail/file.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-passwdmgr.local
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-programs.local
Parent pid 7943, child pid 7944

Warning: skipping magic.mgc for private /etc
Warning: skipping magic for private /etc
Private /etc installed in 6.09 ms
Standard C library installed in 84.32 ms
Program libraries installed in 8.01 ms
Installed 22 libraries and 2 directories
Blacklist violations are logged to syslog
Child process initialized in 262.12 ms
/usr/bin/whoami: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=5c1def743247c5347791fda4fe51bcf76ead91ec, stripped

Working on a PR, regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant