summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-09-05 18:45:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:17 -0500
commit0f0879eacfbef649509f3e2e56d445f1f8efecef (patch)
tree8c88c527b714ac2ed962a5e343e5af97b3d805da /source4/libnet
parent6d362bdb7cdbd6fb062b1b8697b5fa00dc88f631 (diff)
downloadsamba-0f0879eacfbef649509f3e2e56d445f1f8efecef.tar.gz
samba-0f0879eacfbef649509f3e2e56d445f1f8efecef.tar.bz2
samba-0f0879eacfbef649509f3e2e56d445f1f8efecef.zip
r18104: A couple of important fixes to samr domain open so that
the corresponding test may pass. rafal (This used to be commit f0eb209e8478f08e36fa38ae199cfa753f9a8255)
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_domain.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/libnet/libnet_domain.c b/source4/libnet/libnet_domain.c
index 806d9d0fd1..57c0ce6571 100644
--- a/source4/libnet/libnet_domain.c
+++ b/source4/libnet/libnet_domain.c
@@ -267,7 +267,7 @@ struct composite_context *libnet_DomainOpenSamr_send(struct libnet_context *ctx,
s->ctx = ctx;
s->pipe = ctx->samr.pipe;
s->access_mask = io->in.access_mask;
- s->domain_name.string = io->in.domain_name;
+ s->domain_name.string = talloc_strdup(c, io->in.domain_name);
/* check, if there's samr pipe opened already, before opening a domain */
if (ctx->samr.pipe == NULL) {
@@ -360,7 +360,7 @@ NTSTATUS libnet_DomainOpenSamr_recv(struct composite_context *c, struct libnet_c
/* store the resulting handle and related data for use by other
libnet functions */
ctx->samr.handle = s->domain_handle;
- ctx->samr.name = talloc_strdup(ctx, s->domain_name.string);
+ ctx->samr.name = talloc_steal(ctx, s->domain_name.string);
ctx->samr.access_mask = s->access_mask;
}
@@ -739,6 +739,7 @@ NTSTATUS libnet_DomainCloseLsa_recv(struct composite_context *c, struct libnet_c
struct domain_close_samr_state {
struct samr_Close close;
+ struct policy_handle handle;
void (*monitor_fn)(struct monitor_msg*);
};
@@ -773,7 +774,9 @@ struct composite_context* libnet_DomainCloseSamr_send(struct libnet_context *ctx
}
/* prepare close domain handle call arguments */
- s->close.in.handle = &ctx->samr.handle;
+ ZERO_STRUCT(s->close);
+ s->close.in.handle = &ctx->samr.handle;
+ s->close.out.handle = &s->handle;
/* send the request */
close_req = dcerpc_samr_Close_send(ctx->samr.pipe, ctx, &s->close);