Package: firejail
Version: 0.9.54-1
Severity: normal

Dear Maintainer,

firejail is supposed to automaticaly apply a profile when the profile name 
matches the binary's. This fails when the path used to run the binary contains 
spaces.

Example:
$ touch ~/.config/firejail/test.profile
$ cp /bin/ls /tmp/test
$ firejail --debug /tmp/test |& grep '[Cc]ommand\|profile'
Building quoted command line: '/tmp/test' 
Command name #test#
Found test profile in /home/jan/.config/firejail directory
...

So far so good, but

$ mkdir '/tmp/dir with spaces'
$ cp /bin/ls '/tmp/dir with spaces/test'
$ firejail --debug /tmp/dir\ with\ spaces/test |& grep '[Cc]ommand\|profile'
Reading profile /etc/firejail/default.profile
Building quoted command line: '/tmp/dir with spaces/test' 
Command name #dir#
Attempting to find default.profile...
Found default profile in /etc/firejail directory

Note the 'Command name' lines in the output. It works perfectly fine when you 
supply the profile via the --profile argument only the automatic detection is 
flawed. I checked the upstream bugtracker [1] but did not find anything related.

[1] https://github.com/netblue30/firejail/issues


Regards, Jan

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB 
(charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages firejail depends on:
ii  libapparmor1  2.12-5
ii  libc6         2.27-3

Versions of packages firejail recommends:
ii  firejail-profiles             0.9.54-1
ii  iptables                      1.6.2-1
ii  xauth                         1:1.0.10-1
pn  xpra | xserver-xephyr | xvfb  <none>

firejail suggests no packages.

-- no debconf information

Reply via email to