mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 06:06:02 -06:00
[PR #7142] feature: firecfg: add and use firejail-symlink wrapper #6336
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#6336
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?
📋 Pull Request Information
Original PR: https://github.com/netblue30/firejail/pull/7142
Author: @kmk3
Created: 4/18/2026
Status: 🔄 Open
Base:
master← Head:add-firejail-symlink-exec📝 Commits (3)
61774edbuild: config.mk.in: line-wrap config vars inCOMMON_FLAGSe1dddd9build: config.mk.in: sort config vars inCOMMON_FLAGSd09499dfeature: firecfg: add and use firejail-symlink wrapper📊 Changes
11 files changed (+134 additions, -11 deletions)
View changed files
📝
Makefile(+3 -0)📝
config.mk.in(+7 -3)📝
src/firecfg/firecfg.h(+1 -0)➕
src/firecfg/firejail-symlink.sh(+12 -0)📝
src/firecfg/main.c(+8 -4)📝
src/firejail/fs_lib.c(+3 -2)📝
src/firejail/main.c(+11 -0)📝
test/firecfg/firecfg.exp(+2 -2)📝
test/firecfg/firecfg.sh(+8 -0)➕
test/firecfg/firejail-program-args.exp(+57 -0)➕
test/firecfg/firejail-program-args.sh(+22 -0)📄 Description
Add a new
firejail-symlinkwrapper script that setsFIREJAIL_SYMLINK=1before calling firejail and use that script as thesymlink in /usr/local/bin instead of
firejail.Check both paths in firecfg for backwards compatibility (especially for
firecfg --clean).Place the script in
$(libexecdir)(which is not currently used), asthat is a more appropriate location than
$(libdir)and having a stabletarget path for the symlinks makes maintenance and support easier (as
opposed to potentially moving the script path later).
Background: The early firejail init code is brittle due to certain
interdependencies between different parts (such as when checking
environment variables, flags and firejail.config options).
This should make the code more robust by not having to guess when
firejail is called as a symlink (which affects argument parsing).
This fixes a bug added on commit
907916d04("modif: check for --versionduring early init", 2025-11-23) / PR #6972, in which running
foo --version(and withfoobeing a symlink to firejail) results infirejail parsing
--version, printing its version and exiting insteadof just forwarding the argument to the program:
Misc: PR #6972 was still marked as a draft when it was merged.
Fixes #7140.
Relates to #6969 #6972.
Reported-by: @gcb
Bisected-by: @rusty-snake
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.