mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
added netr_GetDcName() - quite a useful call
This commit is contained in:
parent
b2ca00ebc5
commit
63f46b223e
@ -652,16 +652,17 @@ interface netlogon
|
||||
[in,out] netr_UAS_INFO_0 recordid
|
||||
);
|
||||
|
||||
#if 0
|
||||
|
||||
/*****************/
|
||||
/* Function 0x0B */
|
||||
|
||||
NTSTATUS netr_GetDcName(
|
||||
[in] unistr logon_server,
|
||||
[in] unistr *domainname,
|
||||
[out]unistr *dcname,
|
||||
};
|
||||
[in] unistr logon_server,
|
||||
[in] unistr *domainname,
|
||||
[out] unistr *dcname
|
||||
);
|
||||
|
||||
#if 0
|
||||
|
||||
typedef struct {
|
||||
uint32 flags;
|
||||
|
@ -428,6 +428,28 @@ static BOOL test_AccountSync(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
try a netlogon GetDcName
|
||||
*/
|
||||
static BOOL test_GetDcName(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
|
||||
{
|
||||
NTSTATUS status;
|
||||
struct netr_GetDcName r;
|
||||
|
||||
r.in.logon_server = talloc_asprintf(mem_ctx, "\\\\%s", dcerpc_server_name(p));
|
||||
r.in.domainname = lp_workgroup();
|
||||
|
||||
printf("Testing GetDcName\n");
|
||||
|
||||
status = dcerpc_netr_GetDcName(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("GetDcName - %s\n", nt_errstr(status));
|
||||
return False;
|
||||
}
|
||||
|
||||
return True;
|
||||
}
|
||||
|
||||
|
||||
BOOL torture_rpc_netlogon(int dummy)
|
||||
{
|
||||
@ -448,11 +470,6 @@ BOOL torture_rpc_netlogon(int dummy)
|
||||
|
||||
p->flags |= DCERPC_DEBUG_PRINT_BOTH;
|
||||
|
||||
if (!test_AccountSync(p, mem_ctx)) {
|
||||
ret = False;
|
||||
}
|
||||
return ret;
|
||||
|
||||
if (!test_LogonUasLogon(p, mem_ctx)) {
|
||||
ret = False;
|
||||
}
|
||||
@ -481,6 +498,14 @@ BOOL torture_rpc_netlogon(int dummy)
|
||||
ret = False;
|
||||
}
|
||||
|
||||
if (!test_AccountSync(p, mem_ctx)) {
|
||||
ret = False;
|
||||
}
|
||||
|
||||
if (!test_GetDcName(p, mem_ctx)) {
|
||||
ret = False;
|
||||
}
|
||||
|
||||
torture_rpc_close(p);
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user