[PATCH] Use common routines to interface to libwbclient auth
Jeremy Allison
jra at samba.org
Wed Apr 9 13:39:50 MDT 2014
On Wed, Apr 09, 2014 at 03:26:04PM +1200, Andrew Bartlett wrote:
> This patch makes the code to convert from an 'info3' as exposed by
> libwbclient common. This is not yet used in any useful way (and may not
> be the long-term way we integrate with winbindd due to async issues),
> but it seems poor to keep a known-wrong set of the code around when we
> can just re-use the working code.
>
> Please review/push.
Needs a NULL check in the second patch.
You have:
-----------------------------------------------------
@@ -303,11 +222,11 @@ static NTSTATUS winbind_check_password_wbclient(struct auth_method_context *ctx,
wbc_status, wbcErrorString(wbc_status)));
return NT_STATUS_LOGON_FAILURE;
}
- nt_status = get_info3_from_wbcAuthUserInfo(mem_ctx, info, &info3);
+ info3 = wbcAuthUserInfo_to_netr_SamInfo3(mem_ctx, info);
wbcFreeMemory(info);
NT_STATUS_NOT_OK_RETURN(nt_status);
- validation.sam3 = &info3;
+ validation.sam3 = info3;
nt_status = make_user_info_dc_netlogon_validation(mem_ctx,
user_info->client.account_name,
3, &validation,
--
1.9.1
-----------------------------------------------------
As wbcAuthUserInfo_to_netr_SamInfo3() can return NULL
you need a :
if (info3 == NULL) {
wbcFreeMemory(info);
return NT_STATUS_NO_MEMORY;
}
check here I think.
Cheers,
Jeremy.
More information about the samba-technical
mailing list