mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #7151] [MERGED] feature: allow subpaths in xdg macros #6344
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#6344
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/7151
Author: @kmk3
Created: 4/27/2026
Status: ✅ Merged
Merged: 5/1/2026
Merged by: @kmk3
Base:
master← Head:improve-xdg-macros📝 Commits (5)
1155e0dmacros.c: fix whitespace after if inexpand_macros()8e1954dmacros.c: remove redundant braces inexpand_macros()68d16bfmacros.c: deduplicate code inexpand_macros()c2f1201macros.c: sort macro arrayaff7cb6feature: allow subpaths in xdg macros📊 Changes
8 files changed (+299 additions, -65 deletions)
View changed files
📝
src/firejail/firejail.h(+3 -3)📝
src/firejail/fs_whitelist.c(+2 -2)📝
src/firejail/macros.c(+55 -60)📝
test/fs/fs.sh(+21 -0)➕
test/fs/macro-subpath-blacklist.profile(+6 -0)➕
test/fs/macro-subpath-readonly.profile(+6 -0)➕
test/fs/macro-subpath-whitelist.profile(+6 -0)➕
test/fs/macro-subpath.exp(+200 -0)📄 Description
Currently it is not possible to use XDG-related macros (such as
${DOCUMENTS}) with subpaths (such as${DOCUMENTS}/foo) and soprofiles just use
${HOME}with a hardcoded path using the Englishdirectory name and the subpath (such as
${HOME}/Documents/foo).Allow using subpaths after XDG macros, so that they automatically use
the auto-detected XDG path, just as when currently using the XDG macros
without subpaths.
Before:
After:
This is a follow-up to #7147.
Closes #2359.
Relates to #4229.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.