[autobackport: sssd-2-9] Dont store gid 0 for non-posix groups#8184
Conversation
There was a problem hiding this comment.
Code Review
This pull request aims to prevent storing a GID of 0 for non-POSIX groups. The changes involve modifying sysdb_add_basic_group to conditionally store the gidNumber and updating its callers. While the changes for groups seem correct, I've found a couple of issues related to user handling that seem to have been introduced as part of this refactoring. One issue may lead to users being created without a posix attribute, and another relates to an inconsistent handling of gidNumber for non-POSIX users compared to non-POSIX groups.
|
@sumit-bose, do you want to take a look? |
|
@justin-stephenson, this backport failed Could you please take a look? |
a5e0785 to
25de302
Compare
This test seems to be passing now? I tried re-running also and it was still green.
|
Even without topology markers backported? |
Correct, no idea what changed. Let me try to re-run a couple more times. |
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> (cherry picked from commit 936dbfb)
Remove logic to store 'gidNumber: 0' in the cache for non-posix groups. Instead do not add a gidNumber at all, this avoids performance hit due to huge GID=0 index when a large number of non-posix groups are stored. Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> (cherry picked from commit dc9188b)
It is no longer needed as we no longer want to store 'gid: 0' for non-POSIX groups. Reviewed-by: Alexey Tikhonov <atikhono@redhat.com> Reviewed-by: Sumit Bose <sbose@redhat.com> (cherry picked from commit d953045)
|
The pull request was accepted by @alexey-tikhonov with the following PR CI status: 🟢 CodeQL (success) There are unsuccessful or unfinished checks. Make sure that the failures are not related to this pull request before merging. |
Looks to be fine now. |
25de302 to
c72cf9e
Compare
This is an automatic backport of PR#8075 Dont store gid 0 for non-posix groups to branch sssd-2-9, created by @justin-stephenson.
Please make sure this backport is correct.
Note
The commits were cherry-picked without conflicts.
You can push changes to this pull request
Original commits
Backported commits
Original Pull Request Body