[GH-ISSUE #206] firejail --tracelog creates empty ld.so.preload file in systems etc folder #142

Closed
opened 2026-05-05 05:09:32 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @hvhaugwitz on GitHub (Jan 2, 2016).
Original GitHub issue: https://github.com/netblue30/firejail/issues/206

firejail --tracelog creates an empty ld.so.preload file in systems etc folder:

test@debian:~$ ls -l /etc/ld.so.preload
ls: cannot access /etc/ld.so.preload: No such file or directory
test@debian:~$ firejail --version
firejail version 0.9.36
test@debian:~$ firejail --tracelog bash
Reading profile /etc/firejail/generic.profile
Reading profile /etc/firejail/disable-mgmt.inc
Reading profile /etc/firejail/disable-secret.inc
Reading profile /etc/firejail/disable-common.inc

** Note: you can use --noprofile to disable generic.profile **

Parent pid 11910, child pid 11911
Blacklist violations are logged to syslog
Child process initialized
[test@debian ~]$ exit
exit

parent is shutting down, bye...
test@debian:~$ ls -l /etc/ld.so.preload
-rw-r--r-- 1 root root 0 Jan  2 06:00 /etc/ld.so.preload
test@debian:~$

Is this behaviour intended?

Originally created by @hvhaugwitz on GitHub (Jan 2, 2016). Original GitHub issue: https://github.com/netblue30/firejail/issues/206 firejail --tracelog creates an empty ld.so.preload file in systems etc folder: ``` test@debian:~$ ls -l /etc/ld.so.preload ls: cannot access /etc/ld.so.preload: No such file or directory test@debian:~$ firejail --version firejail version 0.9.36 test@debian:~$ firejail --tracelog bash Reading profile /etc/firejail/generic.profile Reading profile /etc/firejail/disable-mgmt.inc Reading profile /etc/firejail/disable-secret.inc Reading profile /etc/firejail/disable-common.inc ** Note: you can use --noprofile to disable generic.profile ** Parent pid 11910, child pid 11911 Blacklist violations are logged to syslog Child process initialized [test@debian ~]$ exit exit parent is shutting down, bye... test@debian:~$ ls -l /etc/ld.so.preload -rw-r--r-- 1 root root 0 Jan 2 06:00 /etc/ld.so.preload test@debian:~$ ``` Is this behaviour intended?
Author
Owner

@netblue30 commented on GitHub (Jan 3, 2016):

--tracelog requires a special /etc/ld.so.preload file in the filesystem inside the sandbox. If an existing ld.so.preload is not found, Firejail creates an empty one. Inside the sandbox, Firejail will mount the real one on top of it.

<!-- gh-comment-id:168499326 --> @netblue30 commented on GitHub (Jan 3, 2016): --tracelog requires a special /etc/ld.so.preload file in the filesystem inside the sandbox. If an existing ld.so.preload is not found, Firejail creates an empty one. Inside the sandbox, Firejail will mount the real one on top of it.
Author
Owner

@hvhaugwitz commented on GitHub (Jan 3, 2016):

And the empty ld.so.preload file cannot be created temporally? It is a little bit weird that firejail creates permanent config files in /etc out of the blue.

<!-- gh-comment-id:168523532 --> @hvhaugwitz commented on GitHub (Jan 3, 2016): And the empty ld.so.preload file cannot be created temporally? It is a little bit weird that firejail creates permanent config files in /etc out of the blue.
Author
Owner

@netblue30 commented on GitHub (Jan 6, 2016):

It is kind of ugly, but I don't have a solution in this moment. Cleaning up the file after the sandbox has closed is very difficult, there are some race conditions there.

<!-- gh-comment-id:169322314 --> @netblue30 commented on GitHub (Jan 6, 2016): It is kind of ugly, but I don't have a solution in this moment. Cleaning up the file after the sandbox has closed is very difficult, there are some race conditions there.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#142
No description provided.