-
Notifications
You must be signed in to change notification settings - Fork 588
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 .desktop filename in check_profile() #6674
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
rusty-snake
approved these changes
Mar 4, 2025
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
Mar 4, 2025
Apparently the .desktop file for `seahorse` is located in the following path: * `/usr/share/applications/org.gnome.seahorse.Application.desktop` Which ends in `Application.desktop` instead of `seahorse.desktop`, leading to it not being automatically detected by firecfg. So add a redirect profile and an entry in firecfg.config. See also commit 8f69e98 ("bugfix: firecfg: check full filename in check_profile() (netblue30#6674)", 2025-03-04). Fixes netblue30#6658. Reported-by: @ginto37 Reported-by: @rusty-snake
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
Mar 6, 2025
Apparently the .desktop file for `seahorse` is located in the following path: * `/usr/share/applications/org.gnome.seahorse.Application.desktop` Which ends in `Application.desktop` instead of `seahorse.desktop`, leading to it not being automatically detected by firecfg. So add a redirect profile and an entry in firecfg.config. See also commit 8f69e98 ("bugfix: firecfg: check full filename in check_profile() (netblue30#6674)", 2025-03-04). Fixes netblue30#6658. Reported-by: @ginto37 Reported-by: @rusty-snake
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
Mar 6, 2025
Apparently the .desktop file for `seahorse` is located in the following path: * `/usr/share/applications/org.gnome.seahorse.Application.desktop` Which ends in `Application.desktop` instead of `seahorse.desktop`, leading to it not being automatically detected by firecfg. So add a redirect profile and an entry in firecfg.config. Related commits: * bd97615 ("Temp fix firecfg (netblue30#2634)", 2019-04-02) * 8f69e98 ("bugfix: firecfg: check full filename in check_profile() (netblue30#6674)", 2025-03-04). Fixes netblue30#6658. Relates to netblue30#2624. Reported-by: @ginto37 Reported-by: @rusty-snake
kmk3
added a commit
that referenced
this pull request
Mar 6, 2025
Apparently the .desktop file for `seahorse` is located in the following path: * `/usr/share/applications/org.gnome.seahorse.Application.desktop` Which ends in `Application.desktop` instead of `seahorse.desktop`, leading to it not being automatically detected by firecfg. So add a redirect profile and an entry in firecfg.config. Related commits: * bd97615 ("Temp fix firecfg (#2634)", 2019-04-02) * 8f69e98 ("bugfix: firecfg: check full filename in check_profile() (#6674)", 2025-03-04). Fixes #6658. Relates to #2624. Reported-by: @ginto37 Reported-by: @rusty-snake
kmk3
added a commit
to kmk3/firejail
that referenced
this pull request
Mar 6, 2025
To avoid CI failures. From the first run of `cppcheck_old` on commit 8f69e98 ("bugfix: firecfg: check full filename in check_profile() (netblue30#6674)", 2025-03-04) [1]: > This is a scheduled Ubuntu 20.04 brownout. Ubuntu 20.04 LTS runner > will be removed on 2025-04-01. For more details, see > actions/runner-images#11101 The target depends on the cppcheck version from Ubuntu 20.04 in order to work properly and this distribution will become EOL next month (April 2025), so just remove the target. Added on commit 53f0b39 ("CI: keep old cppcheck job and ignore two files in new job that take too long to check", 2022-07-26). [1] https://github.com/netblue30/firejail/actions/runs/13658953453/job/38185280665
kmk3
added a commit
that referenced
this pull request
Mar 7, 2025
To avoid CI failures. From the first run of `cppcheck_old` on commit 8f69e98 ("bugfix: firecfg: check full filename in check_profile() (#6674)", 2025-03-04) [1]: > This is a scheduled Ubuntu 20.04 brownout. Ubuntu 20.04 LTS runner > will be removed on 2025-04-01. For more details, see > actions/runner-images#11101 The target depends on the cppcheck version from Ubuntu 20.04 in order to work properly and this distribution will become EOL next month (April 2025), so just remove the target. Added on commit 53f0b39 ("CI: keep old cppcheck job and ignore two files in new job that take too long to check", 2022-07-26). [1] https://github.com/netblue30/firejail/actions/runs/13658953453/job/38185280665
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andgedit.profile
), but not in thelatter case (
Application.desktop
andseahorse.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 redirectsto
seahorse.profile
)Related commits:
Relates to #2624 #6658.