1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

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>
This commit is contained in:
Kamen Mazdrashki 2009-09-18 19:04:22 +03:00 committed by Anatoliy Atanasov
parent d60e3ac8d3
commit 98245727c9
2 changed files with 41 additions and 1 deletions

View File

@ -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;
}

View File

@ -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;