diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-08-01 15:39:01 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-08-03 18:48:02 +1000 |
commit | 35b309fa0cac9341f364243b03ebfcc80f74198e (patch) | |
tree | b99fc49ec70be97a41289b3978db367fba63a769 /source4/torture/rpc | |
parent | d3fe48ba48b25f359292ee96dbf5cecc0b0b16a3 (diff) | |
download | samba-35b309fa0cac9341f364243b03ebfcc80f74198e.tar.gz samba-35b309fa0cac9341f364243b03ebfcc80f74198e.tar.bz2 samba-35b309fa0cac9341f364243b03ebfcc80f74198e.zip |
gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.
Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.
Andrew Bartlett
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/remote_pac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/torture/rpc/remote_pac.c b/source4/torture/rpc/remote_pac.c index 37fb8af147..88a40b4fe4 100644 --- a/source4/torture/rpc/remote_pac.c +++ b/source4/torture/rpc/remote_pac.c @@ -129,7 +129,7 @@ static bool test_PACVerify(struct torture_context *tctx, /* Extract the PAC using Samba's code */ - status = gensec_session_info(gensec_server_context, &session_info); + status = gensec_session_info(gensec_server_context, gensec_server_context, &session_info); torture_assert_ntstatus_ok(tctx, status, "gensec_session_info failed"); torture_assert(tctx, session_info->torture != NULL, "gensec_session_info failed to fill in torture sub struct"); torture_assert(tctx, session_info->torture->pac_srv_sig != NULL, "pac_srv_sig not present"); @@ -468,7 +468,7 @@ static bool test_S2U4Self(struct torture_context *tctx, /* Extract the PAC using Samba's code */ - status = gensec_session_info(gensec_server_context, &kinit_session_info); + status = gensec_session_info(gensec_server_context, gensec_server_context, &kinit_session_info); torture_assert_ntstatus_ok(tctx, status, "gensec_session_info failed"); @@ -530,7 +530,7 @@ static bool test_S2U4Self(struct torture_context *tctx, /* Extract the PAC using Samba's code */ - status = gensec_session_info(gensec_server_context, &s2u4self_session_info); + status = gensec_session_info(gensec_server_context, gensec_server_context, &s2u4self_session_info); torture_assert_ntstatus_ok(tctx, status, "gensec_session_info failed"); cli_credentials_get_ntlm_username_domain(cmdline_credentials, tctx, |