|
|
ced1f5 |
From 57a83eb8657a125d203a335b052d965c7a3b15de Mon Sep 17 00:00:00 2001
|
|
|
ced1f5 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
ced1f5 |
Date: Mon, 8 Jan 2018 18:22:17 +0100
|
|
|
ced1f5 |
Subject: [PATCH 92/96] sysdb: add userMappedCertificate to the index
|
|
|
ced1f5 |
MIME-Version: 1.0
|
|
|
ced1f5 |
Content-Type: text/plain; charset=UTF-8
|
|
|
ced1f5 |
Content-Transfer-Encoding: 8bit
|
|
|
ced1f5 |
|
|
|
ced1f5 |
Related to https://pagure.io/SSSD/sssd/issue/3503
|
|
|
ced1f5 |
|
|
|
ced1f5 |
Reviewed-by: Fabiano FidĂȘncio <fidencio@redhat.com>
|
|
|
ced1f5 |
(cherry picked from commit 5b78fff78bb44d1af5420db23b02210f755f5f17)
|
|
|
ced1f5 |
---
|
|
|
ced1f5 |
src/db/sysdb_private.h | 1 +
|
|
|
ced1f5 |
src/db/sysdb_upgrade.c | 12 ++++++++++++
|
|
|
ced1f5 |
2 files changed, 13 insertions(+)
|
|
|
ced1f5 |
|
|
|
ced1f5 |
diff --git a/src/db/sysdb_private.h b/src/db/sysdb_private.h
|
|
|
ced1f5 |
index cac06ba46da23080d1ab661502d0792bd37b9291..c0a8e29ab9578acb27cf8d1db049c4260904fdda 100644
|
|
|
ced1f5 |
--- a/src/db/sysdb_private.h
|
|
|
ced1f5 |
+++ b/src/db/sysdb_private.h
|
|
|
ced1f5 |
@@ -78,6 +78,7 @@
|
|
|
ced1f5 |
"@IDXATTR: canonicalUserPrincipalName\n" \
|
|
|
ced1f5 |
"@IDXATTR: uniqueID\n" \
|
|
|
ced1f5 |
"@IDXATTR: mail\n" \
|
|
|
ced1f5 |
+ "@IDXATTR: userMappedCertificate\n" \
|
|
|
ced1f5 |
"\n" \
|
|
|
ced1f5 |
"dn: @MODULES\n" \
|
|
|
ced1f5 |
"@LIST: asq,memberof\n" \
|
|
|
ced1f5 |
diff --git a/src/db/sysdb_upgrade.c b/src/db/sysdb_upgrade.c
|
|
|
ced1f5 |
index bc157a24664239bc1255e49a1825243a07acc90f..46df971e98f73dc28bc6764a478f13d871515124 100644
|
|
|
ced1f5 |
--- a/src/db/sysdb_upgrade.c
|
|
|
ced1f5 |
+++ b/src/db/sysdb_upgrade.c
|
|
|
ced1f5 |
@@ -2475,6 +2475,18 @@ int sysdb_upgrade_19(struct sysdb_ctx *sysdb, const char **ver)
|
|
|
ced1f5 |
goto done;
|
|
|
ced1f5 |
}
|
|
|
ced1f5 |
|
|
|
ced1f5 |
+ ret = ldb_msg_add_empty(msg, "@IDXATTR", LDB_FLAG_MOD_ADD, NULL);
|
|
|
ced1f5 |
+ if (ret != LDB_SUCCESS) {
|
|
|
ced1f5 |
+ ret = ENOMEM;
|
|
|
ced1f5 |
+ goto done;
|
|
|
ced1f5 |
+ }
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
+ ret = ldb_msg_add_string(msg, "@IDXATTR", SYSDB_USER_MAPPED_CERT);
|
|
|
ced1f5 |
+ if (ret != LDB_SUCCESS) {
|
|
|
ced1f5 |
+ ret = ENOMEM;
|
|
|
ced1f5 |
+ goto done;
|
|
|
ced1f5 |
+ }
|
|
|
ced1f5 |
+
|
|
|
ced1f5 |
ret = ldb_modify(sysdb->ldb, msg);
|
|
|
ced1f5 |
if (ret != LDB_SUCCESS) {
|
|
|
ced1f5 |
ret = sysdb_error_to_errno(ret);
|
|
|
ced1f5 |
--
|
|
|
ced1f5 |
2.14.3
|
|
|
ced1f5 |
|