[GH-ISSUE #1869] atool private-etc issue #1262

Closed
opened 2026-05-05 07:44:36 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @ghost on GitHub (Apr 7, 2018).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1869

Hi, atool profile from latest git has private-etc none, resulting in zero-size extracted files:

$ grep private-etc /etc/firejail/atool.profile
private-etc none

$ firejail atool -x test.gz
Reading profile /etc/firejail/atool.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-passwdmgr.local
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-programs.local
Parent pid 19111, child pid 19112

Warning: skipping none for private /etc
Private /etc installed in 0.13 ms
Blacklist violations are logged to syslog
Child process initialized in 471.84 ms
Error getpwuid: main.c:213 init_cfg: No such file or directory
test.txt.gz: extracted to `test'

Parent is shutting down, bye...

$ ls -l test
-rw-r--r-- 1 glitsj16 glitsj16 0 Apr  6 02:24 test.txt

= = =

$ firejail --private-etc=passwd,group atool -x test.gz

Reading profile /etc/firejail/atool.profile
Reading profile /etc/firejail/globals.local
Reading profile /etc/firejail/disable-common.inc
Reading profile /etc/firejail/disable-interpreters.inc
Reading profile /etc/firejail/disable-passwdmgr.inc
Reading profile /etc/firejail/disable-passwdmgr.local
Reading profile /etc/firejail/disable-programs.inc
Reading profile /etc/firejail/disable-programs.local
Parent pid 15880, child pid 15881

Warning: skipping none for private /etc
Private /etc installed in 3.15 ms
Blacklist violations are logged to syslog
Child process initialized in 505.12 ms
test.txt.gz: extracted to `test'

Parent is shutting down, bye...

$ ls -l test
-rw-r--r-- 1 glitsj16 glitsj16 70 Apr  6 02:28 test.txt

Easily fixed by changing to private-etc passwd,group. I'll do a PR with the fix.
The profile might also benefit from 2 additional 'redirect' profiles too, for
bunzip2 and gunzip. Both of these seem to be called by default.

Regards

Originally created by @ghost on GitHub (Apr 7, 2018). Original GitHub issue: https://github.com/netblue30/firejail/issues/1869 Hi, atool profile from latest git has private-etc `none`, resulting in zero-size extracted files: ``` $ grep private-etc /etc/firejail/atool.profile private-etc none $ firejail atool -x test.gz Reading profile /etc/firejail/atool.profile Reading profile /etc/firejail/globals.local Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-passwdmgr.local Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-programs.local Parent pid 19111, child pid 19112 Warning: skipping none for private /etc Private /etc installed in 0.13 ms Blacklist violations are logged to syslog Child process initialized in 471.84 ms Error getpwuid: main.c:213 init_cfg: No such file or directory test.txt.gz: extracted to `test' Parent is shutting down, bye... $ ls -l test -rw-r--r-- 1 glitsj16 glitsj16 0 Apr 6 02:24 test.txt = = = $ firejail --private-etc=passwd,group atool -x test.gz Reading profile /etc/firejail/atool.profile Reading profile /etc/firejail/globals.local Reading profile /etc/firejail/disable-common.inc Reading profile /etc/firejail/disable-interpreters.inc Reading profile /etc/firejail/disable-passwdmgr.inc Reading profile /etc/firejail/disable-passwdmgr.local Reading profile /etc/firejail/disable-programs.inc Reading profile /etc/firejail/disable-programs.local Parent pid 15880, child pid 15881 Warning: skipping none for private /etc Private /etc installed in 3.15 ms Blacklist violations are logged to syslog Child process initialized in 505.12 ms test.txt.gz: extracted to `test' Parent is shutting down, bye... $ ls -l test -rw-r--r-- 1 glitsj16 glitsj16 70 Apr 6 02:28 test.txt ``` Easily fixed by changing to `private-etc passwd,group`. I'll do a PR with the fix. The profile might also benefit from 2 additional 'redirect' profiles too, for `bunzip2` and `gunzip`. Both of these seem to be called by default. Regards
Author
Owner

@ghost commented on GitHub (Apr 7, 2018):

The PR is here. I'm currently going over firejail's profiles for archiving tools like 7z, atool, bsdtar, gzip, tar, unrar, unzip, xz and xzdec. These are all pretty much standard tools I'm familiar with. What do you advise regarding 'redirect' profiles?

I wouldn't mind checking relevant packages, adding what's in /usr/bin (on Arch at least) as redirect files. Personally I think all these tools are pretty stable. Firejail could benefit from adding those without causing much maintainability issues, if any. I guess I'm looking for advice on this topic 😄. Thoughts?

<!-- gh-comment-id:379421582 --> @ghost commented on GitHub (Apr 7, 2018): The PR is [here](https://github.com/netblue30/firejail/pull/1870). I'm currently going over firejail's profiles for archiving tools like 7z, atool, bsdtar, gzip, tar, unrar, unzip, xz and xzdec. These are all pretty much standard tools I'm familiar with. What do you advise regarding 'redirect' profiles? I wouldn't mind checking relevant packages, adding what's in /usr/bin (on Arch at least) as redirect files. Personally I think all these tools are pretty stable. Firejail could benefit from adding those without causing much maintainability issues, if any. I guess I'm looking for advice on this topic :smile:. Thoughts?
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#1262
No description provided.