From aec5785126354bd8b192f63fe04ea08dae9c0705 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Sat, 21 Jan 2012 12:37:36 -0500 Subject: PROXY: add support for service lookups (non-enumeration) --- src/providers/proxy/proxy_init.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/providers/proxy/proxy_init.c') diff --git a/src/providers/proxy/proxy_init.c b/src/providers/proxy/proxy_init.c index f53d6de1c..b28e65a57 100644 --- a/src/providers/proxy/proxy_init.c +++ b/src/providers/proxy/proxy_init.c @@ -237,6 +237,28 @@ int sssm_proxy_id_init(struct be_ctx *bectx, dlerror())); } + ctx->ops.getservbyname_r = proxy_dlsym(ctx->handle, + "_nss_%s_getservbyname_r", + libname); + if (!ctx->ops.getservbyname_r) { + DEBUG(SSSDBG_MINOR_FAILURE, + ("Failed to load _nss_%s_getservbyname_r, error: %s. " + "The library does not support services.\n", + libname, + dlerror())); + } + + ctx->ops.getservbyport_r = proxy_dlsym(ctx->handle, + "_nss_%s_getservbyport_r", + libname); + if (!ctx->ops.getservbyport_r) { + DEBUG(SSSDBG_MINOR_FAILURE, + ("Failed to load _nss_%s_getservbyport_r, error: %s. " + "The library does not support services.\n", + libname, + dlerror())); + } + *ops = &proxy_id_ops; *pvt_data = ctx; ret = EOK; -- cgit