summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/samba3rpc.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-28 19:03:50 +0100
committerGünther Deschner <gd@samba.org>2008-10-29 08:57:31 +0100
commitf285af63676e4bafc9f136f8181c5856d2851d45 (patch)
treeac6d2d8e691c15f4d140baf6d55c34b4ba32453f /source4/torture/rpc/samba3rpc.c
parent0de8811a59258774a1df3756b7071c0b4a2f2902 (diff)
downloadsamba-f285af63676e4bafc9f136f8181c5856d2851d45.tar.gz
samba-f285af63676e4bafc9f136f8181c5856d2851d45.tar.bz2
samba-f285af63676e4bafc9f136f8181c5856d2851d45.zip
s4-netlogon: merge netr_LogonSamLogon{Ex,WithFlags} from s3 idl.
Guenther
Diffstat (limited to 'source4/torture/rpc/samba3rpc.c')
-rw-r--r--source4/torture/rpc/samba3rpc.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index a45397de46..5f8225cb33 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -1033,6 +1033,10 @@ static bool schan(struct smbcli_state *cli,
struct netr_NetworkInfo ninfo;
struct netr_PasswordInfo pinfo;
struct netr_LogonSamLogon r;
+ union netr_LogonLevel logon;
+ union netr_Validation validation;
+ uint8_t authoritative;
+ struct netr_Authenticator return_authenticator;
flags = CLI_CRED_LANMAN_AUTH | CLI_CRED_NTLM_AUTH |
CLI_CRED_NTLMv2_AUTH;
@@ -1075,6 +1079,8 @@ static bool schan(struct smbcli_state *cli,
ninfo.lm.length = lm_resp.length;
ninfo.lm.data = lm_resp.data;
+ logon.network = &ninfo;
+
r.in.server_name = talloc_asprintf(
mem_ctx, "\\\\%s", dcerpc_server_name(net_pipe));
ZERO_STRUCT(netr_auth2);
@@ -1084,8 +1090,10 @@ static bool schan(struct smbcli_state *cli,
r.in.return_authenticator = &netr_auth2;
r.in.logon_level = 2;
r.in.validation_level = i;
- r.in.logon.network = &ninfo;
- r.out.return_authenticator = NULL;
+ r.in.logon = &logon;
+ r.out.validation = &validation;
+ r.out.authoritative = &authoritative;
+ r.out.return_authenticator = &return_authenticator;
status = dcerpc_netr_LogonSamLogon(net_pipe, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
@@ -1113,9 +1121,11 @@ static bool schan(struct smbcli_state *cli,
sizeof(pinfo.ntpassword.hash),
&session_key);
+ logon.password = &pinfo;
+
r.in.logon_level = 1;
- r.in.logon.password = &pinfo;
- r.out.return_authenticator = NULL;
+ r.in.logon = &logon;
+ r.out.return_authenticator = &return_authenticator;
status = dcerpc_netr_LogonSamLogon(net_pipe, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {