mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
s4-samr: merge samr_QueryAliasInfo from s3 idl. (fixme: python)
Guenther
This commit is contained in:
parent
99c2fac6b2
commit
0548642e5b
@ -686,7 +686,7 @@ import "misc.idl", "lsa.idl", "security.idl";
|
||||
NTSTATUS samr_QueryAliasInfo(
|
||||
[in,ref] policy_handle *alias_handle,
|
||||
[in] samr_AliasInfoEnum level,
|
||||
[out,switch_is(level),unique] samr_AliasInfo *info
|
||||
[out,ref,switch_is(level)] samr_AliasInfo **info
|
||||
);
|
||||
|
||||
/************************/
|
||||
|
@ -2602,7 +2602,7 @@ static NTSTATUS dcesrv_samr_QueryAliasInfo(struct dcesrv_call_state *dce_call, T
|
||||
int ret;
|
||||
union samr_AliasInfo *info;
|
||||
|
||||
r->out.info = NULL;
|
||||
*r->out.info = NULL;
|
||||
|
||||
DCESRV_PULL_HANDLE(h, r->in.alias_handle, SAMR_HANDLE_ALIAS);
|
||||
|
||||
@ -2639,7 +2639,7 @@ static NTSTATUS dcesrv_samr_QueryAliasInfo(struct dcesrv_call_state *dce_call, T
|
||||
return NT_STATUS_INVALID_INFO_CLASS;
|
||||
}
|
||||
|
||||
r->out.info = info;
|
||||
*r->out.info = info;
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
@ -845,6 +845,7 @@ static bool test_SetAliasInfo(struct dcerpc_pipe *p, struct torture_context *tct
|
||||
NTSTATUS status;
|
||||
struct samr_SetAliasInfo r;
|
||||
struct samr_QueryAliasInfo q;
|
||||
union samr_AliasInfo *info;
|
||||
uint16_t levels[] = {2, 3};
|
||||
int i;
|
||||
bool ret = true;
|
||||
@ -875,6 +876,7 @@ static bool test_SetAliasInfo(struct dcerpc_pipe *p, struct torture_context *tct
|
||||
|
||||
q.in.alias_handle = handle;
|
||||
q.in.level = levels[i];
|
||||
q.out.info = &info;
|
||||
|
||||
status = dcerpc_samr_QueryAliasInfo(p, tctx, &q);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -2936,6 +2938,7 @@ static bool test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
{
|
||||
NTSTATUS status;
|
||||
struct samr_QueryAliasInfo r;
|
||||
union samr_AliasInfo *info;
|
||||
uint16_t levels[] = {1, 2, 3};
|
||||
int i;
|
||||
bool ret = true;
|
||||
@ -2945,6 +2948,7 @@ static bool test_QueryAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
|
||||
r.in.alias_handle = handle;
|
||||
r.in.level = levels[i];
|
||||
r.out.info = &info;
|
||||
|
||||
status = dcerpc_samr_QueryAliasInfo(p, mem_ctx, &r);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
|
@ -730,6 +730,7 @@ static bool samsync_handle_alias(TALLOC_CTX *mem_ctx, struct samsync_state *sams
|
||||
|
||||
struct samr_OpenAlias r;
|
||||
struct samr_QueryAliasInfo q;
|
||||
union samr_AliasInfo *info;
|
||||
struct policy_handle alias_handle;
|
||||
|
||||
if (!samsync_state->domain_name || !samsync_state->domain_handle[database_id]) {
|
||||
@ -750,6 +751,7 @@ static bool samsync_handle_alias(TALLOC_CTX *mem_ctx, struct samsync_state *sams
|
||||
|
||||
q.in.alias_handle = &alias_handle;
|
||||
q.in.level = 1;
|
||||
q.out.info = &info;
|
||||
|
||||
TEST_SEC_DESC_EQUAL(alias->sdbuf, samr, &alias_handle);
|
||||
|
||||
@ -764,8 +766,8 @@ static bool samsync_handle_alias(TALLOC_CTX *mem_ctx, struct samsync_state *sams
|
||||
return false;
|
||||
}
|
||||
|
||||
TEST_STRING_EQUAL(q.out.info->all.name, alias->alias_name);
|
||||
TEST_STRING_EQUAL(q.out.info->all.description, alias->description);
|
||||
TEST_STRING_EQUAL(info->all.name, alias->alias_name);
|
||||
TEST_STRING_EQUAL(info->all.description, alias->description);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user