dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0172-nss-Add-original-DN-and-memberOf-to-origbyname-reque.patch

905b4d
From ac9d460c61bf3bdb3aed5d96541d7e5baf8d9648 Mon Sep 17 00:00:00 2001
905b4d
From: Sumit Bose <sbose@redhat.com>
905b4d
Date: Tue, 20 Jan 2015 12:51:57 +0100
905b4d
Subject: [PATCH 172/172] nss: Add original DN and memberOf to origbyname
905b4d
 request
905b4d
905b4d
IPA HBAC evaluation relies on the original values for DN and memberOf
905b4d
attributes.
905b4d
905b4d
Resolves https://fedorahosted.org/sssd/ticket/2560
905b4d
905b4d
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
905b4d
(cherry picked from commit 7543052f562f157f7b17fdc46a6777d80c0cb3bd)
905b4d
---
905b4d
 src/responder/nss/nsssrv_cmd.c  | 4 ++++
905b4d
 src/tests/cmocka/test_nss_srv.c | 3 +--
905b4d
 2 files changed, 5 insertions(+), 2 deletions(-)
905b4d
905b4d
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
905b4d
index 6b9988548cdb25873e0c59503595e42d69b8d8e1..324688eeeb90109a31391d01a9e1cd96707da7ed 100644
905b4d
--- a/src/responder/nss/nsssrv_cmd.c
905b4d
+++ b/src/responder/nss/nsssrv_cmd.c
905b4d
@@ -4160,6 +4160,8 @@ static errno_t nss_cmd_getsidby_search(struct nss_dom_ctx *dctx)
905b4d
                                    SYSDB_AD_ACCOUNT_EXPIRES,
905b4d
                                    SYSDB_AD_USER_ACCOUNT_CONTROL,
905b4d
                                    SYSDB_SSH_PUBKEY,
905b4d
+                                   SYSDB_ORIG_DN,
905b4d
+                                   SYSDB_ORIG_MEMBEROF,
905b4d
                                    SYSDB_DEFAULT_ATTRS, NULL};
905b4d
     const char **attrs;
905b4d
     bool user_found = false;
905b4d
@@ -4688,6 +4690,8 @@ static errno_t fill_orig(struct sss_packet *packet,
905b4d
                                     SYSDB_AD_ACCOUNT_EXPIRES,
905b4d
                                     SYSDB_AD_USER_ACCOUNT_CONTROL,
905b4d
                                     SYSDB_SSH_PUBKEY,
905b4d
+                                    SYSDB_ORIG_DN,
905b4d
+                                    SYSDB_ORIG_MEMBEROF,
905b4d
                                     NULL};
905b4d
     struct sized_string *keys;
905b4d
     struct sized_string *vals;
905b4d
diff --git a/src/tests/cmocka/test_nss_srv.c b/src/tests/cmocka/test_nss_srv.c
905b4d
index d7825e4384a4cc91407ed4bc66a1e190d558369f..ba84fccf718c1a3f4a8ff20a54d8e82c2aa58a1e 100644
905b4d
--- a/src/tests/cmocka/test_nss_srv.c
905b4d
+++ b/src/tests/cmocka/test_nss_srv.c
905b4d
@@ -52,8 +52,7 @@ struct nss_test_ctx {
905b4d
     bool ncache_hit;
905b4d
 };
905b4d
 
905b4d
-const char *global_extra_attrs[] = {"phone", "mobile", SYSDB_ORIG_MEMBEROF,
905b4d
-                                    NULL};
905b4d
+const char *global_extra_attrs[] = {"phone", "mobile", NULL};
905b4d
 
905b4d
 struct nss_test_ctx *nss_test_ctx;
905b4d
 
905b4d
-- 
905b4d
2.1.0
905b4d