dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0162-IPA-make-version-check-more-precise.patch

905b4d
From 8eb022f5a34e86b091c62fb0c9b30834021f1e23 Mon Sep 17 00:00:00 2001
905b4d
From: Sumit Bose <sbose@redhat.com>
905b4d
Date: Fri, 5 Dec 2014 11:03:48 +0100
905b4d
Subject: [PATCH 162/167] IPA: make version check more precise
905b4d
905b4d
The call protected by the check does not only expect the version 1 of
905b4d
the extdom plugin is used but a specific response type as well. Since
905b4d
version 1 can return older response types as well we want to be on the
905b4d
safe side.
905b4d
905b4d
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
905b4d
(cherry picked from commit 2fc12875f7d51248799016c19c1298b85e06a286)
905b4d
---
905b4d
 src/providers/ipa/ipa_s2n_exop.c | 4 ++--
905b4d
 1 file changed, 2 insertions(+), 2 deletions(-)
905b4d
905b4d
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
905b4d
index 1d9a79a383e47fcdd37f30a24327ae76facea5b9..b02387a827b7da27d944db8f7fa326f153e12715 100644
905b4d
--- a/src/providers/ipa/ipa_s2n_exop.c
905b4d
+++ b/src/providers/ipa/ipa_s2n_exop.c
905b4d
@@ -759,7 +759,7 @@ static errno_t s2n_response_to_attrs(TALLOC_CTX *mem_ctx,
905b4d
             attrs->a.user.pw_uid = uid;
905b4d
             attrs->a.user.pw_gid = gid;
905b4d
 
905b4d
-            if (is_v1) {
905b4d
+            if (is_v1 && type == RESP_USER_GROUPLIST) {
905b4d
                 ret = add_v1_user_data(ber, attrs);
905b4d
                 if (ret != EOK) {
905b4d
                     DEBUG(SSSDBG_OP_FAILURE, "add_v1_user_data failed.\n");
905b4d
@@ -798,7 +798,7 @@ static errno_t s2n_response_to_attrs(TALLOC_CTX *mem_ctx,
905b4d
 
905b4d
             attrs->a.group.gr_gid = gid;
905b4d
 
905b4d
-            if (is_v1) {
905b4d
+            if (is_v1 && type == RESP_GROUP_MEMBERS) {
905b4d
                 ret = add_v1_group_data(ber, attrs);
905b4d
                 if (ret != EOK) {
905b4d
                     DEBUG(SSSDBG_OP_FAILURE, "add_v1_group_data failed.\n");
905b4d
-- 
905b4d
2.1.0
905b4d