The Samba-Bugzilla – Attachment 3846 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), 7.07 KB, created by
Matthias Dieter Wallnöfer
on 2009-01-03 08:04:13 UTC
(
hide
)
Description:
NETLOGON pipe improvements
Filename:
MIME Type:
Creator:
Matthias Dieter Wallnöfer
Created:
2009-01-03 08:04:13 UTC
Size:
7.07 KB
patch
obsolete
>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 fc7fded..cfa32e9 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, >diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c >index 785b43d..9a5a63e 100644 >--- a/source4/torture/rpc/netlogon.c >+++ b/source4/torture/rpc/netlogon.c >@@ -1486,12 +1486,12 @@ static bool test_LogonControl(struct torture_context *tctx, > { > NTSTATUS status; > struct netr_LogonControl r; >- union netr_CONTROL_QUERY_INFORMATION info; >+ union netr_CONTROL_QUERY_INFORMATION query; > int i; > > r.in.logon_server = talloc_asprintf(tctx, "\\\\%s", dcerpc_server_name(p)); > r.in.function_code = 1; >- r.out.info = &info; >+ r.out.query = &query; > > for (i=1;i<4;i++) { > r.in.level = i;
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