mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[PR #2935] [MERGED] Fix profile builder #4590
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#4590
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/2935
Author: @crass
Created: 8/30/2019
Status: ✅ Merged
Merged: 9/15/2019
Merged by: @netblue30
Base:
master← Head:fix-profile-builder📝 Commits (9)
dbff552Profile builder helper should use correct firejail binary path.9af2c14Better debug handling.6620aacFix issue where strace output file path has leading space making it an invalid path.1b02467Allow libtrace preload library to use for trace output a logfile specified by the environment variable FIREJAIL_TRACEFILE or as the RUN_TRACE_FILE if it exists ortherwise use the console as before.f6584eaAllow firejail --trace option to take an optional parameter which is the trace log file path. The trace log file will be created if it does not exist and then bind mounted to RUN_TRACE_FILE so that the sandboxed program can access it.96505fdUpdate man page to note that --trace can now take an optional parameter.02580c8When running builder trace output should go to separate file because (1) trace output is logged to console, which is a pain to capture, and (2) it should not be mingled with program output anyway, which it was when sending to stdout.742d2a2Make sure that we are unprivileged before creating the trace log file.99da774Merge branch 'master' into fix-profile-builder📊 Changes
8 files changed (+69 additions, -25 deletions)
View changed files
📝
src/common.mk.in(+5 -1)📝
src/fbuilder/build_profile.c(+11 -10)📝
src/firejail/firejail.h(+1 -0)📝
src/firejail/fs_trace.c(+21 -0)📝
src/firejail/main.c(+5 -0)📝
src/include/rundefs.h(+1 -0)📝
src/libtrace/libtrace.c(+18 -7)📝
src/man/firejail.txt(+7 -7)📄 Description
@netblue30
Per @smitsohu's suggestion, I've fixed the
--buildoption to work with fix for--trace. This actually was a little more involved because the builder parses the trace output to build an rough profile. Since--traceoutputs to console now and notstdout, the output would be harder to capture. So I've allowed--traceto accept an optional parameter which is a path to the trace log file. Now the builder logs to a logfile and parses that log file. This is actually better than before, where program, firejail debug, and trace output were all combined together.One part I'm slightly concerned with is that
--outputhas code that has a bit of validation on the given path and then pipesfteeto capture the output. Is the usage offteejust to make sure all the output is capture from the beginning? It the purpose of the path validation just for better error messaging? Why are hardlinks not allowed? Thegit logprovides no clues because this code predates the import into this git repo. I've some some tests to check that symbolic links to files the user doesn't have permission to access are not allowed to be accessed and that the given path is created and opened for writing as an unprivileged user (when run as an unprivileged user). I'm wondering if I'm missing a security issue?🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.