diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-09-13 18:49:03 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-09-13 20:37:11 +0200 |
commit | 73ebb58f2da7f3dbc0d61d68d1b28b482069b344 (patch) | |
tree | 902b7536c21820cc1bfbff70ef2a72d9830c062b | |
parent | 6ce1c893fa8f2987db6572458a540cf359b46e11 (diff) | |
download | samba-73ebb58f2da7f3dbc0d61d68d1b28b482069b344.tar.gz samba-73ebb58f2da7f3dbc0d61d68d1b28b482069b344.tar.xz samba-73ebb58f2da7f3dbc0d61d68d1b28b482069b344.zip |
client free credentials when not needed anymore
(This used to be commit d982b69df638f17da6af398e2613986240031064)
-rw-r--r-- | source4/librpc/rpc/dcerpc_auth.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c index 49fc3d9294..2eced55967 100644 --- a/source4/librpc/rpc/dcerpc_auth.c +++ b/source4/librpc/rpc/dcerpc_auth.c @@ -129,6 +129,7 @@ static void bind_auth_next_step(struct composite_context *c) c->status = gensec_update(sec->generic_state, state, sec->auth_info->credentials, &state->credentials); + data_blob_free(&sec->auth_info->credentials); if (NT_STATUS_EQUAL(c->status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { more_processing = true; @@ -151,6 +152,8 @@ static void bind_auth_next_step(struct composite_context *c) if (!more_processing) { /* NO reply expected, so just send it */ c->status = dcerpc_auth3(state->pipe, state); + data_blob_free(&state->credentials); + sec->auth_info->credentials = data_blob(NULL, 0); if (!composite_is_ok(c)) return; composite_done(c); @@ -162,6 +165,8 @@ static void bind_auth_next_step(struct composite_context *c) creq = dcerpc_alter_context_send(state->pipe, state, &state->pipe->syntax, &state->pipe->transfer_syntax); + data_blob_free(&state->credentials); + sec->auth_info->credentials = data_blob(NULL, 0); if (composite_nomem(creq, c)) return; composite_continue(c, creq, bind_auth_recv_alter, c); @@ -334,6 +339,8 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx, /* The first request always is a dcerpc_bind. The subsequent ones * depend on gensec results */ creq = dcerpc_bind_send(p, state, &syntax, &transfer_syntax); + data_blob_free(&state->credentials); + sec->auth_info->credentials = data_blob(NULL, 0); if (composite_nomem(creq, c)) return c; composite_continue(c, creq, bind_auth_recv_bindreply, c); |