URL: https://github.com/SSSD/sssd/pull/490
Author: sumit-bose
 Title: #490: sysdb: add userMappedCertificate to the index
Action: opened

PR body:
"""
Related to https://pagure.io/SSSD/sssd/issue/3503
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/490/head:pr490
git checkout pr490
From 2bc1832e0187eb808f582d4edf54518c8762b679 Mon Sep 17 00:00:00 2001
From: Sumit Bose <[email protected]>
Date: Mon, 8 Jan 2018 18:22:17 +0100
Subject: [PATCH] sysdb: add userMappedCertificate to the index

Related to https://pagure.io/SSSD/sssd/issue/3503
---
 src/db/sysdb_private.h |  1 +
 src/db/sysdb_upgrade.c | 12 ++++++++++++
 2 files changed, 13 insertions(+)

diff --git a/src/db/sysdb_private.h b/src/db/sysdb_private.h
index 5e3b80df4..d1f2bd40a 100644
--- a/src/db/sysdb_private.h
+++ b/src/db/sysdb_private.h
@@ -78,6 +78,7 @@
      "@IDXATTR: canonicalUserPrincipalName\n" \
      "@IDXATTR: uniqueID\n" \
      "@IDXATTR: mail\n" \
+     "@IDXATTR: userMappedCertificate\n" \
      "\n" \
      "dn: @MODULES\n" \
      "@LIST: asq,memberof\n" \
diff --git a/src/db/sysdb_upgrade.c b/src/db/sysdb_upgrade.c
index bc157a246..46df971e9 100644
--- a/src/db/sysdb_upgrade.c
+++ b/src/db/sysdb_upgrade.c
@@ -2475,6 +2475,18 @@ int sysdb_upgrade_19(struct sysdb_ctx *sysdb, const char **ver)
         goto done;
     }
 
+    ret = ldb_msg_add_empty(msg, "@IDXATTR", LDB_FLAG_MOD_ADD, NULL);
+    if (ret != LDB_SUCCESS) {
+        ret = ENOMEM;
+        goto done;
+    }
+
+    ret = ldb_msg_add_string(msg, "@IDXATTR", SYSDB_USER_MAPPED_CERT);
+    if (ret != LDB_SUCCESS) {
+        ret = ENOMEM;
+        goto done;
+    }
+
     ret = ldb_modify(sysdb->ldb, msg);
     if (ret != LDB_SUCCESS) {
         ret = sysdb_error_to_errno(ret);
_______________________________________________
sssd-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to