diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-12-29 22:36:14 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2011-12-29 14:14:06 +0100 |
commit | c76ffcf3c4e6e46a8ca62b355efc90ff3bf48d2d (patch) | |
tree | 77b46d0e40134cc784b929e6800e51a88fb418e2 /source4/torture/rpc | |
parent | e3f4a6692cd2e22ebd5d7be01719d2bc85cabe40 (diff) | |
download | samba-c76ffcf3c4e6e46a8ca62b355efc90ff3bf48d2d.tar.gz samba-c76ffcf3c4e6e46a8ca62b355efc90ff3bf48d2d.tar.bz2 samba-c76ffcf3c4e6e46a8ca62b355efc90ff3bf48d2d.zip |
s4-toture: Rename memory contexts in rpc.pac for greater clarity
This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.
Thankyou Simo for the suggestion.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 29 14:14:06 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/remote_pac.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source4/torture/rpc/remote_pac.c b/source4/torture/rpc/remote_pac.c index aca518799d..caec1fda3e 100644 --- a/source4/torture/rpc/remote_pac.c +++ b/source4/torture/rpc/remote_pac.c @@ -46,7 +46,7 @@ * generate the session info, as we just want to verify the PAC * details, not the full local token */ static NTSTATUS test_generate_session_info_pac(struct auth4_context *auth_ctx, - TALLOC_CTX *mem_ctx_out, + TALLOC_CTX *mem_ctx, struct smb_krb5_context *smb_krb5_context, DATA_BLOB *pac_blob, const char *principal_name, @@ -58,41 +58,41 @@ static NTSTATUS test_generate_session_info_pac(struct auth4_context *auth_ctx, struct auth_user_info_dc *user_info_dc; struct PAC_SIGNATURE_DATA *pac_srv_sig = NULL; struct PAC_SIGNATURE_DATA *pac_kdc_sig = NULL; - TALLOC_CTX *mem_ctx; + TALLOC_CTX *tmp_ctx; - mem_ctx = talloc_named(mem_ctx_out, 0, "gensec_gssapi_session_info context"); - NT_STATUS_HAVE_NO_MEMORY(mem_ctx); + tmp_ctx = talloc_named(mem_ctx, 0, "gensec_gssapi_session_info context"); + NT_STATUS_HAVE_NO_MEMORY(tmp_ctx); - pac_srv_sig = talloc(mem_ctx, struct PAC_SIGNATURE_DATA); + pac_srv_sig = talloc(tmp_ctx, struct PAC_SIGNATURE_DATA); if (!pac_srv_sig) { - talloc_free(mem_ctx); + talloc_free(tmp_ctx); return NT_STATUS_NO_MEMORY; } - pac_kdc_sig = talloc(mem_ctx, struct PAC_SIGNATURE_DATA); + pac_kdc_sig = talloc(tmp_ctx, struct PAC_SIGNATURE_DATA); if (!pac_kdc_sig) { - talloc_free(mem_ctx); + talloc_free(tmp_ctx); return NT_STATUS_NO_MEMORY; } - nt_status = kerberos_pac_blob_to_user_info_dc(mem_ctx, + nt_status = kerberos_pac_blob_to_user_info_dc(tmp_ctx, *pac_blob, smb_krb5_context->krb5_context, &user_info_dc, pac_srv_sig, pac_kdc_sig); if (!NT_STATUS_IS_OK(nt_status)) { - talloc_free(mem_ctx); + talloc_free(tmp_ctx); return nt_status; } session_info_flags |= AUTH_SESSION_INFO_SIMPLE_PRIVILEGES; - nt_status = auth_generate_session_info(mem_ctx_out, + nt_status = auth_generate_session_info(mem_ctx, NULL, NULL, user_info_dc, session_info_flags, session_info); if (!NT_STATUS_IS_OK(nt_status)) { - talloc_free(mem_ctx); + talloc_free(tmp_ctx); return nt_status; } @@ -103,7 +103,7 @@ static NTSTATUS test_generate_session_info_pac(struct auth4_context *auth_ctx, = talloc_steal((*session_info)->torture, pac_kdc_sig); } - talloc_free(mem_ctx); + talloc_free(tmp_ctx); return nt_status; } |