[GH-ISSUE #4424] firejail strace method for private-lib needed #2666

Closed
opened 2026-05-05 09:19:46 -06:00 by gitea-mirror · 9 comments
Owner

Originally created by @osevan on GitHub (Jul 26, 2021).
Original GitHub issue: https://github.com/netblue30/firejail/issues/4424

I need firejails buildin strace method for easy private-lib line creating.

Example for firefox.

Thanks and

Best regards

Originally created by @osevan on GitHub (Jul 26, 2021). Original GitHub issue: https://github.com/netblue30/firejail/issues/4424 I need firejails buildin strace method for easy private-lib line creating. Example for firefox. Thanks and Best regards
gitea-mirror 2026-05-05 09:19:46 -06:00
Author
Owner

@rusty-snake commented on GitHub (Jul 26, 2021):

You mean you want to run starce --some-args /usr/bin/firefox to get a list of all files it opens in /usr/lib, /usr/lib64, ...?

<!-- gh-comment-id:886977119 --> @rusty-snake commented on GitHub (Jul 26, 2021): You mean you want to run `starce --some-args /usr/bin/firefox` to get a list of all files it opens in `/usr/lib`, `/usr/lib64`, ...?
Author
Owner

@osevan commented on GitHub (Jul 26, 2021):

You mean you want to run starce --some-args /usr/bin/firefox to get a list of all files it opens in /usr/lib, /usr/lib64, ...?

Exactly

<!-- gh-comment-id:887100626 --> @osevan commented on GitHub (Jul 26, 2021): > You mean you want to run `starce --some-args /usr/bin/firefox` to get a list of all files it opens in `/usr/lib`, `/usr/lib64`, ...? Exactly
Author
Owner

@osevan commented on GitHub (Jul 27, 2021):

You mean you want to run starce --some-args /usr/bin/firefox to get a list of all files it opens in /usr/lib, /usr/lib64, ...?

Or firejail buildin -trace option to figure out which librarys.

But I need librarys list already sorted and ready for profile.

<!-- gh-comment-id:887724718 --> @osevan commented on GitHub (Jul 27, 2021): > You mean you want to run `starce --some-args /usr/bin/firefox` to get a list of all files it opens in `/usr/lib`, `/usr/lib64`, ...? Or firejail buildin -trace option to figure out which librarys. But I need librarys list already sorted and ready for profile.
Author
Owner

@netblue30 commented on GitHub (Jul 29, 2021):

We have --build command line option where we detect using strace all kind of things such as "private-bin" and "private-etc". Let me try to add support for private-lib to it.

For simple programs (probably not firefox), if you have a valid "private-bin" in your profile, add also "private-lib". We autodetect a lot of libraries by default.

<!-- gh-comment-id:889194493 --> @netblue30 commented on GitHub (Jul 29, 2021): We have --build command line option where we detect using strace all kind of things such as "private-bin" and "private-etc". Let me try to add support for private-lib to it. For simple programs (probably not firefox), if you have a valid "private-bin" in your profile, add also "private-lib". We autodetect a lot of libraries by default.
Author
Owner

@osevan commented on GitHub (Aug 3, 2021):

We have --build command line option where we detect using strace all kind of things such as "private-bin" and "private-etc". Let me try to add support for private-lib to it.

For simple programs (probably not firefox), if you have a valid "private-bin" in your profile, add also "private-lib". We autodetect a lot of libraries by default.

I have private-bin already in Firefox,.and works fine with my list,but not with private-lib.

private-lib didn't work

<!-- gh-comment-id:892105915 --> @osevan commented on GitHub (Aug 3, 2021): > We have --build command line option where we detect using strace all kind of things such as "private-bin" and "private-etc". Let me try to add support for private-lib to it. > > For simple programs (probably not firefox), if you have a valid "private-bin" in your profile, add also "private-lib". We autodetect a lot of libraries by default. I have private-bin already in Firefox,.and works fine with my list,but not with private-lib. private-lib didn't work
Author
Owner

@rusty-snake commented on GitHub (Aug 6, 2021):

strace --trace=%file --follow-forks --output=gnome-2048.strace /usr/bin/gnome-2048
grep -o '"/lib64/.*"' gnome-2048.strace | cut -d\" -f2 | cut -d/ -f3- | sort -u | tr '\n' ','
<!-- gh-comment-id:894168227 --> @rusty-snake commented on GitHub (Aug 6, 2021): ```bash strace --trace=%file --follow-forks --output=gnome-2048.strace /usr/bin/gnome-2048 grep -o '"/lib64/.*"' gnome-2048.strace | cut -d\" -f2 | cut -d/ -f3- | sort -u | tr '\n' ',' ```
Author
Owner

@osevan commented on GitHub (Aug 7, 2021):

Thanks you very much .

I modified, because on old strace, commands are different.

But it works.

<!-- gh-comment-id:894692449 --> @osevan commented on GitHub (Aug 7, 2021): Thanks you very much . I modified, because on old strace, commands are different. But it works.
Author
Owner

@osevan commented on GitHub (Aug 9, 2021):

I tested this method for buster debian and works.

But, for two other machines bullseye libs from above line arent enough

We need detailed debug option , --debug and --debug-private-lib isnt enough..

They cant spit out needed libs. :-(

We need fixes for bullseye

<!-- gh-comment-id:895500622 --> @osevan commented on GitHub (Aug 9, 2021): I tested this method for buster debian and works. But, for two other machines bullseye libs from above line arent enough We need detailed debug option , --debug and --debug-private-lib isnt enough.. They cant spit out needed libs. :-( We need fixes for bullseye
Author
Owner

@rusty-snake commented on GitHub (Oct 30, 2022):

Closing as private-lib was never really finish, has some bugs, has major performance issues, is now disabled by default and a workaround is documented here.

<!-- gh-comment-id:1296299277 --> @rusty-snake commented on GitHub (Oct 30, 2022): Closing as `private-lib` was never really finish, has some bugs, has major performance issues, is now disabled by default and a workaround is documented here.
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#2666
No description provided.