URL: https://github.com/freeipa/freeipa/pull/2695 Author: tiran Title: #2695: [Backport][ipa-4-7] ipa-sidgen: make internal fetch_attr helper really internal Action: opened
PR body: """ This PR was opened automatically because PR #2693 was pushed to master and backport to ipa-4-7 is required. """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/2695/head:pr2695 git checkout pr2695
From c858cf978dee5529481811ee6574798ae5980ee5 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy <aboko...@redhat.com> Date: Fri, 14 Dec 2018 14:02:26 +0200 Subject: [PATCH] ipa-sidgen: make internal fetch_attr helper really internal With 389-ds landing a change for https://pagure.io/389-ds-base/issue/49950, fetch_attr() helper function is exposed in slapi-plugin.h. However, in order to be able to build FreeIPA plugins against older 389-ds versions, prefer using a local variant of it. Rename fetch_attr() to ipa_sidgen_fetch_attr() so that it doesn't conflict at all. Fixes: https://pagure.io/freeipa/issue/7811 --- daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c b/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c index 9e474e83dd..007b1c945d 100644 --- a/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c +++ b/daemons/ipa-slapi-plugins/ipa-sidgen/ipa_sidgen_task.c @@ -63,7 +63,7 @@ struct worker_ctx { struct range_info **ranges; }; -static const char *fetch_attr(Slapi_Entry *e, const char *attrname, +static const char *ipa_sidgen_fetch_attr(Slapi_Entry *e, const char *attrname, const char *default_val) { Slapi_Attr *attr; @@ -242,7 +242,7 @@ int sidgen_task_add(Slapi_PBlock *pb, Slapi_Entry *e, worker_ctx->plugin_id = global_sidgen_plugin_id; - str = fetch_attr(e, "delay", NULL); + str = ipa_sidgen_fetch_attr(e, "delay", NULL); if (str != NULL) { errno = 0; worker_ctx->delay = strtol(str, &endptr, 10); @@ -255,7 +255,7 @@ int sidgen_task_add(Slapi_PBlock *pb, Slapi_Entry *e, } LOG("delay is [%li].\n", worker_ctx->delay); - str = fetch_attr(e, "nsslapd-basedn", NULL); + str = ipa_sidgen_fetch_attr(e, "nsslapd-basedn", NULL); if (str == NULL) { LOG_FATAL("Missing nsslapd-basedn!\n"); *returncode = LDAP_CONSTRAINT_VIOLATION;
_______________________________________________ FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org