1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

added samr_QueryDisplayInfo() (only level 1 so far)

This commit is contained in:
Andrew Tridgell 0001-01-01 00:00:00 +00:00
parent 683259a4dd
commit 8601305c81
2 changed files with 57 additions and 1 deletions

View File

@ -645,7 +645,35 @@
/************************/
/* Function 0x28 */
NTSTATUS samr_QUERY_DISPINFO();
typedef struct {
uint32 idx;
uint32 rid;
uint32 acct_flags;
samr_Name username;
samr_Name full_name;
samr_Name description;
} samr_DispEntry1;
typedef struct {
uint32 count;
[size_is(count)] samr_DispEntry1 *entries;
} samr_DispInfo1;
typedef union {
[case(1)] samr_DispInfo1 info1;
} samr_DispInfo;
NTSTATUS samr_QueryDisplayInfo(
[in,ref] policy_handle *handle,
[in] uint16 level,
[in] uint32 start_idx,
[in] uint32 max_entries,
[in] uint32 buf_size,
[out] uint32 total_size,
[out] uint32 returned_size,
[out,switch_is(level)] samr_DispInfo info
);
/************************/
/* Function 0x29 */

View File

@ -651,6 +651,30 @@ static BOOL test_EnumDomainAliases(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
return ret;
}
static BOOL test_QueryDisplayInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle)
{
NTSTATUS status;
struct samr_QueryDisplayInfo r;
BOOL ret = True;
printf("Testing QueryDisplayInfo\n");
r.in.handle = handle;
r.in.level = 1;
r.in.start_idx = 0;
r.in.max_entries = 100;
r.in.buf_size = (uint32)-1;
status = dcerpc_samr_QueryDisplayInfo(p, mem_ctx, &r);
if (!NT_STATUS_IS_OK(status)) {
printf("QueryDisplayInfo failed - %s\n", nt_errstr(status));
return False;
}
return ret;
}
static BOOL test_QueryDomainInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
struct policy_handle *handle)
{
@ -723,6 +747,10 @@ static BOOL test_OpenDomain(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ret = False;
}
if (!test_QueryDisplayInfo(p, mem_ctx, &domain_handle)) {
ret = False;
}
if (!test_Close(p, mem_ctx, &domain_handle)) {
ret = False;
}