summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-09-17 13:15:38 +0200
committerAndrew Bartlett <abartlet@samba.org>2013-10-17 08:48:46 +1300
commit9d6b6dcd963412b33fd5960bd792ae183cc63458 (patch)
treea7743281031ce3fc1795eeb51ab18e2d75bce41e /source4
parent872486bbd039c18eed13f30073a99b7a15f6b1b8 (diff)
downloadsamba-9d6b6dcd963412b33fd5960bd792ae183cc63458.tar.gz
samba-9d6b6dcd963412b33fd5960bd792ae183cc63458.tar.bz2
samba-9d6b6dcd963412b33fd5960bd792ae183cc63458.zip
s4:torture/samba3rpc: let rpc.authcontext be more robust against low level code changes (part1)
Some code uses the low level smbXcli_session structure instead of the smbcli_session structure and doesn't 'see' updates to the smbcli_session structure. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/samba3rpc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 432e9d5350..6c96b9d7cf 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -63,6 +63,7 @@ bool torture_bind_authcontext(struct torture_context *torture)
struct policy_handle handle;
struct lsa_Close close_handle;
struct smbcli_session *tmp;
+ uint16_t tmp_vuid;
struct smbcli_session *session2;
struct smbcli_state *cli;
struct dcerpc_pipe *lsa_pipe;
@@ -179,10 +180,13 @@ bool torture_bind_authcontext(struct torture_context *torture)
session2->vuid = setup.out.vuid;
tmp = cli->tree->session;
+ tmp_vuid = smb1cli_session_current_id(tmp->smbXcli);
+ smb1cli_session_set_id(tmp->smbXcli, session2->vuid);
cli->tree->session = session2;
status = dcerpc_lsa_OpenPolicy2_r(lsa_handle, mem_ctx, &openpolicy);
+ smb1cli_session_set_id(tmp->smbXcli, tmp_vuid);
cli->tree->session = tmp;
talloc_free(lsa_pipe);
lsa_pipe = NULL;