The Samba-Bugzilla – Attachment 3832 Details for
Bug 4939
Server Manager: "Synchronize Entire Domain" not implemented
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
NETLOGON pipe improvements
netlogonImprovements.patch (text/plain), 18.86 KB, created by
Matthias Dieter Wallnöfer
on 2008-12-27 05:55:23 UTC
(
hide
)
Description:
NETLOGON pipe improvements
Filename:
MIME Type:
Creator:
Matthias Dieter Wallnöfer
Created:
2008-12-27 05:55:23 UTC
Size:
18.86 KB
patch
obsolete
>diff --git a/librpc/gen_ndr/cli_netlogon.c b/librpc/gen_ndr/cli_netlogon.c >index d8a9ef3..9fdde67 100644 >--- a/librpc/gen_ndr/cli_netlogon.c >+++ b/librpc/gen_ndr/cli_netlogon.c >@@ -637,7 +637,7 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, > const char *logon_server /* [in] [unique,charset(UTF16)] */, > enum netr_LogonControlCode function_code /* [in] */, > uint32_t level /* [in] */, >- union netr_CONTROL_QUERY_INFORMATION *info /* [out] [ref,switch_is(level)] */, >+ union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */, > WERROR *werror) > { > struct netr_LogonControl r; >@@ -671,7 +671,7 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, > } > > /* Return variables */ >- *info = *r.out.info; >+ *query = *r.out.query; > > /* Return result */ > if (werror) { >@@ -837,7 +837,7 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, > struct netr_Authenticator *credential /* [in] [ref] */, > struct netr_Authenticator *return_authenticator /* [in,out] [ref] */, > enum netr_SamDatabaseID database_id /* [in] */, >- uint16_t restart_state /* [in] */, >+ enum SyncStateEnum restart_state /* [in] */, > uint32_t *sync_context /* [in,out] [ref] */, > struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */, > uint32_t preferredmaximumlength /* [in] */) >diff --git a/librpc/gen_ndr/cli_netlogon.h b/librpc/gen_ndr/cli_netlogon.h >index ac70448..7f62221 100644 >--- a/librpc/gen_ndr/cli_netlogon.h >+++ b/librpc/gen_ndr/cli_netlogon.h >@@ -116,7 +116,7 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, > const char *logon_server /* [in] [unique,charset(UTF16)] */, > enum netr_LogonControlCode function_code /* [in] */, > uint32_t level /* [in] */, >- union netr_CONTROL_QUERY_INFORMATION *info /* [out] [ref,switch_is(level)] */, >+ union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */, > WERROR *werror); > NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, > TALLOC_CTX *mem_ctx, >@@ -148,7 +148,7 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, > struct netr_Authenticator *credential /* [in] [ref] */, > struct netr_Authenticator *return_authenticator /* [in,out] [ref] */, > enum netr_SamDatabaseID database_id /* [in] */, >- uint16_t restart_state /* [in] */, >+ enum SyncStateEnum restart_state /* [in] */, > uint32_t *sync_context /* [in,out] [ref] */, > struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */, > uint32_t preferredmaximumlength /* [in] */); >diff --git a/librpc/gen_ndr/ndr_netlogon.c b/librpc/gen_ndr/ndr_netlogon.c >index b3894f8..4c66069 100644 >--- a/librpc/gen_ndr/ndr_netlogon.c >+++ b/librpc/gen_ndr/ndr_netlogon.c >@@ -6499,6 +6499,38 @@ _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *n > ndr->depth--; > } > >+static enum ndr_err_code ndr_push_SyncStateEnum(struct ndr_push *ndr, int ndr_flags, enum SyncStateEnum r) >+{ >+ NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); >+ return NDR_ERR_SUCCESS; >+} >+ >+static enum ndr_err_code ndr_pull_SyncStateEnum(struct ndr_pull *ndr, int ndr_flags, enum SyncStateEnum *r) >+{ >+ uint16_t v; >+ NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v)); >+ *r = v; >+ return NDR_ERR_SUCCESS; >+} >+ >+_PUBLIC_ void ndr_print_SyncStateEnum(struct ndr_print *ndr, const char *name, enum SyncStateEnum r) >+{ >+ const char *val = NULL; >+ >+ switch (r) { >+ case SYNCSTATE_NORMAL_STATE: val = "SYNCSTATE_NORMAL_STATE"; break; >+ case SYNCSTATE_DOMAIN_STATE: val = "SYNCSTATE_DOMAIN_STATE"; break; >+ case SYNCSTATE_GROUP_STATE: val = "SYNCSTATE_GROUP_STATE"; break; >+ case SYNCSTATE_UAS_BUILT_IN_GROUP_STATE: val = "SYNCSTATE_UAS_BUILT_IN_GROUP_STATE"; break; >+ case SYNCSTATE_USER_STATE: val = "SYNCSTATE_USER_STATE"; break; >+ case SYNCSTATE_GROUP_MEMBER_STATE: val = "SYNCSTATE_GROUP_MEMBER_STATE"; break; >+ case SYNCSTATE_ALIAS_STATE: val = "SYNCSTATE_ALIAS_STATE"; break; >+ case SYNCSTATE_ALIAS_MEMBER_STATE: val = "SYNCSTATE_ALIAS_MEMBER_STATE"; break; >+ case SYNCSTATE_SAM_DONE_STATE: val = "SYNCSTATE_SAM_DONE_STATE"; break; >+ } >+ ndr_print_enum(ndr, name, "ENUM", val, r); >+} >+ > static enum ndr_err_code ndr_push_netr_ChangeLogFlags(struct ndr_push *ndr, int ndr_flags, uint16_t r) > { > NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r)); >@@ -11036,11 +11068,11 @@ static enum ndr_err_code ndr_push_netr_LogonControl(struct ndr_push *ndr, int fl > NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level)); > } > if (flags & NDR_OUT) { >- if (r->out.info == NULL) { >+ if (r->out.query == NULL) { > return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); > } >- NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level)); >- NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); >+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.query, r->in.level)); >+ NDR_CHECK(ndr_push_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query)); > NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); > } > return NDR_ERR_SUCCESS; >@@ -11050,7 +11082,7 @@ static enum ndr_err_code ndr_pull_netr_LogonControl(struct ndr_pull *ndr, int fl > { > uint32_t _ptr_logon_server; > TALLOC_CTX *_mem_save_logon_server_0; >- TALLOC_CTX *_mem_save_info_0; >+ TALLOC_CTX *_mem_save_query_0; > if (flags & NDR_IN) { > ZERO_STRUCT(r->out); > >@@ -11074,18 +11106,18 @@ static enum ndr_err_code ndr_pull_netr_LogonControl(struct ndr_pull *ndr, int fl > } > NDR_CHECK(ndr_pull_netr_LogonControlCode(ndr, NDR_SCALARS, &r->in.function_code)); > NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level)); >- NDR_PULL_ALLOC(ndr, r->out.info); >- ZERO_STRUCTP(r->out.info); >+ NDR_PULL_ALLOC(ndr, r->out.query); >+ ZERO_STRUCTP(r->out.query); > } > if (flags & NDR_OUT) { > if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { >- NDR_PULL_ALLOC(ndr, r->out.info); >+ NDR_PULL_ALLOC(ndr, r->out.query); > } >- _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr); >- NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC); >- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level)); >- NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info)); >- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC); >+ _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr); >+ NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC); >+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.query, r->in.level)); >+ NDR_CHECK(ndr_pull_netr_CONTROL_QUERY_INFORMATION(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query)); >+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC); > NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); > } > return NDR_ERR_SUCCESS; >@@ -11114,10 +11146,10 @@ _PUBLIC_ void ndr_print_netr_LogonControl(struct ndr_print *ndr, const char *nam > if (flags & NDR_OUT) { > ndr_print_struct(ndr, "out", "netr_LogonControl"); > ndr->depth++; >- ndr_print_ptr(ndr, "info", r->out.info); >+ ndr_print_ptr(ndr, "query", r->out.query); > ndr->depth++; >- ndr_print_set_switch_value(ndr, r->out.info, r->in.level); >- ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "info", r->out.info); >+ ndr_print_set_switch_value(ndr, r->out.query, r->in.level); >+ ndr_print_netr_CONTROL_QUERY_INFORMATION(ndr, "query", r->out.query); > ndr->depth--; > ndr_print_WERROR(ndr, "result", r->out.result); > ndr->depth--; >@@ -11594,7 +11626,7 @@ static enum ndr_err_code ndr_push_netr_DatabaseSync2(struct ndr_push *ndr, int f > } > NDR_CHECK(ndr_push_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); > NDR_CHECK(ndr_push_netr_SamDatabaseID(ndr, NDR_SCALARS, r->in.database_id)); >- NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.restart_state)); >+ NDR_CHECK(ndr_push_SyncStateEnum(ndr, NDR_SCALARS, r->in.restart_state)); > if (r->in.sync_context == NULL) { > return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); > } >@@ -11662,7 +11694,7 @@ static enum ndr_err_code ndr_pull_netr_DatabaseSync2(struct ndr_pull *ndr, int f > NDR_CHECK(ndr_pull_netr_Authenticator(ndr, NDR_SCALARS, r->in.return_authenticator)); > NDR_PULL_SET_MEM_CTX(ndr, _mem_save_return_authenticator_0, LIBNDR_FLAG_REF_ALLOC); > NDR_CHECK(ndr_pull_netr_SamDatabaseID(ndr, NDR_SCALARS, &r->in.database_id)); >- NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.restart_state)); >+ NDR_CHECK(ndr_pull_SyncStateEnum(ndr, NDR_SCALARS, &r->in.restart_state)); > if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { > NDR_PULL_ALLOC(ndr, r->in.sync_context); > } >@@ -11737,7 +11769,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseSync2(struct ndr_print *ndr, const char *na > ndr_print_netr_Authenticator(ndr, "return_authenticator", r->in.return_authenticator); > ndr->depth--; > ndr_print_netr_SamDatabaseID(ndr, "database_id", r->in.database_id); >- ndr_print_uint16(ndr, "restart_state", r->in.restart_state); >+ ndr_print_SyncStateEnum(ndr, "restart_state", r->in.restart_state); > ndr_print_ptr(ndr, "sync_context", r->in.sync_context); > ndr->depth++; > ndr_print_uint32(ndr, "sync_context", *r->in.sync_context); >diff --git a/librpc/gen_ndr/ndr_netlogon.h b/librpc/gen_ndr/ndr_netlogon.h >index 96c487f..7fd4fe2 100644 >--- a/librpc/gen_ndr/ndr_netlogon.h >+++ b/librpc/gen_ndr/ndr_netlogon.h >@@ -192,6 +192,7 @@ void ndr_print_netr_CONTROL_QUERY_INFORMATION(struct ndr_print *ndr, const char > void ndr_print_netr_LogonControlCode(struct ndr_print *ndr, const char *name, enum netr_LogonControlCode r); > void ndr_print_netr_CONTROL_DATA_INFORMATION(struct ndr_print *ndr, const char *name, const union netr_CONTROL_DATA_INFORMATION *r); > void ndr_print_netr_NegotiateFlags(struct ndr_print *ndr, const char *name, uint32_t r); >+void ndr_print_SyncStateEnum(struct ndr_print *ndr, const char *name, enum SyncStateEnum r); > void ndr_print_netr_ChangeLogFlags(struct ndr_print *ndr, const char *name, uint16_t r); > void ndr_print_netr_ChangeLogObject(struct ndr_print *ndr, const char *name, const union netr_ChangeLogObject *r); > enum ndr_err_code ndr_push_netr_ChangeLogEntry(struct ndr_push *ndr, int ndr_flags, const struct netr_ChangeLogEntry *r); >diff --git a/librpc/gen_ndr/netlogon.h b/librpc/gen_ndr/netlogon.h >index c0507b1..fdb687d 100644 >--- a/librpc/gen_ndr/netlogon.h >+++ b/librpc/gen_ndr/netlogon.h >@@ -739,6 +739,33 @@ union netr_CONTROL_DATA_INFORMATION { > #define NETLOGON_NEG_AUTHENTICATED_RPC_LSASS ( 0x20000000 ) > #define NETLOGON_NEG_SCHANNEL ( 0x40000000 ) > >+enum SyncStateEnum >+#ifndef USE_UINT_ENUMS >+ { >+ SYNCSTATE_NORMAL_STATE=0, >+ SYNCSTATE_DOMAIN_STATE=1, >+ SYNCSTATE_GROUP_STATE=2, >+ SYNCSTATE_UAS_BUILT_IN_GROUP_STATE=3, >+ SYNCSTATE_USER_STATE=4, >+ SYNCSTATE_GROUP_MEMBER_STATE=5, >+ SYNCSTATE_ALIAS_STATE=6, >+ SYNCSTATE_ALIAS_MEMBER_STATE=7, >+ SYNCSTATE_SAM_DONE_STATE=8 >+} >+#else >+ { __donnot_use_enum_SyncStateEnum=0x7FFFFFFF} >+#define SYNCSTATE_NORMAL_STATE ( 0 ) >+#define SYNCSTATE_DOMAIN_STATE ( 1 ) >+#define SYNCSTATE_GROUP_STATE ( 2 ) >+#define SYNCSTATE_UAS_BUILT_IN_GROUP_STATE ( 3 ) >+#define SYNCSTATE_USER_STATE ( 4 ) >+#define SYNCSTATE_GROUP_MEMBER_STATE ( 5 ) >+#define SYNCSTATE_ALIAS_STATE ( 6 ) >+#define SYNCSTATE_ALIAS_MEMBER_STATE ( 7 ) >+#define SYNCSTATE_SAM_DONE_STATE ( 8 ) >+#endif >+; >+ > /* bitmap netr_ChangeLogFlags */ > #define NETR_CHANGELOG_IMMEDIATE_REPL_REQUIRED ( 0x0001 ) > #define NETR_CHANGELOG_CHANGED_PASSWORD ( 0x0002 ) >@@ -1219,7 +1246,7 @@ struct netr_LogonControl { > } in; > > struct { >- union netr_CONTROL_QUERY_INFORMATION *info;/* [ref,switch_is(level)] */ >+ union netr_CONTROL_QUERY_INFORMATION *query;/* [ref,switch_is(level)] */ > WERROR result; > } out; > >@@ -1281,7 +1308,7 @@ struct netr_DatabaseSync2 { > const char *computername;/* [charset(UTF16)] */ > struct netr_Authenticator *credential;/* [ref] */ > enum netr_SamDatabaseID database_id; >- uint16_t restart_state; >+ enum SyncStateEnum restart_state; > uint32_t preferredmaximumlength; > struct netr_Authenticator *return_authenticator;/* [ref] */ > uint32_t *sync_context;/* [ref] */ >diff --git a/librpc/gen_ndr/srv_netlogon.c b/librpc/gen_ndr/srv_netlogon.c >index 40ae09e..380a343 100644 >--- a/librpc/gen_ndr/srv_netlogon.c >+++ b/librpc/gen_ndr/srv_netlogon.c >@@ -1050,8 +1050,8 @@ static bool api_netr_LogonControl(pipes_struct *p) > } > > ZERO_STRUCT(r->out); >- r->out.info = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION); >- if (r->out.info == NULL) { >+ r->out.query = talloc_zero(r, union netr_CONTROL_QUERY_INFORMATION); >+ if (r->out.query == NULL) { > talloc_free(r); > return false; > } >diff --git a/librpc/idl/netlogon.idl b/librpc/idl/netlogon.idl >index 3b9d8bf..506f04c 100644 >--- a/librpc/idl/netlogon.idl >+++ b/librpc/idl/netlogon.idl >@@ -728,7 +728,6 @@ interface netlogon > [size_is(num_deltas)] netr_DELTA_ENUM *delta_enum; > } netr_DELTA_ENUM_ARRAY; > >- > NTSTATUS netr_DatabaseDeltas( > [in] [string,charset(UTF16)] uint16 logon_server[], > [in] [string,charset(UTF16)] uint16 computername[], >@@ -882,7 +881,7 @@ interface netlogon > [in,unique] [string,charset(UTF16)] uint16 *logon_server, > [in] netr_LogonControlCode function_code, > [in] uint32 level, >- [out,ref,switch_is(level)] netr_CONTROL_QUERY_INFORMATION *info >+ [out,ref,switch_is(level)] netr_CONTROL_QUERY_INFORMATION *query > ); > > >@@ -966,13 +965,25 @@ interface netlogon > /*****************/ > /* Function 0x10 */ > >+ typedef enum { >+ SYNCSTATE_NORMAL_STATE = 0, >+ SYNCSTATE_DOMAIN_STATE = 1, >+ SYNCSTATE_GROUP_STATE = 2, >+ SYNCSTATE_UAS_BUILT_IN_GROUP_STATE = 3, >+ SYNCSTATE_USER_STATE = 4, >+ SYNCSTATE_GROUP_MEMBER_STATE = 5, >+ SYNCSTATE_ALIAS_STATE = 6, >+ SYNCSTATE_ALIAS_MEMBER_STATE = 7, >+ SYNCSTATE_SAM_DONE_STATE = 8 >+ } SyncStateEnum; >+ > NTSTATUS netr_DatabaseSync2( > [in] [string,charset(UTF16)] uint16 logon_server[], > [in] [string,charset(UTF16)] uint16 computername[], > [in,ref] netr_Authenticator *credential, > [in,out,ref] netr_Authenticator *return_authenticator, > [in] netr_SamDatabaseID database_id, >- [in] uint16 restart_state, >+ [in] SyncStateEnum restart_state, > [in,out,ref] uint32 *sync_context, > [out,ref] netr_DELTA_ENUM_ARRAY **delta_enum_array, > [in] uint32 preferredmaximumlength >diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c >index a2367c8..bfd66b3 100644 >--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c >+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c >@@ -765,13 +765,40 @@ static NTSTATUS dcesrv_netr_DatabaseDeltas(struct dcesrv_call_state *dce_call, T > > > /* >+ netr_DatabaseSync2 >+*/ >+static NTSTATUS dcesrv_netr_DatabaseSync2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >+ struct netr_DatabaseSync2 *r) >+{ >+ /* win2k3 native mode returns "NOT IMPLEMENTED" for this call */ >+ return NT_STATUS_NOT_IMPLEMENTED; >+} >+ >+ >+/* > netr_DatabaseSync > */ > static NTSTATUS dcesrv_netr_DatabaseSync(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, > struct netr_DatabaseSync *r) > { >- /* win2k3 native mode returns "NOT IMPLEMENTED" for this call */ >- return NT_STATUS_NOT_IMPLEMENTED; >+ struct netr_DatabaseSync2 r2; >+ NTSTATUS status; >+ >+ ZERO_STRUCT(r2); >+ >+ r2.in.logon_server = r->in.logon_server; >+ r2.in.computername = r->in.computername; >+ r2.in.credential = r->in.credential; >+ r2.in.database_id = r->in.database_id; >+ r2.in.restart_state = SYNCSTATE_NORMAL_STATE; >+ r2.in.sync_context = r->in.sync_context; >+ r2.out.sync_context = r->out.sync_context; >+ r2.out.delta_enum_array = r->out.delta_enum_array; >+ r2.in.preferredmaximumlength = r->in.preferredmaximumlength; >+ >+ status = dcesrv_netr_DatabaseSync2(dce_call, mem_ctx, &r2); >+ >+ return status; > } > > >@@ -841,31 +868,39 @@ static WERROR dcesrv_netr_GetDcName(struct dcesrv_call_state *dce_call, TALLOC_C > > > /* >- netr_LogonControl >+ netr_LogonControl2Ex > */ >-static WERROR dcesrv_netr_LogonControl(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >- struct netr_LogonControl *r) >+static WERROR dcesrv_netr_LogonControl2Ex(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >+ struct netr_LogonControl2Ex *r) > { >- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); >+ return WERR_NOT_SUPPORTED; > } > > > /* >- netr_GetAnyDCName >+ netr_LogonControl > */ >-static WERROR dcesrv_netr_GetAnyDCName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >- struct netr_GetAnyDCName *r) >+static WERROR dcesrv_netr_LogonControl(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >+ struct netr_LogonControl *r) > { >- struct netr_GetDcName r2; >+ struct netr_LogonControl2Ex r2; > WERROR werr; > >- ZERO_STRUCT(r2); >+ if (r->in.level == 0x00000001) { >+ ZERO_STRUCT(r2); > >- r2.in.logon_server = r->in.logon_server; >- r2.in.domainname = r->in.domainname; >- r2.out.dcname = r->out.dcname; >+ r2.in.logon_server = r->in.logon_server; >+ r2.in.function_code = r->in.function_code; >+ r2.in.level = r->in.level; >+ r2.in.data = NULL; >+ r2.out.query = r->out.query; > >- werr = dcesrv_netr_GetDcName(dce_call, mem_ctx, &r2); >+ werr = dcesrv_netr_LogonControl2Ex(dce_call, mem_ctx, &r2); >+ } else if (r->in.level == 0x00000002) { >+ werr = WERR_NOT_SUPPORTED; >+ } else { >+ werr = WERR_UNKNOWN_LEVEL; >+ } > > return werr; > } >@@ -877,18 +912,41 @@ static WERROR dcesrv_netr_GetAnyDCName(struct dcesrv_call_state *dce_call, TALLO > static WERROR dcesrv_netr_LogonControl2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, > struct netr_LogonControl2 *r) > { >- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); >+ struct netr_LogonControl2Ex r2; >+ WERROR werr; >+ >+ ZERO_STRUCT(r2); >+ >+ r2.in.logon_server = r->in.logon_server; >+ r2.in.function_code = r->in.function_code; >+ r2.in.level = r->in.level; >+ r2.in.data = r->in.data; >+ r2.out.query = r->out.query; >+ >+ werr = dcesrv_netr_LogonControl2Ex(dce_call, mem_ctx, &r2); >+ >+ return werr; > } > > > /* >- netr_DatabaseSync2 >+ netr_GetAnyDCName > */ >-static NTSTATUS dcesrv_netr_DatabaseSync2(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >- struct netr_DatabaseSync2 *r) >+static WERROR dcesrv_netr_GetAnyDCName(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >+ struct netr_GetAnyDCName *r) > { >- /* win2k3 native mode returns "NOT IMPLEMENTED" for this call */ >- return NT_STATUS_NOT_IMPLEMENTED; >+ struct netr_GetDcName r2; >+ WERROR werr; >+ >+ ZERO_STRUCT(r2); >+ >+ r2.in.logon_server = r->in.logon_server; >+ r2.in.domainname = r->in.domainname; >+ r2.out.dcname = r->out.dcname; >+ >+ werr = dcesrv_netr_GetDcName(dce_call, mem_ctx, &r2); >+ >+ return werr; > } > > >@@ -903,16 +961,6 @@ static NTSTATUS dcesrv_netr_DatabaseRedo(struct dcesrv_call_state *dce_call, TAL > > > /* >- netr_LogonControl2Ex >-*/ >-static WERROR dcesrv_netr_LogonControl2Ex(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, >- struct netr_LogonControl2Ex *r) >-{ >- DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); >-} >- >- >-/* > netr_NetrEnumerateTurstedDomains > */ > static WERROR dcesrv_netr_NetrEnumerateTrustedDomains(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 4939
:
3832
|
3846