r24112: Complete initialistion of the libnet_ctx when setting up the domain.
authorAndrew Bartlett <abartlet@samba.org>
Wed, 1 Aug 2007 04:05:06 +0000 (04:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:01:27 +0000 (15:01 -0500)
We need to set the access_mask and the domain name, or else libnet
will try to do this itself.

This seems to fix the issues Kai was having.

Andrew Bartlett

source/winbind/wb_init_domain.c

index eabb23dd4516a015d6aa99a0c64f9d049339eb52..54b1589e2706abbf1aef370484aaf06ff5906b56 100644 (file)
@@ -284,6 +284,8 @@ static void init_domain_recv_lsa_pipe(struct composite_context *ctx)
 
        talloc_steal(state->domain->libnet_ctx, state->domain->libnet_ctx->lsa.pipe);
        talloc_steal(state->domain->libnet_ctx->lsa.pipe, state->domain->lsa_binding);
+       state->domain->libnet_ctx->lsa.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+       state->domain->libnet_ctx->lsa.name = state->domain->info->name;
 
        ZERO_STRUCT(state->domain->libnet_ctx->lsa.handle);
        state->lsa_openpolicy.in.system_name =
@@ -392,6 +394,8 @@ static void init_domain_recv_samr(struct composite_context *ctx)
        if (!composite_is_ok(state->ctx)) return;
 
        talloc_steal(state->domain->libnet_ctx->samr.pipe, state->domain->samr_binding);
+       state->domain->libnet_ctx->samr.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
+       state->domain->libnet_ctx->samr.name = state->domain->info->name;
 
        state->domain->ldap_conn =
                ldap4_new_connection(state->domain, state->ctx->event_ctx);