summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/remote_pac.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/remote_pac.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/remote_pac.c')
-rw-r--r--source4/torture/rpc/remote_pac.c34
1 files changed, 26 insertions, 8 deletions
diff --git a/source4/torture/rpc/remote_pac.c b/source4/torture/rpc/remote_pac.c
index a4111d1c3e..1f03ad6396 100644
--- a/source4/torture/rpc/remote_pac.c
+++ b/source4/torture/rpc/remote_pac.c
@@ -47,7 +47,12 @@ static bool test_PACVerify(struct torture_context *tctx,
NTSTATUS status;
struct netr_LogonSamLogon r;
-
+
+ union netr_LogonLevel logon;
+ union netr_Validation validation;
+ uint8_t authoritative;
+ struct netr_Authenticator return_authenticator;
+
struct netr_GenericInfo generic;
struct netr_Authenticator auth, auth2;
@@ -166,15 +171,20 @@ static bool test_PACVerify(struct torture_context *tctx,
generic.package_name.string = "Kerberos";
+ logon.generic = &generic;
+
ZERO_STRUCT(auth2);
creds_client_authenticator(creds, &auth);
r.in.credential = &auth;
r.in.return_authenticator = &auth2;
+ r.in.logon = &logon;
r.in.logon_level = NetlogonGenericInformation;
- r.in.logon.generic = &generic;
r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
+ r.out.validation = &validation;
+ r.out.authoritative = &authoritative;
+ r.out.return_authenticator = &return_authenticator;
status = dcerpc_netr_LogonSamLogon(p, tctx, &r);
@@ -183,12 +193,14 @@ static bool test_PACVerify(struct torture_context *tctx,
/* This will break the signature nicely (even in the crypto wrapping), check we get a logon failure */
generic.data[generic.length-1]++;
+ logon.generic = &generic;
+
ZERO_STRUCT(auth2);
creds_client_authenticator(creds, &auth);
r.in.credential = &auth;
r.in.return_authenticator = &auth2;
r.in.logon_level = NetlogonGenericInformation;
- r.in.logon.generic = &generic;
+ r.in.logon = &logon;
r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
@@ -203,12 +215,14 @@ static bool test_PACVerify(struct torture_context *tctx,
/* This will break the parsing nicely (even in the crypto wrapping), check we get INVALID_PARAMETER */
generic.length--;
+ logon.generic = &generic;
+
ZERO_STRUCT(auth2);
creds_client_authenticator(creds, &auth);
r.in.credential = &auth;
r.in.return_authenticator = &auth2;
r.in.logon_level = NetlogonGenericInformation;
- r.in.logon.generic = &generic;
+ r.in.logon = &logon;
r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
@@ -247,13 +261,15 @@ static bool test_PACVerify(struct torture_context *tctx,
generic.length = pac_wrapped.length;
generic.data = pac_wrapped.data;
-
+
+ logon.generic = &generic;
+
ZERO_STRUCT(auth2);
creds_client_authenticator(creds, &auth);
r.in.credential = &auth;
r.in.return_authenticator = &auth2;
r.in.logon_level = NetlogonGenericInformation;
- r.in.logon.generic = &generic;
+ r.in.logon = &logon;
r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;
@@ -292,13 +308,15 @@ static bool test_PACVerify(struct torture_context *tctx,
generic.length = pac_wrapped.length;
generic.data = pac_wrapped.data;
-
+
+ logon.generic = &generic;
+
ZERO_STRUCT(auth2);
creds_client_authenticator(creds, &auth);
r.in.credential = &auth;
r.in.return_authenticator = &auth2;
r.in.logon_level = NetlogonGenericInformation;
- r.in.logon.generic = &generic;
+ r.in.logon = &logon;
r.in.server_name = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p));
r.in.computer_name = cli_credentials_get_workstation(credentials);
r.in.validation_level = NetlogonValidationGenericInfo2;