summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2009-09-18 19:04:22 +0300
committerAnatoliy Atanasov <anatoliy.atanasov@postpath.com>2009-10-01 11:29:23 +0300
commit98245727c9a314849248e5419b347b444e79a2f7 (patch)
treee8602dec0d3ad3ee8a087a639359772c262b1e8a /source4/torture/rpc
parentd60e3ac8d303d75d7056eba9dac0ba05852238bf (diff)
downloadsamba-98245727c9a314849248e5419b347b444e79a2f7.tar.gz
samba-98245727c9a314849248e5419b347b444e79a2f7.tar.bz2
samba-98245727c9a314849248e5419b347b444e79a2f7.zip
s4-tort-drs: Add bind_info for dcerpc_drsuapi_DsBind() call
After this patch DsGetNCChanges() test works fine. bind_info returned by server is also cached for future use Signed-off-by: Anatoliy Atanasov <anatoliy.atanasov@postpath.com>
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/drsuapi.c40
-rw-r--r--source4/torture/rpc/drsuapi.h2
2 files changed, 41 insertions, 1 deletions
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 6142096bc9..8f6bbb163b 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -35,11 +35,46 @@ bool test_DsBind(struct dcerpc_pipe *p,
{
NTSTATUS status;
struct drsuapi_DsBind r;
+ struct drsuapi_DsBindInfo28 *bind_info28;
+ struct drsuapi_DsBindInfoCtr bind_info_ctr;
+
+ ZERO_STRUCT(bind_info_ctr);
+ bind_info_ctr.length = 28;
+
+ bind_info28 = &bind_info_ctr.info.info28;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_BASE;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7;
+ bind_info28->supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT;
GUID_from_string(DRSUAPI_DS_BIND_GUID, &priv->bind_guid);
r.in.bind_guid = &priv->bind_guid;
- r.in.bind_info = NULL;
+ r.in.bind_info = &bind_info_ctr;
r.out.bind_handle = &priv->bind_handle;
torture_comment(tctx, "testing DsBind\n");
@@ -47,6 +82,9 @@ bool test_DsBind(struct dcerpc_pipe *p,
status = dcerpc_drsuapi_DsBind(p, tctx, &r);
torture_drsuapi_assert_call(tctx, p, status, &r, "dcerpc_drsuapi_DsBind");
+ /* cache server supported extensions, i.e. bind_info */
+ priv->srv_bind_info = r.out.bind_info->info.info28;
+
return true;
}
diff --git a/source4/torture/rpc/drsuapi.h b/source4/torture/rpc/drsuapi.h
index 8901767549..a10ea5068e 100644
--- a/source4/torture/rpc/drsuapi.h
+++ b/source4/torture/rpc/drsuapi.h
@@ -30,6 +30,8 @@ struct DsPrivate {
struct dcerpc_pipe *pipe;
struct policy_handle bind_handle;
struct GUID bind_guid;
+ struct drsuapi_DsBindInfo28 srv_bind_info;
+
const char *domain_obj_dn;
const char *domain_guid_str;
const char *domain_dns_name;