mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
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#4554
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/2844
Author: @crass
Created: 7/9/2019
Status: ✅ Merged
Merged: 7/9/2019
Merged by: @netblue30
Base:
master← Head:fix-561-trace-appimage📝 Commits (1)
97518daFix issue #561. Refactor/Optimize code to get and use pid and process name.📊 Changes
1 file changed (+72 additions, -76 deletions)
View changed files
📝
src/libtrace/libtrace.c(+72 -76)📄 Description
This fixes #561, which is misnamed. This issue affects just about any non-trivial shell scripts under firejail. Its just more obvious with appimage because the vast majority of AppRun programs are shell scripts.
The issue is that the preloaded libtrace library writes log messages to stdout and not directly to the console/tty. So a bash construct like
FILEPATH=$(readlink -a file), will contain the output ofreadlinkbut also trace log messages for exec, stat, etc. ThusFILEPATHwill not just be a file path. And the process tree then opensFILEPATH, which its highly likely to do, a process will try to open with a string that is not a path.This change has log messages written to
/dev/tty, which is the tty firejail is run with and the one you'd expect to get output on. Also, I refactored the existing code to be a tad more efficient by setting global variables for pid and process name in the library constructors.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.