-
Notifications
You must be signed in to change notification settings - Fork 270
Fix for test_access_control_simple__permits_user_login_based_on_group samba failure #8263
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
base: master
Are you sure you want to change the base?
Fix for test_access_control_simple__permits_user_login_based_on_group samba failure #8263
Conversation
819a490 to
0da7d09
Compare
|
The changes from The reason it isn't failing for PRs against master is because only
Here you can see this test failing against master: https://github.com/SSSD/sssd/actions/runs/19898518551/job/57035518953 Regarding the actual failure, in However, what happens now after the This PR adds a check if the group name begins with a SID prefix, and resolves these groups if it does have a sid prefix instead of adding the group. it makes the test pass now but to me it feels like the wrong way to fix this issue. Can you provide some guidance on what would be the best way to update the simple access check code behavior for AD groups? |
|
Hi, your solution would work. As an alternative I would like to suggest to consider to revert two of the changes from the original patch: This would allow to have groups in the cache which have a non-zero GID but are (temporary) marked as non-POSIX. Then the test would pass without changes to the simple access provider code. Another alternative might be a new flag which indicates that the name is not resolved yet, but this would require more code to make sure it is removed. So I think using the Please let me know what you think. As said, I agree with your solution as well and would ACK it. bye, |
Thank you for your comments. Of those options I prefer to go with the current code in this PR, I will clean it up a bit first however. I find having groups in the cache with a non-zero GID temporarily marked as non-POSIX to be confusing behavior, and flipping non-POSIX to POSIX during SSSD operations seems undesirable IMO. I will ping you when this PR is ready for review. |
ffb69e0 to
028d641
Compare
|
@sumit-bose PR is updated now, just waiting for CI. I confirmed the test passes now with https://github.com/SSSD/sssd/actions/runs/19967886836/job/57264520857?pr=8263 CI run |
|
Regarding string helper If we keep it, I can plan to create a separate PR later to use this helper in other parts of SSSD code. |
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a fix for an access control issue where group-based login fails in certain Samba configurations. The core of the fix is to ensure that group names that are still in SID format are properly resolved before being used in access checks. This is achieved by adding a new utility function string_begins_with to detect SID-formatted names and updating the simple access provider logic to trigger resolution for such groups.
My review identified a critical null pointer dereference vulnerability in the new string_begins_with function, which could lead to a crash. I also found an incorrect test case for this function that should be corrected. I've provided suggestions for both issues.
028d641 to
aa38d6b
Compare
After changes from 'Dont store GID for non-posix groups', the simple access provider was not identifying group with names in SID format as group that needs to be resolved because they are no longer stored temporarily as non-POSIX. Add code to check for, and resolve any group names which are SIDs returned from initgroups (AD provider).
aa38d6b to
03579c4
Compare
No description provided.