|
|
b01884 |
From 2b30b637561eb56a1fb73164322c9a74c8365c0b Mon Sep 17 00:00:00 2001
|
|
|
b01884 |
From: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
b01884 |
Date: Fri, 14 Dec 2018 14:02:26 +0200
|
|
|
b01884 |
Subject: [PATCH] ipa-sidgen: make internal fetch_attr helper really internal
|
|
|
b01884 |
|
|
|
b01884 |
With 389-ds landing a change for
|
|
|
b01884 |
https://pagure.io/389-ds-base/issue/49950, fetch_attr() helper function
|
|
|
b01884 |
is exposed in slapi-plugin.h. However, in order to be able to build
|
|
|
b01884 |
FreeIPA plugins against older 389-ds versions, prefer using a local
|
|
|
b01884 |
variant of it.
|
|
|
b01884 |
|
|
|
b01884 |
Rename fetch_attr() to ipa_sidgen_fetch_attr() so that it doesn't
|
|
|
b01884 |
conflict at all.
|
|
|
b01884 |
|
|
|
b01884 |
Fixes: https://pagure.io/freeipa/issue/7811
|
|
|
b01884 |
Reviewed-By: Christian Heimes <cheimes@redhat.com>
|
|
|
b01884 |
---
|
|
|
b01884 |
daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c | 6 +++---
|
|
|
b01884 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
b01884 |
|
|
|
b01884 |
diff --git a/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c b/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c
|
|
|
b01884 |
index 9e474e83dd..007b1c945d 100644
|
|
|
b01884 |
--- a/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c
|
|
|
b01884 |
+++ b/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c
|
|
|
b01884 |
@@ -63,7 +63,7 @@ struct worker_ctx {
|
|
|
b01884 |
struct range_info **ranges;
|
|
|
b01884 |
};
|
|
|
b01884 |
|
|
|
b01884 |
-static const char *fetch_attr(Slapi_Entry *e, const char *attrname,
|
|
|
b01884 |
+static const char *ipa_sidgen_fetch_attr(Slapi_Entry *e, const char *attrname,
|
|
|
b01884 |
const char *default_val)
|
|
|
b01884 |
{
|
|
|
b01884 |
Slapi_Attr *attr;
|
|
|
b01884 |
@@ -242,7 +242,7 @@ int sidgen_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
|
|
|
b01884 |
|
|
|
b01884 |
worker_ctx->plugin_id = global_sidgen_plugin_id;
|
|
|
b01884 |
|
|
|
b01884 |
- str = fetch_attr(e, "delay", NULL);
|
|
|
b01884 |
+ str = ipa_sidgen_fetch_attr(e, "delay", NULL);
|
|
|
b01884 |
if (str != NULL) {
|
|
|
b01884 |
errno = 0;
|
|
|
b01884 |
worker_ctx->delay = strtol(str, &endptr, 10);
|
|
|
b01884 |
@@ -255,7 +255,7 @@ int sidgen_task_add(Slapi_PBlock *pb, Slapi_Entry *e,
|
|
|
b01884 |
}
|
|
|
b01884 |
LOG("delay is [%li].\n", worker_ctx->delay);
|
|
|
b01884 |
|
|
|
b01884 |
- str = fetch_attr(e, "nsslapd-basedn", NULL);
|
|
|
b01884 |
+ str = ipa_sidgen_fetch_attr(e, "nsslapd-basedn", NULL);
|
|
|
b01884 |
if (str == NULL) {
|
|
|
b01884 |
LOG_FATAL("Missing nsslapd-basedn!\n");
|
|
|
b01884 |
*returncode = LDAP_CONSTRAINT_VIOLATION;
|