-
Notifications
You must be signed in to change notification settings - Fork 595
modif: Stop forwarding own double-dash to the shell #5600
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
Conversation
Currently, if double-dash ("--") is passed to firejail, it is forwarded to the user shell: $ firejail --debug --noprofile -- echo test 2>&1 | grep -e execvp -e test Building quoted command line: 'echo' 'test' Building quoted command line: 'echo' 'test' Running 'echo' 'test' command through /bin/bash execvp argument 0: /bin/bash execvp argument 1: -c execvp argument 2: -- execvp argument 3: 'echo' 'test' test This causes issues when the user shell does not accept "--" / is not POSIX-compatible: $ /bin/bash -c -- 'echo test' test $ /bin/fish -c -- 'echo test' fish: Unknown command: -- fish: -- ^ Fixes netblue30#5599. Relates to netblue30#3434. Reported-by: @iltep64 Reported-by: @ferreum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
To expand on the rationale: I think that firejail should either always or never pass Always passing
Though that would break running shell commands directly (such as with Also, it seems that the first operand is always
Which seems rather unlikely. So this PR does the opposite and changes firejail to never call the shell with |
merged! |
Currently, if double-dash ("--") is passed to firejail, it is forwarded
to the user shell:
This causes issues when the user shell does not accept "--" / is not
POSIX-compatible:
Fixes #5599.
Relates to #3434.
Reported-by: @iltep64
Reported-by: @ferreum