summaryrefslogtreecommitdiff
path: root/source4/librpc
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-03-10 10:31:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:56:53 -0500
commit5e5953a4af097801a43356afe39337262e0d84f7 (patch)
tree5239a81d9ab2041aecf07775bde3f6a21d402e41 /source4/librpc
parent640509e6a71556f95c2688a1d62df27da6ff8da1 (diff)
downloadsamba-5e5953a4af097801a43356afe39337262e0d84f7.tar.gz
samba-5e5953a4af097801a43356afe39337262e0d84f7.tar.bz2
samba-5e5953a4af097801a43356afe39337262e0d84f7.zip
r14136: Fix bug causing segfaults in certain circumstances (gcc3.x among
others, probably). Funny thing, it didn't segfault on my laptop and gcc4... rafal (This used to be commit 9e3321130e57daccd9649afc3af581a03655090e)
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_util.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c
index 5ca067a09f..d0676d5f6d 100644
--- a/source4/librpc/rpc/dcerpc_util.c
+++ b/source4/librpc/rpc/dcerpc_util.c
@@ -763,6 +763,8 @@ struct epm_map_binding_state {
struct dcerpc_binding *binding;
const struct dcerpc_interface_table *table;
struct dcerpc_pipe *pipe;
+ struct policy_handle handle;
+ struct GUID guid;
struct epm_twr_t twr;
struct epm_twr_t *twr_r;
struct epm_Map r;
@@ -775,8 +777,6 @@ static void continue_epm_map(struct rpc_request *req);
static void continue_epm_recv_binding(struct composite_context *ctx)
{
- struct policy_handle handle;
- struct GUID guid;
struct rpc_request *map_req;
struct composite_context *c = talloc_get_type(ctx->async.private_data,
@@ -787,8 +787,8 @@ static void continue_epm_recv_binding(struct composite_context *ctx)
c->status = dcerpc_pipe_connect_b_recv(ctx, c, &s->pipe);
if (!composite_is_ok(c)) return;
- ZERO_STRUCT(handle);
- ZERO_STRUCT(guid);
+ ZERO_STRUCT(s->handle);
+ ZERO_STRUCT(s->guid);
s->binding->object = s->table->uuid;
s->binding->object_version = s->table->if_version;
@@ -797,11 +797,11 @@ static void continue_epm_recv_binding(struct composite_context *ctx)
if (!composite_is_ok(c)) return;
/* with some nice pretty paper around it of course */
- s->r.in.object = &guid;
+ s->r.in.object = &s->guid;
s->r.in.map_tower = &s->twr;
- s->r.in.entry_handle = &handle;
+ s->r.in.entry_handle = &s->handle;
s->r.in.max_towers = 1;
- s->r.out.entry_handle = &handle;
+ s->r.out.entry_handle = &s->handle;
map_req = dcerpc_epm_Map_send(s->pipe, c, &s->r);
if (composite_nomem(map_req, c)) return;