Skip to content
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

nssidmap: fix sss_nss_getgrouplist_timeout() with empty secondary group list #7055

Closed
wants to merge 1 commit into from

Conversation

sumit-bose
Copy link
Contributor

sss_nss_getgrouplist_timeout() is intended as a replacement for
getgrouplist() which only gets secondary groups from SSSD. Currently it
returns an ENOENT error if there are no secondary groups returned by
SSSD. However, as with getgrouplist(), there is the second parameter
which expects a single GID which will be added to the result. This means
that sss_nss_getgrouplist_timeout() will always return at least this GID
as a result and an ENOENT error does not make sense.

With this patch sss_nss_getgrouplist_timeout() will not return an error
anymore if there are no secondary groups but just a result with the
single GID from the second parameter.

…up list

sss_nss_getgrouplist_timeout() is intended as a replacement for
getgrouplist() which only gets secondary groups from SSSD. Currently it
returns an ENOENT error if there are no secondary groups returned by
SSSD. However, as with getgrouplist(), there is the second parameter
which expects a single GID which will be added to the result. This means
that sss_nss_getgrouplist_timeout() will always return at least this GID
as a result and an ENOENT error does not make sense.

With this patch sss_nss_getgrouplist_timeout() will not return an error
anymore if there are no secondary groups but just a result with the
single GID from the second parameter.
@alexey-tikhonov alexey-tikhonov added Bugzilla backport-to-stable Targets also latest stable branch labels Nov 23, 2023
@alexey-tikhonov
Copy link
Member

Copy link
Contributor

@aplopez aplopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@thalman thalman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK, thanks

@alexey-tikhonov
Copy link
Member

Pushed PR: #7055

  • master
    • cffe6e0 - nssidmap: fix sss_nss_getgrouplist_timeout() with empty secondary group list
  • sssd-2-9
    • e03921e - nssidmap: fix sss_nss_getgrouplist_timeout() with empty secondary group list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-stable Targets also latest stable branch Bugzilla Pushed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants