summaryrefslogtreecommitdiff
path: root/src/providers/data_provider_fo.c
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-03-19 15:53:44 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-04-10 15:36:55 +0200
commitf9961e5f82e0ef474d6492371bfdf9e74e208a99 (patch)
tree694e2f0d92c1324fb44c906de911cc4e34685e4a /src/providers/data_provider_fo.c
parent673d4c1932fa4ab1496499207d8627970d0b7561 (diff)
downloadsssd-f9961e5f82e0ef474d6492371bfdf9e74e208a99.tar.gz
sssd-f9961e5f82e0ef474d6492371bfdf9e74e208a99.tar.bz2
sssd-f9961e5f82e0ef474d6492371bfdf9e74e208a99.zip
DNS sites support - SRV lookup plugin interface
https://fedorahosted.org/sssd/ticket/1032 Introduces two new error codes: - ERR_SRV_NOT_FOUND - ERR_SRV_LOOKUP_ERROR Since id_provider is authoritative in case of SRV plugin choise, ability to override the selected pluging during runtime is not desirable. We rely on the fact that id_provider is initialized before all other providers, thus the plugin is set correctly.
Diffstat (limited to 'src/providers/data_provider_fo.c')
-rw-r--r--src/providers/data_provider_fo.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/providers/data_provider_fo.c b/src/providers/data_provider_fo.c
index 04944e52..232717e7 100644
--- a/src/providers/data_provider_fo.c
+++ b/src/providers/data_provider_fo.c
@@ -233,6 +233,27 @@ int be_fo_service_add_callback(TALLOC_CTX *memctx,
return EOK;
}
+void be_fo_set_srv_lookup_plugin(struct be_ctx *ctx,
+ fo_srv_lookup_plugin_send_t send_fn,
+ fo_srv_lookup_plugin_recv_t recv_fn,
+ void *pvt,
+ const char *plugin_name)
+{
+ bool bret;
+
+ DEBUG(SSSDBG_TRACE_FUNC, ("Trying to set SRV lookup plugin to %s\n",
+ plugin_name));
+
+ bret = fo_set_srv_lookup_plugin(ctx->be_fo->fo_ctx, send_fn, recv_fn, pvt);
+ if (bret) {
+ DEBUG(SSSDBG_TRACE_FUNC, ("SRV lookup plugin is now %s\n",
+ plugin_name));
+ } else {
+ DEBUG(SSSDBG_MINOR_FAILURE, ("Unable to set SRV lookup plugin, "
+ "another plugin may be already in place\n"));
+ }
+}
+
int be_fo_add_srv_server(struct be_ctx *ctx,
const char *service_name,
const char *query_service,