RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1244949 - getgrgid for user's UID on a trust client prevents getpw*
Summary: getgrgid for user's UID on a trust client prevents getpw*
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sssd
Version: 7.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Jakub Hrozek
QA Contact: Kaushik Banerjee
URL:
Whiteboard:
Depends On:
Blocks: 1255442
TreeView+ depends on / blocked
 
Reported: 2015-07-20 20:32 UTC by Jakub Hrozek
Modified: 2020-05-02 18:07 UTC (History)
12 users (show)

Fixed In Version: sssd-1.13.0-11.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1255442 (view as bug list)
Environment:
Last Closed: 2015-11-19 11:39:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 3765 0 None None None 2020-05-02 18:07:24 UTC
Red Hat Product Errata RHSA-2015:2355 0 normal SHIPPED_LIVE Low: sssd security, bug fix, and enhancement update 2015-11-19 10:27:42 UTC

Description Jakub Hrozek 2015-07-20 20:32:33 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/2724

When a getgrgid() call comes in for a user's UID, we create a group object in the cache. But since a subdomain is MPG-enabled, we check on cache updates whether an entry with the same name or ID exists and if it does, we just bail out with EEXIST.

We should remove the group object in this case instead to allow sequence of getgrgid(), getpwnam(), getgrgid()...

Comment 1 Jakub Hrozek 2015-07-23 14:04:18 UTC
Test instructions:

- Prepare an IPA server with an AD trusted server and an IPA client. Verify the trust works. Use ID mapping for the setup, not POSIX attributes.

- On the server, run "getent passwd $trusted_ad_user" to see the UID and GID. They should be the same.

- On the client, run "getent group $GID" where GID is the UID/GID of the trusted user. A group entry should be returned. You can also verify with ldbsearh that a group entry was created in the cache

- Again on the client, run "getent passwd $UID" for the same ID value or even for the user's name. With the old packages, nothing would be returned and an EEXIST error would be logged. With the new packages, the user entry would be returned. You can also verify that the cache no longer contains a group entry, but a user entry.

Comment 2 Jakub Hrozek 2015-07-29 16:02:00 UTC
Taking - I have a patch on review.

Comment 3 Jakub Hrozek 2015-07-31 08:21:55 UTC
* master: 6fe057efb981ee4b45dcadf131c03f8501fce28d

Comment 7 Sudhir Menon 2015-09-18 08:28:56 UTC
Verfied On RHEL7.2:

ipa-server-trust-ad-4.2.0-11.el7.x86_64
ipa-server-4.2.0-11.el7.x86_64
ipa-server-dns-4.2.0-11.el7.x86_64
sssd-1.13.0-26.el7.x86_64

Observation:

===IPA-Server===
[smenon@ipa01 ~]$ getent passwd ipa1
ipa1:*:1375001141:1375001141:ipa1:/home/test.in/ipa1:

===IPA-Client===

[smenon@ipaclient01 ~]$  getent group 1375001141
ipa1:*:1375001141:

[root@ipaclient01 db]# sudo ldbsearch -H /var/lib/sss/db/cache_labs01.test.ldb "(&(objectclass=group)(name=ipa1))"
asq: Unable to register control with rootdse!
# record 1
dn: name=ipa1,cn=groups,cn=test.in,cn=sysdb
createTimestamp: 1442565145
gidNumber: 1375001141
name: ipa1
objectClass: group
objectSIDString: S-1-5-21-742749997-2996825573-4184801258-1141
userPrincipalName: ipa1
adAccountExpires: 9223372036854775807
adUserAccountControl: 66048
originalDN: CN=ipa1,CN=Users,DC=test,DC=in
nameAlias: ipa1
isPosix: TRUE
lastUpdate: 1442565145
dataExpireTimestamp: 1442601145
distinguishedName: name=ipa1,cn=groups,cn=test.in,cn=sysdb

# returned 1 records
# 1 entries
# 0 referrals

[root@ipaclient01 db]# getent passwd 1375001141
ipa1:*:1375001141:1375001141:ipa1:/home/test.in/ipa1:

[root@ipaclient01 db]# sudo ldbsearch -H /var/lib/sss/db/cache_labs01.test.ldb "(&(objectclass=group)(name=ipa1))"
asq: Unable to register control with rootdse!
# returned 0 records
# 0 entries
# 0 referrals

Comment 8 errata-xmlrpc 2015-11-19 11:39:17 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/RHSA-2015-2355.html


Note You need to log in before you can comment on or make changes to this bug.