summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-18 20:04:42 -0400
committerSimo Sorce <idra@samba.org>2010-07-18 20:04:42 -0400
commit7e4de49bfceed18c81abf93703a61d0a22617a24 (patch)
tree37b74b75d0edcfe28ce4d9898c0889a74b262492 /source4/torture/rpc
parent378e4d5b8d30733f0f28cc2bceb28d9b9b594707 (diff)
parent27aece72004a84a6e0b2e00987d8a362e307d1d8 (diff)
downloadsamba-7e4de49bfceed18c81abf93703a61d0a22617a24.tar.gz
samba-7e4de49bfceed18c81abf93703a61d0a22617a24.tar.bz2
samba-7e4de49bfceed18c81abf93703a61d0a22617a24.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/bind.c32
1 files changed, 27 insertions, 5 deletions
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index b36e54cac0..f6470595e3 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -52,6 +52,7 @@ static bool test_bind(struct torture_context *tctx,
torture_rpc_binding(tctx, &binding),
"failed to parse binding string");
+ binding->flags &= ~DCERPC_AUTH_OPTIONS;
binding->flags |= *flags;
torture_assert_ntstatus_ok(tctx,
@@ -86,11 +87,32 @@ static void test_bind_op(struct torture_suite *suite,
struct torture_suite *torture_rpc_bind(TALLOC_CTX *mem_ctx)
{
struct torture_suite *suite = torture_suite_create(mem_ctx, "BIND");
-
- test_bind_op(suite, "ntlm,sign", DCERPC_AUTH_NTLM | DCERPC_SIGN);
- test_bind_op(suite, "ntlm,sign,seal", DCERPC_AUTH_NTLM | DCERPC_SIGN | DCERPC_SEAL);
- test_bind_op(suite, "spnego,sign", DCERPC_AUTH_SPNEGO | DCERPC_SIGN);
- test_bind_op(suite, "spnego,sign,seal", DCERPC_AUTH_SPNEGO | DCERPC_SIGN | DCERPC_SEAL);
+ struct {
+ const char *test_name;
+ uint32_t flags;
+ } tests[] = {
+ {
+ .test_name = "ntlm,sign",
+ .flags = DCERPC_AUTH_NTLM | DCERPC_SIGN
+ },{
+ .test_name = "ntlm,sign,seal",
+ .flags = DCERPC_AUTH_NTLM | DCERPC_SIGN | DCERPC_SEAL
+ },{
+ .test_name = "spnego,sign",
+ .flags = DCERPC_AUTH_SPNEGO | DCERPC_SIGN
+ },{
+ .test_name = "spnego,sign,seal",
+ .flags = DCERPC_AUTH_SPNEGO | DCERPC_SIGN | DCERPC_SEAL
+ }
+ };
+ int i;
+
+ for (i=0; i < ARRAY_SIZE(tests); i++) {
+ test_bind_op(suite, tests[i].test_name, tests[i].flags);
+ }
+ for (i=0; i < ARRAY_SIZE(tests); i++) {
+ test_bind_op(suite, talloc_asprintf(suite, "bigendian,%s", tests[i].test_name), tests[i].flags | DCERPC_PUSH_BIGENDIAN);
+ }
return suite;
}