dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0051-simple-access-match-objects-using-flat-name.patch

2fc102
From 9df26b2f56d249ce69f7fd7d5c40b55dfe119e93 Mon Sep 17 00:00:00 2001
2fc102
From: Pavel Reichl <pavel.reichl@redhat.com>
2fc102
Date: Wed, 8 Jan 2014 15:46:57 +0000
2fc102
Subject: [PATCH 51/53] simple access: match objects using flat name
2fc102
2fc102
Use flat name to recognise users and groups belonging to main sssd domain.
2fc102
2fc102
Resolves:
2fc102
https://fedorahosted.org/sssd/ticket/2189
2fc102
---
2fc102
 src/providers/simple/simple_access.c | 4 +++-
2fc102
 1 file changed, 3 insertions(+), 1 deletion(-)
2fc102
2fc102
diff --git a/src/providers/simple/simple_access.c b/src/providers/simple/simple_access.c
2fc102
index 46b045e531dfc5fcdff4fc4f5370734aca1e377c..f2bfe755039fd7a370749fd3ce94a47c62c216bc 100644
2fc102
--- a/src/providers/simple/simple_access.c
2fc102
+++ b/src/providers/simple/simple_access.c
2fc102
@@ -140,7 +140,9 @@ static errno_t simple_access_parse_names(TALLOC_CTX *mem_ctx,
2fc102
             goto done;
2fc102
         }
2fc102
 
2fc102
-        if (domain == NULL || strcasecmp(domain, be_ctx->domain->name) == 0) {
2fc102
+        if (domain == NULL || strcasecmp(domain, be_ctx->domain->name) == 0 ||
2fc102
+            (be_ctx->domain->flat_name != NULL &&
2fc102
+             strcasecmp(domain, be_ctx->domain->flat_name) == 0)) {
2fc102
             /* This object belongs to main SSSD domain. Those users and groups
2fc102
              * are stored without domain part, so we will strip it off.
2fc102
              * */
2fc102
-- 
2fc102
1.8.4.2
2fc102