mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
added netr_LogonControl2Ex()
I also added IDL for netr_DatabaseRedo() but I don't yet know how it works thats the last of the netlogon IDL !
This commit is contained in:
parent
0f6af0c4bd
commit
387d8f25ff
@ -766,31 +766,31 @@ interface netlogon
|
||||
[out] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
);
|
||||
|
||||
#if 0
|
||||
|
||||
/*****************/
|
||||
/* Function 0x11 */
|
||||
|
||||
/* i'm not at all sure how this call works */
|
||||
|
||||
NTSTATUS netr_DatabaseRedo(
|
||||
[in][string][ref] wchar_t *logon_server, # REF!!!
|
||||
[in][string][ref] wchar_t *computername,
|
||||
[in][ref] netr_Authenticator credential,
|
||||
[in][out][ref] netr_Authenticator return_authenticator,
|
||||
[in][ref][size_is(change_log_entry_size)] uint8 *change_log_entry,
|
||||
[in] uint32 change_log_entry_size,
|
||||
[out] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
[in] unistr logon_server,
|
||||
[in] unistr computername,
|
||||
[in] netr_Authenticator credential,
|
||||
[in,out] netr_Authenticator return_authenticator,
|
||||
[in][size_is(change_log_entry_size)] uint8 *change_log_entry,
|
||||
[in] uint32 change_log_entry_size,
|
||||
[out] netr_DELTA_ENUM_ARRAY *delta_enum_array
|
||||
);
|
||||
|
||||
|
||||
/*****************/
|
||||
/* Function 0x12 */
|
||||
|
||||
NTSTATUS netr_LogonControl2Ex(
|
||||
[in][string] wchar_t *logon_server,
|
||||
[in] uint32 function_code,
|
||||
[in] uint32 level,
|
||||
[in][ref] CONTROL_DATA_INFORMATION *data,
|
||||
[out][ref] CONTROL_QUERY_INFORMATION *query
|
||||
WERROR netr_LogonControl2Ex(
|
||||
[in] unistr *logon_server,
|
||||
[in] uint32 function_code,
|
||||
[in] uint32 level,
|
||||
[in][switch_is(function_code)] netr_CONTROL_DATA_INFORMATION data,
|
||||
[out][switch_is(level)] netr_CONTROL_QUERY_INFORMATION query
|
||||
);
|
||||
#endif
|
||||
}
|
||||
|
@ -645,7 +645,6 @@ static BOOL test_LogonControl2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
try a netlogon DatabaseSync2
|
||||
*/
|
||||
@ -697,6 +696,87 @@ static BOOL test_DatabaseSync2(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
try a netlogon LogonControl2Ex
|
||||
*/
|
||||
static BOOL test_LogonControl2Ex(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
NTSTATUS status;
|
||||
struct netr_LogonControl2Ex r;
|
||||
BOOL ret = True;
|
||||
int i;
|
||||
|
||||
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
|
||||
|
||||
r.in.function_code = NETLOGON_CONTROL_REDISCOVER;
|
||||
r.in.data.domain = lp_workgroup();
|
||||
|
||||
for (i=1;i<4;i++) {
|
||||
r.in.level = i;
|
||||
|
||||
printf("Testing LogonControl2Ex level %d function %d\n",
|
||||
i, r.in.function_code);
|
||||
|
||||
status = dcerpc_netr_LogonControl2Ex(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("LogonControl - %s\n", nt_errstr(status));
|
||||
ret = False;
|
||||
}
|
||||
}
|
||||
|
||||
r.in.function_code = NETLOGON_CONTROL_TC_QUERY;
|
||||
r.in.data.domain = lp_workgroup();
|
||||
|
||||
for (i=1;i<4;i++) {
|
||||
r.in.level = i;
|
||||
|
||||
printf("Testing LogonControl2Ex level %d function %d\n",
|
||||
i, r.in.function_code);
|
||||
|
||||
status = dcerpc_netr_LogonControl2Ex(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("LogonControl - %s\n", nt_errstr(status));
|
||||
ret = False;
|
||||
}
|
||||
}
|
||||
|
||||
r.in.function_code = NETLOGON_CONTROL_TRANSPORT_NOTIFY;
|
||||
r.in.data.domain = lp_workgroup();
|
||||
|
||||
for (i=1;i<4;i++) {
|
||||
r.in.level = i;
|
||||
|
||||
printf("Testing LogonControl2Ex level %d function %d\n",
|
||||
i, r.in.function_code);
|
||||
|
||||
status = dcerpc_netr_LogonControl2Ex(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("LogonControl - %s\n", nt_errstr(status));
|
||||
ret = False;
|
||||
}
|
||||
}
|
||||
|
||||
r.in.function_code = NETLOGON_CONTROL_SET_DBFLAG;
|
||||
r.in.data.debug_level = ~0;
|
||||
|
||||
for (i=1;i<4;i++) {
|
||||
r.in.level = i;
|
||||
|
||||
printf("Testing LogonControl2Ex level %d function %d\n",
|
||||
i, r.in.function_code);
|
||||
|
||||
status = dcerpc_netr_LogonControl2Ex(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("LogonControl - %s\n", nt_errstr(status));
|
||||
ret = False;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOL torture_rpc_netlogon(int dummy)
|
||||
{
|
||||
NTSTATUS status;
|
||||
@ -768,6 +848,10 @@ BOOL torture_rpc_netlogon(int dummy)
|
||||
ret = False;
|
||||
}
|
||||
|
||||
if (!test_LogonControl2Ex(p, mem_ctx)) {
|
||||
ret = False;
|
||||
}
|
||||
|
||||
torture_rpc_close(p);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user