-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(PUP-7126) Replace deprecated Selinux.matchpathcon functions
This commit: - Deprecates get_selinux_default_context which calls the deprecated Selinux.matchpathcon and replaces it with get_selinux_default_context_with_handle which calls Selinux.selabel_lookup instead. The new method requires a handle since selabel_lookup requires a handle - Adds a getter method for the class variable, selinux_handle, in the POSIX file provider which is used to get the handle for get_selinux_default_context_with_handle. With this getter method, selinux_handle will only initialized once with Selinux.selabel_lookup. - Updates post_resource_eval in the POSIX file provider to call Selinux.selabel_close instead of the deprecated Selinux.matchpathcon_fini when terminating selinux_handle. After, selinux_handle is set to nil. Co-authored-by: William Bradford Clark <wclark@redhat.com>
- Loading branch information
Showing
6 changed files
with
78 additions
and
21 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
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
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