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

bugfix: firecfg: check full filename in check_profile() #6674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kmk3
Copy link
Collaborator

@kmk3 kmk3 commented Mar 1, 2025

Currently, firecfg only checks the last word in .desktop files when
trying to match them to an existing profile. For example:

  • org.gnome.gedit.desktop -> gedit.desktop
  • org.gnome.seahorse.Application.desktop -> Application.desktop

This works in the former case where there is an exact match of the last
word on each side (gedit.desktop and gedit.profile), but not in the
latter case (Application.desktop and seahorse.profile).

So make firecfg also check the full filename of the .desktop file, to
make it easier to create redirect profiles that match the full name of
the .desktop files. For example:

  • org.gnome.seahorse.Application.desktop ->
    org.gnome.seahorse.Application.profile (which itself then redirects
    to seahorse.profile)

Related commits:

Relates to #2624 #6658.

Currently, firecfg only checks the last word in .desktop files when
trying to match them to an existing profile.  For example:

* `org.gnome.gedit.desktop` -> `gedit.desktop`
* `org.gnome.seahorse.Application.desktop` -> `Application.desktop`

This works in the former case where there is an exact match of the last
word on each side (`gedit.desktop` and `gedit.profile`), but not in the
latter case (`Application.desktop` and `seahorse.profile`).

So make firecfg also check the full filename of the .desktop file, to
make it easier to create redirect profiles that match the full name of
the .desktop files.  For example:

* `org.gnome.seahorse.Application.desktop` ->
  `org.gnome.seahorse.Application.profile` (which itself then redirects
  to `seahorse.profile`)

Related commits:

* a6341b9 ("disable DBus activation in firecfg", 2017-09-25)
* 3e69deb ("fix firecfg", 2017-09-25)
* bd97615 ("Temp fix firecfg (netblue30#2634)", 2019-04-02)

Relates to netblue30#2624 netblue30#6658.
@kmk3 kmk3 added firecfg Anything related to firecfg and not firejail itself bugfix This fixes a bug labels Mar 1, 2025
@kmk3 kmk3 requested a review from rusty-snake March 1, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This fixes a bug firecfg Anything related to firecfg and not firejail itself
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

1 participant