Bug 2062716

Summary: [Improvement] Add user and group version of sss_nss_getorigbyname()
Product: Red Hat Enterprise Linux 9 Reporter: Alexey Tikhonov <atikhono>
Component: sssdAssignee: Sumit Bose <sbose>
Status: CLOSED ERRATA QA Contact: shridhar <sgadekar>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: grajaiya, jhrozek, lslebodn, mzidek, pbrezina, sgadekar, tscherf
Target Milestone: rcKeywords: Improvement, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: sync-to-jira
Fixed In Version: sssd-2.7.0-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 11:17:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alexey Tikhonov 2022-03-10 12:07:09 UTC
This bug was initially created as a copy of Bug #2062689

I am copying this bug because: to track fix for RHEL9



Description of problem:
For all user and group related calls in libsss_nss_idmap it is possible the indicate if the given argument should related to a user or a group. The only exception is sss_nss_getorigbyname() which might cause issues since in POSIX the user and group namespaces are separate and it is possible that there is a group with the same name as the user and this group is not a user-private group and should be handled as independent object.

Adding sss_nss_getorigbyusername() and sss_nss_getorigbygroupname() similar to e.g. sss_nss_getsidbyuid() and sss_nss_getsidbygid(), should be the straight forward solution.

There is already https://bugzilla.redhat.com/show_bug.cgi?id=2062379 so that that IPA extdom plugin can make use of the new calls if available.

Comment 1 Alexey Tikhonov 2022-03-10 12:38:13 UTC
Upstream PR: https://github.com/SSSD/sssd/pull/6043

Comment 2 Alexey Tikhonov 2022-03-17 11:05:14 UTC
Pushed PR: https://github.com/SSSD/sssd/pull/6043

* `master`
    * 9c5632dfaf67d538727b258f0f4971cf6a7e52c0 - nss: add sss_nss_getorigbyusername and sss_nss_getorigbygroupname

Comment 9 errata-xmlrpc 2022-11-15 11:17:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (sssd bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8325