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