r26644: Janitorial: Pass resolve_context explicitly to various SMB functions, should...
[samba.git] / source4 / auth / auth_winbind.c
index bfbcbbfd5dd545d598be5add08762f0ac6e2e870..89ae3195dfd95b84d8630b3ae06f5b31a807f471 100644 (file)
@@ -29,7 +29,7 @@
 #include "lib/messaging/irpc.h"
 #include "param/param.h"
 
-static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response *response, struct netr_SamInfo3 *info3)
+static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_convenience, struct winbindd_response *response, struct netr_SamInfo3 *info3)
 {
        size_t len = response->length - sizeof(struct winbindd_response);
        if (len > 4) {
@@ -39,7 +39,7 @@ static NTSTATUS get_info3_from_ndr(TALLOC_CTX *mem_ctx, struct winbindd_response
                blob.data = (uint8_t *)(((char *)response->extra_data.data) + 4);
 
                ndr_err = ndr_pull_struct_blob(&blob, mem_ctx, 
-                              lp_iconv_convenience(global_loadparm), info3,
+                              iconv_convenience, info3,
                              (ndr_pull_flags_fn_t)ndr_pull_netr_SamInfo3);
                if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                        return ndr_map_error2ntstatus(ndr_err);
@@ -122,7 +122,7 @@ static NTSTATUS winbind_check_password_samba3(struct auth_method_context *ctx,
        if (result == NSS_STATUS_SUCCESS && response.extra_data.data) {
                union netr_Validation validation;
 
-               nt_status = get_info3_from_ndr(mem_ctx, &response, &info3);
+               nt_status = get_info3_from_ndr(mem_ctx, lp_iconv_convenience(ctx->auth_ctx->lp_ctx), &response, &info3);
                SAFE_FREE(response.extra_data.data);
                NT_STATUS_NOT_OK_RETURN(nt_status);