diff options
author | Günther Deschner <gd@samba.org> | 2009-06-04 12:26:55 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-06-06 01:01:25 +0200 |
commit | 68a1ef21971b5c15db5d0a82acc89791ffceaee0 (patch) | |
tree | 24099223e4d43f241982d52dbff695a498662e72 /lib/nss_wrapper | |
parent | a845cb5ed38b6267f3b6fb6a44db7e5d4a7196dd (diff) | |
download | samba-68a1ef21971b5c15db5d0a82acc89791ffceaee0.tar.gz samba-68a1ef21971b5c15db5d0a82acc89791ffceaee0.tar.bz2 samba-68a1ef21971b5c15db5d0a82acc89791ffceaee0.zip |
nss_wrapper: add support for loading nss_winbind.so via WINBIND_SO_PATH env.
Guenther
Diffstat (limited to 'lib/nss_wrapper')
-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) |