Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

profiles: private-etc fixes #5641

Merged
merged 8 commits into from
Feb 6, 2023
Merged

Conversation

glitsj16
Copy link
Collaborator

@glitsj16 glitsj16 commented Feb 5, 2023

The private-etc rework is really showing its value in 5d0822c. Easier to spot oddities now, like prior typos that stayed undetected.

Relates to #5610.

glitsj16 and others added 8 commits February 5, 2023 22:35
There is no `/etc/groups` AFAIK. Existing typo prior to private-etc rework likely caused this.
`passwd` is already in @default group.
There is no `/etc/groups` AFAIK. Existing typo prior to private-etc rework likely caused this.
There is no `/etc/groups` AFAIK. Existing typo prior to private-etc rework likely caused this.
`dconfgtk-3.0` was missing a `,` prior to the private-etc rework.
There is no `/etc/jwhois.conf` AFAIK. Existing typo prior to private-etc rework likely caused this.
There is no `/etc/ssli` AFAIK. Existing typo prior to private-etc rework likely caused this.
@netblue30 netblue30 merged commit 5649bd4 into netblue30:master Feb 6, 2023
@netblue30
Copy link
Owner

all merged, thanks!

@glitsj16 glitsj16 deleted the private-etc-fixes branch February 6, 2023 14:02
kmk3 added a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
This reverts commit 5d0822c and later
commits that touch the same files (which is necessary in order to revert
the commit in question).

There seems to be a non-trivial amount of changes done in error in the
big refactor from commit 5d0822c ("private-etc: big profile changes",
2023-02-05).  For example, there are profiles for CLI programs
(including man.profile) and servers that now contain the @X11 group:

    $ git grep -l '^private-etc .*@X11' -- etc
    # [...]
    etc/profile-a-l/email-common.profile:private-etc @tls-ca,@X11,gnupg,hosts.conf,mailname,timezone
    etc/profile-m-z/man.profile:private-etc @X11,groff,man_db.conf,manpath.config,sysless
    etc/profile-m-z/mutt.profile:private-etc @tls-ca,@X11,Mutt,Muttrc,Muttrc.d,gai.conf,gnupg,gnutls,hosts.conf,mail,mailname,nntpserver,terminfo
    etc/profile-m-z/neomutt.profile:private-etc @tls-ca,@X11,Mutt,Muttrc,Muttrc.d,gnupg,hosts.conf,mail,mailname,neomuttrc,neomuttrc.d,nntpserver
    etc/profile-m-z/nextcloud.profile:private-etc @tls-ca,@X11,Nextcloud,host.conf,os-release
    etc/profile-m-z/nodejs-common.profile:private-etc @tls-ca,@X11,host.conf,mime.types,rpc,services

Note: These are just the ones that I immediately noticed; it is possible
that there are many that I missed.

Part of the issue is that the groups appear to be inconsistent and
rather broad.  For exmaple, paths related to 3D graphics (vulkan) and
audio (openal) are in the @games group, which are not used only by games
and not all games use those standards/libraries.  As another example,
the @X11 group contains paths related to GTK, KDE and GPU hardware
acceleration, even though those are not necessarily tied to X11 (and
even though hardware acceleration may be used by headless programs).
Replacing the known paths with groups that are not very granular results
in loss of information about what exactly a profile actually needs and
so makes the profiles less self-documenting.  Note also that a given
path could potentially belong to multiple groups, which would preclude
using the "etc-cleanup" tool (in its current form at least), as it would
not know which is the correct group to replace the path with.

Command used to revert the changes:

    $ git revert \
      1be9bb3 \
      e889db0 \
      e6f2374 \
      acb0154 \
      740f502 \
      5649bd4 \
      2e4e9d1 \
      0f996ea \
      5d0822c

Note: This reverts commits from PRs netblue30#5641 netblue30#5642 netblue30#5643, most of which are
later re-applied.

Relates to netblue30#5610.
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/groups` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 001f541)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/password` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 5f01eb1)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/groups` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 2588d51)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/groups` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit aea2109)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
`dconfgtk-3.0` is missing a `,`.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 81f8847)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/ssli` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit f9c009e)
kmk3 added a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
This reverts commit 5d0822c and later
commits that touch the same files (which is necessary in order to revert
the commit in question).

There seems to be a non-trivial amount of changes done in error in the
big refactor from commit 5d0822c ("private-etc: big profile changes",
2023-02-05).  For example, there are profiles for CLI programs
(including man.profile) and servers that now contain the @X11 group:

    $ git grep -l '^private-etc .*@X11' -- etc
    # [...]
    etc/profile-a-l/email-common.profile:private-etc @tls-ca,@X11,gnupg,hosts.conf,mailname,timezone
    etc/profile-m-z/man.profile:private-etc @X11,groff,man_db.conf,manpath.config,sysless
    etc/profile-m-z/mutt.profile:private-etc @tls-ca,@X11,Mutt,Muttrc,Muttrc.d,gai.conf,gnupg,gnutls,hosts.conf,mail,mailname,nntpserver,terminfo
    etc/profile-m-z/neomutt.profile:private-etc @tls-ca,@X11,Mutt,Muttrc,Muttrc.d,gnupg,hosts.conf,mail,mailname,neomuttrc,neomuttrc.d,nntpserver
    etc/profile-m-z/nextcloud.profile:private-etc @tls-ca,@X11,Nextcloud,host.conf,os-release
    etc/profile-m-z/nodejs-common.profile:private-etc @tls-ca,@X11,host.conf,mime.types,rpc,services

Note: These are just the ones that I immediately noticed; it is possible
that there are many that I missed.

Part of the issue is that the groups appear to be inconsistent and
rather broad.  For example, paths related to 3D graphics (vulkan) and
audio (openal) are in the @games group, which are not used only by games
and not all games use those standards/libraries.  As another example,
the @X11 group contains paths related to GTK, KDE and GPU hardware
acceleration, even though those are not necessarily tied to X11 (and
even though hardware acceleration may be used by headless programs).
Replacing the known paths with groups that are not very granular results
in loss of information about what exactly a profile actually needs and
so makes the profiles less self-documenting.  Note also that a given
path could potentially belong to multiple groups, which would preclude
using the "etc-cleanup" tool (in its current form at least), as it would
not know which is the correct group to replace the path with.

Command used to revert the changes:

    $ git revert \
      1be9bb3 \
      e889db0 \
      e6f2374 \
      acb0154 \
      740f502 \
      5649bd4 \
      2e4e9d1 \
      0f996ea \
      5d0822c

Note: This reverts commits from PRs netblue30#5641 netblue30#5642 netblue30#5643, most of which are
later re-applied.

Relates to netblue30#5610.
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/groups` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 001f541)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/password` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 5f01eb1)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/groups` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 2588d51)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/groups` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit aea2109)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
`dconfgtk-3.0` is missing a `,`.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit 81f8847)
kmk3 pushed a commit to kmk3/firejail that referenced this pull request Feb 7, 2023
There is no `/etc/ssli` AFAIK. Existing typo likely caused this.

Committer note: The original commit is part of PR netblue30#5641.

(cherry picked from commit f9c009e)
@kmk3 kmk3 changed the title private-etc fixes profiles: private-etc fixes Mar 28, 2024
kmk3 added a commit that referenced this pull request Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done (on RELNOTES)
Development

Successfully merging this pull request may close these issues.

3 participants