[PR #5600] [MERGED] modif: Stop forwarding own double-dash to the shell #5567

Closed
opened 2026-05-05 10:40:51 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netblue30/firejail/pull/5600
Author: @kmk3
Created: 1/17/2023
Status: Merged
Merged: 1/19/2023
Merged by: @netblue30

Base: masterHead: fix-stop-ddash-sh


📝 Commits (1)

  • 497c39e Stop forwarding own double-dash to the shell

📊 Changes

1 file changed (+0 additions, -2 deletions)

View changed files

📝 src/firejail/sandbox.c (+0 -2)

📄 Description

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 #5599.

Relates to #3434.

Reported-by: @iltep64
Reported-by: @ferreum


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netblue30/firejail/pull/5600 **Author:** [@kmk3](https://github.com/kmk3) **Created:** 1/17/2023 **Status:** ✅ Merged **Merged:** 1/19/2023 **Merged by:** [@netblue30](https://github.com/netblue30) **Base:** `master` ← **Head:** `fix-stop-ddash-sh` --- ### 📝 Commits (1) - [`497c39e`](https://github.com/netblue30/firejail/commit/497c39e89ace26b82c782b46e547afb051b771b4) Stop forwarding own double-dash to the shell ### 📊 Changes **1 file changed** (+0 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/firejail/sandbox.c` (+0 -2) </details> ### 📄 Description 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 #5599. Relates to #3434. Reported-by: @iltep64 Reported-by: @ferreum --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 10:40:51 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#5567
No description provided.