-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snapdtool: check for binary existence in InternalToolPath() (#13227)
* snapdtool: check for binary existance in InternalToolPath() The current version of `InternalToolPath()` does not actually checks in all cases if the binary is actually there. Historically this was not a problem but with recent snapd releases we have the internal tool `apparmor_parser` that is only available in the `snapd` snap but not in the `core` snap. This means that on systems that have the snapd deb and only core `InternalToolPath` may return `/snap/core/123/usr/lib/snapd/apparmor_parser` even if this tool in not available inside the core snap. This commit fixes this by checking if the actual executable is available. * snapdtool: add test for non-executable internal tool path * snapdtool: simplify InternalToolPath() (thanks to Samuele)
- Loading branch information
Showing
2 changed files
with
53 additions
and
16 deletions.
There are no files selected for viewing
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
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