1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

mdssvc.idl: pass policy_handle as pointer

No change in behaviour, this just changes all functions to take the
policy_handle argument as pointer instead of passing it by value.
This is how all other IDLs pass it.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct  9 15:52:55 UTC 2019 on sn-devel-184
This commit is contained in:
Ralph Boehme 2019-08-23 18:43:02 +02:00
parent 63cbeaf0e7
commit c9b6298249
5 changed files with 31 additions and 31 deletions

View File

@ -18,7 +18,7 @@ interface mdssvc
);
void mdssvc_unknown1(
[in] policy_handle handle,
[in] policy_handle *handle,
[in] uint32 unkn1, /* always 0, some status ? */
[in] uint32 device_id,
[in] uint32 unkn3, /* = mdssvc_open.unkn2 ? */
@ -37,7 +37,7 @@ interface mdssvc
} mdssvc_blob;
void mdssvc_cmd(
[in] policy_handle handle,
[in] policy_handle *handle,
[in] uint32 unkn1, /* always 0, status ? */
[in] uint32 device_id,
[in] uint32 unkn3, /* = mdssvc_open.unkn2 ? */
@ -57,7 +57,7 @@ interface mdssvc
);
void mdssvc_close(
[in] policy_handle in_handle,
[in] policy_handle *in_handle,
[in] uint32 unkn1, /* always 0, some status ? */
[in] uint32 device_id,
[in] uint32 unkn2, /* = mdssvc_open.unkn2 ? */

View File

@ -124,7 +124,7 @@ static void mdscli_connect_open_done(struct tevent_req *subreq)
state,
state->ev,
mdscli_ctx->bh,
mdscli_ctx->ph,
&mdscli_ctx->ph,
0,
mdscli_ctx->dev,
mdscli_ctx->mdscmd_open.unkn2,
@ -288,7 +288,7 @@ struct tevent_req *mdscli_search_send(TALLOC_CTX *mem_ctx,
subreq = dcerpc_mdssvc_cmd_send(state,
ev,
mdscli_ctx->bh,
mdscli_ctx->ph,
&mdscli_ctx->ph,
0,
mdscli_ctx->dev,
mdscli_ctx->mdscmd_open.unkn2,
@ -469,7 +469,7 @@ struct tevent_req *mdscli_get_results_send(
subreq = dcerpc_mdssvc_cmd_send(state,
ev,
mdscli_ctx->bh,
mdscli_ctx->ph,
&mdscli_ctx->ph,
0,
mdscli_ctx->dev,
mdscli_ctx->mdscmd_open.unkn2,
@ -693,7 +693,7 @@ struct tevent_req *mdscli_get_path_send(TALLOC_CTX *mem_ctx,
subreq = dcerpc_mdssvc_cmd_send(state,
ev,
mdscli_ctx->bh,
mdscli_ctx->ph,
&mdscli_ctx->ph,
0,
mdscli_ctx->dev,
mdscli_ctx->mdscmd_open.unkn2,
@ -864,7 +864,7 @@ struct tevent_req *mdscli_close_search_send(TALLOC_CTX *mem_ctx,
subreq = dcerpc_mdssvc_cmd_send(state,
ev,
mdscli_ctx->bh,
mdscli_ctx->ph,
&mdscli_ctx->ph,
0,
mdscli_ctx->dev,
mdscli_ctx->mdscmd_open.unkn2,
@ -968,7 +968,7 @@ struct tevent_req *mdscli_disconnect_send(TALLOC_CTX *mem_ctx,
subreq = dcerpc_mdssvc_close_send(state,
ev,
mdscli_ctx->bh,
mdscli_ctx->ph,
&mdscli_ctx->ph,
0,
mdscli_ctx->dev,
mdscli_ctx->mdscmd_open.unkn2,

View File

@ -211,8 +211,8 @@ void _mdssvc_unknown1(struct pipes_struct *p, struct mdssvc_unknown1 *r)
{
struct mds_ctx *mds_ctx;
if (!find_policy_by_hnd(p, &r->in.handle, (void **)(void *)&mds_ctx)) {
if (is_zero_policy_handle(&r->in.handle)) {
if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&mds_ctx)) {
if (is_zero_policy_handle(r->in.handle)) {
p->fault_state = 0;
} else {
p->fault_state = DCERPC_NCA_S_PROTO_ERROR;
@ -238,8 +238,8 @@ void _mdssvc_cmd(struct pipes_struct *p, struct mdssvc_cmd *r)
char *rbuf;
struct mds_ctx *mds_ctx;
if (!find_policy_by_hnd(p, &r->in.handle, (void **)(void *)&mds_ctx)) {
if (is_zero_policy_handle(&r->in.handle)) {
if (!find_policy_by_hnd(p, r->in.handle, (void **)(void *)&mds_ctx)) {
if (is_zero_policy_handle(r->in.handle)) {
p->fault_state = 0;
} else {
p->fault_state = DCERPC_NCA_S_PROTO_ERROR;
@ -313,10 +313,10 @@ void _mdssvc_close(struct pipes_struct *p, struct mdssvc_close *r)
struct mds_ctx *mds_ctx;
bool ok;
ok = find_policy_by_hnd(p, &r->in.in_handle, (void **)(void *)&mds_ctx);
ok = find_policy_by_hnd(p, r->in.in_handle, (void **)(void *)&mds_ctx);
if (!ok) {
DBG_WARNING("invalid handle\n");
if (is_zero_policy_handle(&r->in.in_handle)) {
if (is_zero_policy_handle(r->in.in_handle)) {
p->fault_state = 0;
} else {
p->fault_state = DCERPC_NCA_S_PROTO_ERROR;
@ -327,8 +327,8 @@ void _mdssvc_close(struct pipes_struct *p, struct mdssvc_close *r)
DBG_DEBUG("Close mdssvc handle for path: %s\n", mds_ctx->spath);
TALLOC_FREE(mds_ctx);
*r->out.out_handle = r->in.in_handle;
close_policy_hnd(p, &r->in.in_handle);
*r->out.out_handle = *r->in.in_handle;
close_policy_hnd(p, r->in.in_handle);
*r->out.status = 0;

View File

@ -70,7 +70,7 @@ static NTSTATUS cmd_mdssvc_fetch_properties(
}
status = dcerpc_mdssvc_unknown1(b, mem_ctx,
share_handle,
&share_handle,
0,
device_id,
unkn1,
@ -160,7 +160,7 @@ static NTSTATUS cmd_mdssvc_fetch_properties(
request_blob.size = len;
status = dcerpc_mdssvc_cmd(b, mem_ctx,
share_handle,
&share_handle,
0,
device_id,
23,
@ -248,7 +248,7 @@ static NTSTATUS cmd_mdssvc_fetch_attributes(
}
status = dcerpc_mdssvc_unknown1(b, mem_ctx,
share_handle,
&share_handle,
0,
device_id,
unkn1,
@ -386,7 +386,7 @@ static NTSTATUS cmd_mdssvc_fetch_attributes(
request_blob.size = len;
status = dcerpc_mdssvc_cmd(b, mem_ctx,
share_handle,
&share_handle,
0,
device_id,
23,

View File

@ -128,7 +128,7 @@ static bool torture_rpc_mdssvc_open(struct torture_context *tctx,
status = dcerpc_mdssvc_unknown1(b,
state,
state->ph,
&state->ph,
0,
state->dev,
state->mdscmd_open.unkn2,
@ -145,7 +145,7 @@ done:
if (!ok) {
(void)dcerpc_mdssvc_close(b,
state,
state->ph,
&state->ph,
0,
state->dev,
state->mdscmd_open.unkn2,
@ -170,7 +170,7 @@ static bool torture_rpc_mdssvc_close(struct torture_context *tctx,
status = dcerpc_mdssvc_close(b,
state,
state->ph,
&state->ph,
0,
state->dev,
state->mdscmd_open.unkn2,
@ -368,7 +368,7 @@ static bool test_mdssvc_close(struct torture_context *tctx,
status = dcerpc_mdssvc_close(b,
tctx,
ph,
&ph,
0,
device_id,
unkn2,
@ -395,7 +395,7 @@ static bool test_mdssvc_close(struct torture_context *tctx,
ZERO_STRUCT(ph);
status = dcerpc_mdssvc_close(b,
tctx,
ph,
&ph,
0,
device_id,
unkn2,
@ -438,7 +438,7 @@ static bool test_mdssvc_null_ph(struct torture_context *tctx,
status = dcerpc_mdssvc_unknown1(b,
tctx,
ph,
&ph,
0,
device_id,
unkn2,
@ -484,7 +484,7 @@ static bool test_mdssvc_invalid_ph_unknown1(struct torture_context *tctx,
status = dcerpc_mdssvc_unknown1(b,
tctx,
ph,
&ph,
0,
device_id,
unkn2,
@ -546,7 +546,7 @@ static bool test_mdssvc_invalid_ph_cmd(struct torture_context *tctx,
status = dcerpc_mdssvc_cmd(b,
state,
ph,
&ph,
0,
device_id,
unkn2,
@ -592,7 +592,7 @@ static bool test_mdssvc_invalid_ph_close(struct torture_context *tctx,
status = dcerpc_mdssvc_close(b,
state,
ph,
&ph,
0,
device_id,
unkn2,
@ -716,7 +716,7 @@ static bool test_mdssvc_fetch_attr_unknown_cnid(struct torture_context *tctx,
status = dcerpc_mdssvc_cmd(b,
state,
state->ph,
&state->ph,
0,
state->dev,
state->mdscmd_open.unkn2,