mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #4910] private-cwd not expanding macros (e.g. ${HOME}) #2815
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#2815
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 @reinerh on GitHub (Feb 7, 2022).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4910
hyperrogue.profile currently contains the following line:
(it's currently the only profile using
private-cwd.)When trying to run firejail with this profile it fails with the following error:
Removing
${HOME}from theprivate-cwdline fixes it. According to the manpage the home directory is also the default directory when no other directory is specified.Was the
${HOME}added by accident? Or should this be supported?(Problem was found by Ubuntu CI btw: https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/arm64/f/firejail/20220207_124108_3cf17@/log.gz
This will currently prevent the package from entering 22.04 until it is fixed, if I understand their CI correctly.)
@rusty-snake commented on GitHub (Feb 7, 2022):
hyperrogue saves it's game state at
./hyperrogue.ini. Which works badly with(no)blacklist/whitelist. That's why I added the private-cwd.@rusty-snake commented on GitHub (Feb 7, 2022):
firejail --private-cwd="${HOME}" --noprofile ls: Worksfirejail --private-cwd='${HOME}' --noprofile ls: BrokenThe fix for #4780 seems to check for relative/absolute path before expanding macros (
${HOME}).@reinerh commented on GitHub (Feb 7, 2022):
Ah, I remember that hyperrogue bug. If you use Debian, I fixed that in 12.0f-1 (#985797), otherwise just build with
-DFHS, then it will store the config in~/.hyperrogue.ini. (In my opinion building without-DFHSis a bug in the distribution package; so we could use a black/whitelist approach in the profile)@netblue30 commented on GitHub (Feb 7, 2022):
Got the same on Debian stable, removed ${HOME} from the profile. This fixes it for the game.
"private-cwd" and "private-cwd ${HOME}" should be equivalent. I'll look to see what's going on in the code. Same problem with "firejail --private-cwd='${HOME}' --noprofile ls"
@netblue30 commented on GitHub (Feb 7, 2022):
5753400f0a@kmk3 commented on GitHub (Feb 8, 2022):
Nice, it works for me with
--private-cwd='${HOME}'.Can this be closed then?
@netblue30 commented on GitHub (Feb 9, 2022):
Yes, closed! Will reopen again if necessary.