|
|
4c9df62 |
From 8cf5e390b38f0be4f88b0ebbbd1b14f52d35cd02 Mon Sep 17 00:00:00 2001
|
|
|
4c9df62 |
From: Lukas Slebodnik <lslebodn@redhat.com>
|
|
|
4c9df62 |
Date: Thu, 30 Nov 2017 07:59:33 +0100
|
|
|
4c9df62 |
Subject: [PATCH 78/79] confdb: Do not start implicit_files with proxy domain
|
|
|
4c9df62 |
|
|
|
4c9df62 |
id_provider = proxy + proxy_lib_name = files is equivalent
|
|
|
4c9df62 |
to id_provider = files. But requests to user hit implicit_files
|
|
|
4c9df62 |
domain instead of proxy domain and therefore it broke usage
|
|
|
4c9df62 |
of proxy domain with auth_provider = krb5.
|
|
|
4c9df62 |
|
|
|
4c9df62 |
Resolves:
|
|
|
4c9df62 |
https://pagure.io/SSSD/sssd/issue/3590
|
|
|
4c9df62 |
---
|
|
|
4c9df62 |
src/confdb/confdb.c | 22 +++++++++++++++++++++-
|
|
|
4c9df62 |
1 file changed, 21 insertions(+), 1 deletion(-)
|
|
|
4c9df62 |
|
|
|
4c9df62 |
diff --git a/src/confdb/confdb.c b/src/confdb/confdb.c
|
|
|
4c9df62 |
index ef1be4a6e6daee2644d535e561fac7735eb6a0b2..0a4be57e08791f8a9eb5fc143a56352cd4ef4b5e 100644
|
|
|
4c9df62 |
--- a/src/confdb/confdb.c
|
|
|
4c9df62 |
+++ b/src/confdb/confdb.c
|
|
|
4c9df62 |
@@ -1769,6 +1769,25 @@ static bool need_implicit_files_domain(TALLOC_CTX *tmp_ctx,
|
|
|
4c9df62 |
if (strcasecmp(id_provider, "files") == 0) {
|
|
|
4c9df62 |
return false;
|
|
|
4c9df62 |
}
|
|
|
4c9df62 |
+
|
|
|
4c9df62 |
+ if (strcasecmp(id_provider, "proxy") == 0) {
|
|
|
4c9df62 |
+ val = ldb_msg_find_attr_as_string(doms->msgs[i],
|
|
|
4c9df62 |
+ CONFDB_PROXY_LIBNAME, NULL);
|
|
|
4c9df62 |
+ if (val == NULL) {
|
|
|
4c9df62 |
+ DEBUG(SSSDBG_OP_FAILURE,
|
|
|
4c9df62 |
+ "The object [%s] doesn't have proxy_lib_name with "
|
|
|
4c9df62 |
+ "id_provider proxy\n",
|
|
|
4c9df62 |
+ ldb_dn_get_linearized(doms->msgs[i]->dn));
|
|
|
4c9df62 |
+ continue;
|
|
|
4c9df62 |
+ }
|
|
|
4c9df62 |
+
|
|
|
4c9df62 |
+ /* id_provider = proxy + proxy_lib_name = files is equivalent
|
|
|
4c9df62 |
+ * to id_provider = files
|
|
|
4c9df62 |
+ */
|
|
|
4c9df62 |
+ if (strcmp(val, "files") == 0) {
|
|
|
4c9df62 |
+ return false;
|
|
|
4c9df62 |
+ }
|
|
|
4c9df62 |
+ }
|
|
|
4c9df62 |
}
|
|
|
4c9df62 |
|
|
|
4c9df62 |
return true;
|
|
|
4c9df62 |
@@ -1780,7 +1799,8 @@ static int confdb_has_files_domain(struct confdb_ctx *cdb)
|
|
|
4c9df62 |
struct ldb_dn *dn = NULL;
|
|
|
4c9df62 |
struct ldb_result *res = NULL;
|
|
|
4c9df62 |
static const char *attrs[] = { CONFDB_DOMAIN_ID_PROVIDER,
|
|
|
4c9df62 |
- CONFDB_DOMAIN_ATTR, NULL };
|
|
|
4c9df62 |
+ CONFDB_DOMAIN_ATTR,
|
|
|
4c9df62 |
+ CONFDB_PROXY_LIBNAME, NULL };
|
|
|
4c9df62 |
int ret;
|
|
|
4c9df62 |
bool need_files_dom;
|
|
|
4c9df62 |
|
|
|
4c9df62 |
--
|
|
|
4c9df62 |
2.15.1
|
|
|
4c9df62 |
|