mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 22:01:33 -06:00
[GH-ISSUE #312] name2pid does not handle spaces #219
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#219
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 @Sidnioulz on GitHub (Feb 21, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/312
name2pid will automatically cut at the first space it encounters in a name, even though names are not checked for absence of spaces when the sandbox is launched.
I partially got around the issue by detecting if there is another option after the name, but there is no safe way to detect the name in situations like this:
firejail --name=some name firefox. See77428367aaSome additional solutions to make it more robust:
--option could be used to delineate the firejail options and command@netblue30 commented on GitHub (Feb 21, 2016):
Bug! Thanks.
@netblue30 commented on GitHub (Feb 21, 2016):
You need to put it in quotes:
or you can escape the blank space:
@Sidnioulz commented on GitHub (Feb 21, 2016):
There are a few situations where it's difficult to call Firejail that way, namely when using APIs like GDesktopAppInfo or GSpawn from the GLib, or when using any sort of desktop launchers that expect a full command line. In those situations, if you quote the name then Firejail will literally process the name as being
"Some name"rather thanSome name. Automatically unquoting arguments likely to have spaces would be another way to solve this issue.@ivan commented on GitHub (Feb 21, 2016):
FWIW
--name="some name"in a shell is the same as passing"--name=some name", maybe try that from GLib?@Sidnioulz commented on GitHub (Feb 21, 2016):
Brilliant, this syntax does the job. Nothing to fix then :-)
On 21 February 2016 at 17:44, Ivan Kozik notifications@github.com wrote:
Steve Dodier-Lazaro
PhD Student
University College London
Free Software Developer