Bug 1185188

Summary: Uncached SIDs cannot be resolved
Product: Red Hat Enterprise Linux 7 Reporter: Sumit Bose <sbose>
Component: sssdAssignee: SSSD Maintainers <sssd-maint>
Status: CLOSED ERRATA QA Contact: Kaushik Banerjee <kbanerje>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.1CC: grajaiya, jgalipea, jhrozek, lslebodn, mkosek, mzidek, nsoman, pbrezina, preichl, sgoveas
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.12.2-47.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:35:23 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 Sumit Bose 2015-01-23 08:18:09 UTC
Description of problem:
If a SID should be resolved to a user or group name which is not in the cache the request fails. This breaks e.g. some features on the IPA server.

Version-Release number of selected component (if applicable):
sssd-1.12.2-45.el7

How reproducible:
To reproduce call

python -c "import pysss_nss_idmap; print pysss_nss_idmap.getnamebysid('S-1-5-21-3456664713-2053453454-4165325232-500')"

on a IPA client or server with a trust to AD where the SID (S-1-5-....) exists in AD but is not in the cache of SSSD, e.g. start SSSD with an empty cache.

Actual results:
Nothing is returned

Expected results:
The nane of the user or group related to the given SID should be returned.

Additional info:
Patch available upstream

Comment 1 Jakub Hrozek 2015-01-23 11:42:05 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/2566

Comment 2 Jakub Hrozek 2015-01-23 12:31:24 UTC
Fixed upstream:
    master: d6ddc35574ba897cf9b5de3350086d9d8604f06f
    sssd-1-12: 97c0a591a1e09be520a6faaf51a4ba72d76f0c24

Comment 5 Steeve Goveas 2015-01-28 09:33:38 UTC
Verified in version

[root@vm-idm-019 ~]# rpm -q sssd
sssd-1.12.2-52.el7.x86_64

On Server
* To get the aduser sid
[root@vm-idm-019 ~]# python -c "import pysss_nss_idmap; print pysss_nss_idmap.getsidbyname('aduser1')"
{'aduser1': {'type': 3, 'sid': u'S-1-5-21-1910160501-511572375-3625658879-1313'}}

[root@vm-idm-019 ~]# service sssd stop; rm -rf /var/lib/sss/{db,mc}/*; service sssd start

[root@vm-idm-019 ~]# python -c "import pysss_nss_idmap; print pysss_nss_idmap.getnamebysid('S-1-5-21-1910160501-511572375-3625658879-1313')"
{'S-1-5-21-1910160501-511572375-3625658879-1313': {'type': 3, 'name': u'aduser1'}}

On Client
[root@bumblebee ~]# service sssd stop; rm -rf /var/lib/sss/{db,mc}/*; service sssd start

[root@bumblebee ~]# python -c "import pysss_nss_idmap; print pysss_nss_idmap.getnamebysid('S-1-5-21-1910160501-511572375-3625658879-1313')"
{'S-1-5-21-1910160501-511572375-3625658879-1313': {'type': 3, 'name': u'aduser1'}}

Comment 7 errata-xmlrpc 2015-03-05 10:35:23 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, 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://rhn.redhat.com/errata/RHBA-2015-0441.html