33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
|
From 06f7005d38d164879b727708feff80004b422f91 Mon Sep 17 00:00:00 2001
|
||
|
From: Sumit Bose <sbose@redhat.com>
|
||
|
Date: Tue, 3 Jul 2018 11:31:12 +0200
|
||
|
Subject: [PATCH 26/83] sysdb: sysdb_certmap_add() handle domains more flexible
|
||
|
|
||
|
sysdb_ldb_msg_attr_to_certmap_info() creates an empty list if there are
|
||
|
no domains defined, sysdb_certmap_add() should be able to handle both a
|
||
|
missing or an empty domains list.
|
||
|
|
||
|
Related to https://pagure.io/SSSD/sssd/issue/3500
|
||
|
|
||
|
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
||
|
---
|
||
|
src/db/sysdb_certmap.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/db/sysdb_certmap.c b/src/db/sysdb_certmap.c
|
||
|
index e37f1ba..0bcc54c 100644
|
||
|
--- a/src/db/sysdb_certmap.c
|
||
|
+++ b/src/db/sysdb_certmap.c
|
||
|
@@ -131,7 +131,7 @@ static errno_t sysdb_certmap_add(struct sysdb_ctx *sysdb,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
- if (certmap->domains != NULL) {
|
||
|
+ if (certmap->domains != NULL && certmap->domains[0] != NULL) {
|
||
|
for (c = 0; certmap->domains[c] != NULL; c++);
|
||
|
el = talloc_zero(tmp_ctx, struct ldb_message_element);
|
||
|
if (el == NULL) {
|
||
|
--
|
||
|
2.9.5
|
||
|
|