From 63bb1e21ebac68f904c01fb58ac7c06a9bcb8ab0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 27 May 2003 16:47:04 +0000 Subject: [PATCH] volker's fix for crash when my_private_data == NULL --- source/auth/auth_winbind.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/auth/auth_winbind.c b/source/auth/auth_winbind.c index 79395a99c9c..b8276b08661 100644 --- a/source/auth/auth_winbind.c +++ b/source/auth/auth_winbind.c @@ -103,9 +103,15 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context, result = winbindd_request(WINBINDD_PAM_AUTH_CRAP, &request, &response); - if (result == NSS_STATUS_UNAVAIL) { + if ( result == NSS_STATUS_UNAVAIL ) { struct auth_methods *auth_method = my_private_data; - return auth_method->auth(auth_context, auth_method->private_data, mem_ctx, user_info, server_info); + + if ( auth_method ) + return auth_method->auth(auth_context, auth_method->private_data, + mem_ctx, user_info, server_info); + else + /* log an error since this should not happen */ + DEBUG(0,("check_winbind_security: ERROR! my_private_data == NULL!\n")); } nt_status = NT_STATUS(response.data.auth.nt_status); -- 2.11.4.GIT