diff options
-rw-r--r-- | lib/nss_wrapper/nss_wrapper.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/nss_wrapper/nss_wrapper.c b/lib/nss_wrapper/nss_wrapper.c index 4f98b68096..73ca6eb3a5 100644 --- a/lib/nss_wrapper/nss_wrapper.c +++ b/lib/nss_wrapper/nss_wrapper.c @@ -480,6 +480,8 @@ static bool nwrap_module_init(const char *name, static void nwrap_backend_init(struct nwrap_main *r) { + const char *winbind_so_path = getenv("NSS_WRAPPER_WINBIND_SO_PATH"); + r->num_backends = 0; r->backends = NULL; @@ -490,6 +492,16 @@ static void nwrap_backend_init(struct nwrap_main *r) __location__)); return; } + + if (winbind_so_path && strlen(winbind_so_path)) { + if (!nwrap_module_init("winbind", &nwrap_module_ops, winbind_so_path, + &r->num_backends, + &r->backends)) { + NWRAP_ERROR(("%s: failed to initialize 'winbind' backend\n", + __location__)); + return; + } + } } static void nwrap_init(void) |