summaryrefslogtreecommitdiff
path: root/nsswitch/wb_common.c
diff options
context:
space:
mode:
authorMatthew Newton <matthew-git@newtoncomputing.co.uk>2015-03-17 00:56:12 +0000
committerJeremy Allison <jra@samba.org>2015-03-18 01:41:32 +0100
commiteb0d6b9999d08c98d51322918b97e9cb9b006279 (patch)
treedfa70223d4f37c8b79784df67327b40315ad4128 /nsswitch/wb_common.c
parentfdb16dd247797eabfdda49d6b6fb40a4642c0664 (diff)
downloadsamba-eb0d6b9999d08c98d51322918b97e9cb9b006279.tar.gz
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 <matthew-git@newtoncomputing.co.uk> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Mar 18 01:41:32 CET 2015 on sn-devel-104
Diffstat (limited to 'nsswitch/wb_common.c')
-rw-r--r--nsswitch/wb_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index 02aab9cac3d..036557a2d6d 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;