mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3354] Option --quiet suppresses important warnings #2105
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#2105
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 @rdiez on GitHub (Apr 14, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3354
Option --quiet is simply documented as follows: Turn off Firejail's output.
Without this option, Firejail is too verbose:
------8<------8<------8<------
$ firejail --noprofile sh -c "echo a"
^[]0;firejail sh -c echo a ^Ga
Parent pid 21368, child pid 21369
Parent is shutting down, bye...
------8<------8<------8<------
Note the "^[]0;" at the beginning: Those are escape characters for some terminal. And the same with "^Ga" at the end.
Firejail should at least check whether STDOUT is a terminal before outputting such colour or terminal codes. Otherwise, the output looks weird in a log file.
Other tools like Git offer more control, see for example:
git -c color.ui=always status
I am using Ubuntu 18.04.4 LTS, which comes with Firejail version 0.9.52, a rather old version indeed. So maybe this has already been improved.
In any case, because the output looks ugly, I started using --quiet . The trouble is, Firejail stops outputting warnings like these:
Warning: you are not allowed to change /tmp to read-write
Warning: cannot create a new user namespace, going forward without it...
If some option is not working correctly, and you specified --quiet , you may never realise. Firejail needs an option to suppress unnecessary banners, echoing the command to run, and otherwise unimportant information, but such warnings should still be output.
@ghost commented on GitHub (Apr 14, 2020):
You can get the latest stable release from the firejail PPA. I'm not implying that there isn't any room for improvement with regards to firejail's verbosity/error handling, but it would be handy if you can confirm these issues are still present on the latest stable release.
@rdiez commented on GitHub (Apr 15, 2020):
I have created a separate issue #3356 for the terminal control codes.
@rdiez commented on GitHub (Apr 15, 2020):
As requested, I have tested the following with the latest Firejail release version 0.9.62. I am using Ubuntu 18.04.4 LTS, so that new version came from the mentioned PPA.
firejail --noprofile --read-write=/tmp sh -c "echo a"issues warning:
Warning: you are not allowed to change /tmp to read-writeAdding option --quiet silences the warning. As I said, I think that should not happen.
firejail --noprofile --blacklist=/ --noroot sh -c "echo a"issues warning:
Warning: cannot create a new user namespace, going forward without it...Adding option --quiet silences the warning. This is more serious than case (1), because a protection is being skipped.
@rusty-snake commented on GitHub (Apr 15, 2020):
quietis for programs which can pipe data over stdout to an other program where firejails you will break.Solutions:
@rdiez commented on GitHub (Apr 15, 2020):
I would print warnings to stderr by default. Not many people have a habit of looking at syslog when running commands.