From d7dc57bcc2468bee756bcd568daee0644e5b888d Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 13 Oct 2010 10:51:50 +0200 Subject: Add netgroups infrastructure to proxy provider --- 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 47c9e8111..de1904c79 100644 --- a/src/providers/proxy/proxy_init.c +++ b/src/providers/proxy/proxy_init.c @@ -207,6 +207,28 @@ int sssm_proxy_id_init(struct be_ctx *bectx, "full groups enumeration!\n", libname)); } + ctx->ops.setnetgrent = proxy_dlsym(handle, "_nss_%s_setnetgrent", libname); + if (!ctx->ops.setnetgrent) { + DEBUG(0, ("Failed to load _nss_%s_setnetgrent, error: %s. " + "The library does not support netgroups.\n", libname, + dlerror())); + } + + ctx->ops.getnetgrent_r = proxy_dlsym(handle, "_nss_%s_getnetgrent_r", + libname); + if (!ctx->ops.getgrent_r) { + DEBUG(0, ("Failed to load _nss_%s_getnetgrent_r, error: %s. " + "The library does not support netgroups.\n", libname, + dlerror())); + } + + ctx->ops.endnetgrent = proxy_dlsym(handle, "_nss_%s_endnetgrent", libname); + if (!ctx->ops.endnetgrent) { + DEBUG(0, ("Failed to load _nss_%s_endnetgrent, error: %s. " + "The library does not support netgroups.\n", libname, + dlerror())); + } + *ops = &proxy_id_ops; *pvt_data = ctx; ret = EOK; -- cgit