mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #3491] Firejail breaks daemonizing processes #2196
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#2196
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 @NetSysFire on GitHub (Jul 4, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3491
The following snippet works without problems when executed without firejail. However, when run with firejail (
firejail bash snippet.sh), it keeps this process in the foreground.This causes problems with the SSH connection multiplexing feature and causes ansible and even git over SSH to hang, because SSH can not daemonize and lingers indefinitely.
Related: https://github.com/netblue30/firejail/issues/1518
@rusty-snake commented on GitHub (Jul 4, 2020):
Duplicate of #2433?
@ghost commented on GitHub (Jul 4, 2020):
@rusty-snake I was talking with the OP on IRC about this for quite a while. I think there are a few other potentially related issues. The fact there's seemingly something keeping firejail from backgrounding processes might be the root cause or the common-denominator for issues that go beyond SSH and git. I'll add proper links to those i could find as soon as i can track them down again.
@ghost commented on GitHub (Apr 27, 2021):
Might be not the right issues here? I have problems with ansible. Might be a similar problem to the other issues.
Unlink
/usr/local/bin/sshworks but if I'm using firejail then I can't use Ansible. TheGathering Factsalready can't reach the hosts:{"changed": false, "msg": "Failed to connect to the host via ssh: ", "unreachable": true}.But I can connect just fine with ssh.
Edit:
It fits better with this issue https://github.com/netblue30/firejail/issues/1518
@ndorf commented on GitHub (Sep 21, 2021):
To daemonize, a process must sever its relationship with its parent (e.g, the shell). This is done by forking and exiting; the new, orphaned process is usually assigned PID 1 (init) as a parent.
Under firejail, it seems that orphaned processes are instead inherited by the same firejail process that spawned their parents, so it's not possible to "fork away" from your parent -- you'll just inherit the same one again.
Could this possibly be solved by having a second firejail process, that itself is daemonized (detached from both its original parent process and the tty), and inherits orphaned processes instead of the main one?
@itoffshore commented on GitHub (Oct 31, 2021):
I came across this issue with
ansible- I did notice that connections tolocalhostworked & it was only remotesshconnections that failed.Mentioning here in case helpful as the other issue is closed.
@kmk3 commented on GitHub (Apr 6, 2023):
See the following thread for a potential workaround: