From 5e0360f6842e5eb4d777bdd0cbccb83aa2c44f53 Mon Sep 17 00:00:00 2001 From: Matthew Newton Date: Tue, 17 Mar 2015 00:56:12 +0000 Subject: [PATCH] Ensure we always initialise the winbind context Stops segfault when a context is passed. Internal Samba code will currently always call this with NULL so won't trigger the bug. Signed-off-by: Matthew Newton --- nsswitch/wb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index 02aab9c..036557a 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -746,7 +746,7 @@ NSS_STATUS winbindd_priv_request_response(struct winbindd_context *ctx, { NSS_STATUS status = NSS_STATUS_UNAVAIL; int count = 0; - struct winbindd_context *wb_ctx; + struct winbindd_context *wb_ctx = ctx; if (ctx == NULL) { wb_ctx = &wb_global_ctx; -- 1.7.10.4