[PATCH] Use common routines to interface to libwbclient auth

Andrew Bartlett abartlet at samba.org
Wed Apr 9 14:28:10 MDT 2014


On Wed, 2014-04-09 at 12:39 -0700, Jeremy Allison wrote:
> 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,

Thanks, well spotted. 

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba




More information about the samba-technical mailing list