From 520d2853fb5d41df3bd39bb9546285f244dd3b8c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 29 Jun 2009 16:03:35 -0400 Subject: [PATCH] Remove redundant libPath option from proxy provider The libPath should be constructed from the libName. There is no benefit to specifying it separately. --- server/man/sssd.conf.5.xml | 12 ------------ server/providers/proxy.c | 10 +++++++--- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/server/man/sssd.conf.5.xml b/server/man/sssd.conf.5.xml index 94efe18..833bd71 100644 --- a/server/man/sssd.conf.5.xml +++ b/server/man/sssd.conf.5.xml @@ -564,18 +564,6 @@ - - - libPath (string) - - - File name (including .so) of NSS library - used. For instance, ldap NSS library is named - libnss_ldap.so, the standard files NSS library - is named libnss_files.so - - - diff --git a/server/providers/proxy.c b/server/providers/proxy.c index 3252a74..937b1d0 100644 --- a/server/providers/proxy.c +++ b/server/providers/proxy.c @@ -1359,14 +1359,18 @@ int sssm_proxy_init(struct be_ctx *bectx, ret = confdb_get_string(bectx->cdb, ctx, bectx->conf_path, "libName", NULL, &libname); - ret = confdb_get_string(bectx->cdb, ctx, bectx->conf_path, - "libPath", NULL, &libpath); if (ret != EOK) goto done; - if (libpath == NULL || libname == NULL) { + if (libname == NULL) { ret = ENOENT; goto done; } + libpath = talloc_asprintf(ctx, "libnss_%s.so.2", libname); + if (!libpath) { + ret = ENOMEM; + goto done; + } + handle = dlopen(libpath, RTLD_NOW); if (!handle) { DEBUG(0, ("Unable to load %s module with path, error: %s\n", -- 1.6.2.5