Patched 'krb5_child' cap-set-id tests#8313
Closed
alexey-tikhonov wants to merge 2 commits intoSSSD:masterfrom
Closed
Patched 'krb5_child' cap-set-id tests#8313alexey-tikhonov wants to merge 2 commits intoSSSD:masterfrom
alexey-tikhonov wants to merge 2 commits intoSSSD:masterfrom
Conversation
If CAP_SETUID and/or CAP_SETGID are missing, 'krb5_child' will skip operation that require those capabilities, namely any manipulations with user ccache. :packaging:This update makes it possible to not grant CAP_SETUID and CAP_SETGID to 'krb5_child' binary in a situation where it is not required to store acquired TGT after user authentication. Taking into account that it is already possible to avoid using CAP_DAC_READ_SEARCH if keytab is readable by SSSD service user, and usage of 'selinux_child' isn't always required, this allows to build a setup with completely privilege-less SSSD to serve certain use cases. In particular, this might be used to build a container running SSSD on OCP with a restricted profile.
There was a problem hiding this comment.
Code Review
This pull request modifies krb5_child to function correctly even when it lacks CAP_SETUID and CAP_SETGID capabilities. The changes involve removing these capabilities from Makefile.am and sssd.spec.in, and adding logic to krb5_child.c to detect their absence and skip operations that require them, such as updating the user's ccache. While the logic is generally sound, there's a minor logic issue in privileged_krb5_setup that could be simplified for better readability and to avoid redundant operations. Additionally, a new check in renew_tgt_child could be more robust.
This file contains hidden or 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
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.
No description provided.