summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-07 10:28:40 +0100
committerVolker Lendecke <vl@samba.org>2009-11-07 11:07:37 +0100
commit5cdee7ae0565c08026b8845cd3090b20d8abc472 (patch)
treeee58c10311c9996d7116a74f4260525e891568f0 /source3
parent843be3bcd9b07ba937944aee206bd4ecdfd65504 (diff)
downloadsamba-5cdee7ae0565c08026b8845cd3090b20d8abc472.tar.gz
samba-5cdee7ae0565c08026b8845cd3090b20d8abc472.tar.bz2
samba-5cdee7ae0565c08026b8845cd3090b20d8abc472.zip
s3: Do the printing for DEBUGLEVEL>=10 centrally
12 insertions(+), 10651 deletions(-) I think that says it all :-)
Diffstat (limited to 'source3')
-rw-r--r--source3/librpc/gen_ndr/cli_wbint.c368
-rw-r--r--source3/rpc_client/ndr.c13
2 files changed, 12 insertions, 369 deletions
diff --git a/source3/librpc/gen_ndr/cli_wbint.c b/source3/librpc/gen_ndr/cli_wbint.c
index ecf8363192..3115a20d9d 100644
--- a/source3/librpc/gen_ndr/cli_wbint.c
+++ b/source3/librpc/gen_ndr/cli_wbint.c
@@ -39,10 +39,6 @@ struct tevent_req *rpccli_wbint_Ping_send(TALLOC_CTX *mem_ctx,
/* Out parameters */
state->orig.out.out_data = _out_data;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Ping, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_Ping_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -91,10 +87,6 @@ static void rpccli_wbint_Ping_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Ping, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -128,10 +120,6 @@ NTSTATUS rpccli_wbint_Ping(struct rpc_pipe_client *cli,
/* In parameters */
r.in.in_data = in_data;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Ping, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -142,10 +130,6 @@ NTSTATUS rpccli_wbint_Ping(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Ping, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -197,10 +181,6 @@ struct tevent_req *rpccli_wbint_LookupSid_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupSid, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_LookupSid_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -254,10 +234,6 @@ static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupSid, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -297,10 +273,6 @@ NTSTATUS rpccli_wbint_LookupSid(struct rpc_pipe_client *cli,
/* In parameters */
r.in.sid = sid;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupSid, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -311,10 +283,6 @@ NTSTATUS rpccli_wbint_LookupSid(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupSid, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -370,10 +338,6 @@ struct tevent_req *rpccli_wbint_LookupName_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupName, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_LookupName_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -426,10 +390,6 @@ static void rpccli_wbint_LookupName_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupName, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -472,10 +432,6 @@ NTSTATUS rpccli_wbint_LookupName(struct rpc_pipe_client *cli,
r.in.name = name;
r.in.flags = flags;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupName, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -486,10 +442,6 @@ NTSTATUS rpccli_wbint_LookupName(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupName, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -540,10 +492,6 @@ struct tevent_req *rpccli_wbint_Sid2Uid_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Sid2Uid, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_Sid2Uid_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -595,10 +543,6 @@ static void rpccli_wbint_Sid2Uid_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Sid2Uid, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -638,10 +582,6 @@ NTSTATUS rpccli_wbint_Sid2Uid(struct rpc_pipe_client *cli,
r.in.dom_name = dom_name;
r.in.sid = sid;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Sid2Uid, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -652,10 +592,6 @@ NTSTATUS rpccli_wbint_Sid2Uid(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Sid2Uid, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -705,10 +641,6 @@ struct tevent_req *rpccli_wbint_Sid2Gid_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Sid2Gid, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_Sid2Gid_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -760,10 +692,6 @@ static void rpccli_wbint_Sid2Gid_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Sid2Gid, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -803,10 +731,6 @@ NTSTATUS rpccli_wbint_Sid2Gid(struct rpc_pipe_client *cli,
r.in.dom_name = dom_name;
r.in.sid = sid;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Sid2Gid, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -817,10 +741,6 @@ NTSTATUS rpccli_wbint_Sid2Gid(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Sid2Gid, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -870,10 +790,6 @@ struct tevent_req *rpccli_wbint_Uid2Sid_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Uid2Sid, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_Uid2Sid_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -925,10 +841,6 @@ static void rpccli_wbint_Uid2Sid_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Uid2Sid, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -968,10 +880,6 @@ NTSTATUS rpccli_wbint_Uid2Sid(struct rpc_pipe_client *cli,
r.in.dom_name = dom_name;
r.in.uid = uid;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Uid2Sid, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -982,10 +890,6 @@ NTSTATUS rpccli_wbint_Uid2Sid(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Uid2Sid, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -1035,10 +939,6 @@ struct tevent_req *rpccli_wbint_Gid2Sid_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Gid2Sid, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_Gid2Sid_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -1090,10 +990,6 @@ static void rpccli_wbint_Gid2Sid_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Gid2Sid, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -1133,10 +1029,6 @@ NTSTATUS rpccli_wbint_Gid2Sid(struct rpc_pipe_client *cli,
r.in.dom_name = dom_name;
r.in.gid = gid;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_Gid2Sid, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -1147,10 +1039,6 @@ NTSTATUS rpccli_wbint_Gid2Sid(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_Gid2Sid, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -1196,10 +1084,6 @@ struct tevent_req *rpccli_wbint_AllocateUid_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_AllocateUid, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_AllocateUid_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -1251,10 +1135,6 @@ static void rpccli_wbint_AllocateUid_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_AllocateUid, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -1290,10 +1170,6 @@ NTSTATUS rpccli_wbint_AllocateUid(struct rpc_pipe_client *cli,
/* In parameters */
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_AllocateUid, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -1304,10 +1180,6 @@ NTSTATUS rpccli_wbint_AllocateUid(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_AllocateUid, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -1353,10 +1225,6 @@ struct tevent_req *rpccli_wbint_AllocateGid_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_AllocateGid, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_AllocateGid_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -1408,10 +1276,6 @@ static void rpccli_wbint_AllocateGid_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_AllocateGid, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -1447,10 +1311,6 @@ NTSTATUS rpccli_wbint_AllocateGid(struct rpc_pipe_client *cli,
/* In parameters */
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_AllocateGid, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -1461,10 +1321,6 @@ NTSTATUS rpccli_wbint_AllocateGid(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_AllocateGid, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -1512,10 +1368,6 @@ struct tevent_req *rpccli_wbint_QueryUser_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QueryUser, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_QueryUser_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -1567,10 +1419,6 @@ static void rpccli_wbint_QueryUser_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QueryUser, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -1608,10 +1456,6 @@ NTSTATUS rpccli_wbint_QueryUser(struct rpc_pipe_client *cli,
/* In parameters */
r.in.sid = sid;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QueryUser, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -1622,10 +1466,6 @@ NTSTATUS rpccli_wbint_QueryUser(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QueryUser, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -1673,10 +1513,6 @@ struct tevent_req *rpccli_wbint_LookupUserAliases_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupUserAliases, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_LookupUserAliases_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -1728,10 +1564,6 @@ static void rpccli_wbint_LookupUserAliases_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupUserAliases, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -1769,10 +1601,6 @@ NTSTATUS rpccli_wbint_LookupUserAliases(struct rpc_pipe_client *cli,
/* In parameters */
r.in.sids = sids;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupUserAliases, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -1783,10 +1611,6 @@ NTSTATUS rpccli_wbint_LookupUserAliases(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupUserAliases, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -1834,10 +1658,6 @@ struct tevent_req *rpccli_wbint_LookupUserGroups_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupUserGroups, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_LookupUserGroups_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -1889,10 +1709,6 @@ static void rpccli_wbint_LookupUserGroups_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupUserGroups, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -1930,10 +1746,6 @@ NTSTATUS rpccli_wbint_LookupUserGroups(struct rpc_pipe_client *cli,
/* In parameters */
r.in.sid = sid;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupUserGroups, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -1944,10 +1756,6 @@ NTSTATUS rpccli_wbint_LookupUserGroups(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupUserGroups, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -1993,10 +1801,6 @@ struct tevent_req *rpccli_wbint_QuerySequenceNumber_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QuerySequenceNumber, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_QuerySequenceNumber_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -2048,10 +1852,6 @@ static void rpccli_wbint_QuerySequenceNumber_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QuerySequenceNumber, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -2087,10 +1887,6 @@ NTSTATUS rpccli_wbint_QuerySequenceNumber(struct rpc_pipe_client *cli,
/* In parameters */
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QuerySequenceNumber, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -2101,10 +1897,6 @@ NTSTATUS rpccli_wbint_QuerySequenceNumber(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QuerySequenceNumber, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -2154,10 +1946,6 @@ struct tevent_req *rpccli_wbint_LookupGroupMembers_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupGroupMembers, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_LookupGroupMembers_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -2209,10 +1997,6 @@ static void rpccli_wbint_LookupGroupMembers_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupGroupMembers, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -2252,10 +2036,6 @@ NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli,
r.in.sid = sid;
r.in.type = type;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupGroupMembers, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -2266,10 +2046,6 @@ NTSTATUS rpccli_wbint_LookupGroupMembers(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupGroupMembers, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -2315,10 +2091,6 @@ struct tevent_req *rpccli_wbint_QueryUserList_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QueryUserList, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_QueryUserList_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -2370,10 +2142,6 @@ static void rpccli_wbint_QueryUserList_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QueryUserList, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -2409,10 +2177,6 @@ NTSTATUS rpccli_wbint_QueryUserList(struct rpc_pipe_client *cli,
/* In parameters */
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QueryUserList, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -2423,10 +2187,6 @@ NTSTATUS rpccli_wbint_QueryUserList(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QueryUserList, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -2472,10 +2232,6 @@ struct tevent_req *rpccli_wbint_QueryGroupList_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QueryGroupList, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_QueryGroupList_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -2527,10 +2283,6 @@ static void rpccli_wbint_QueryGroupList_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QueryGroupList, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -2566,10 +2318,6 @@ NTSTATUS rpccli_wbint_QueryGroupList(struct rpc_pipe_client *cli,
/* In parameters */
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_QueryGroupList, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -2580,10 +2328,6 @@ NTSTATUS rpccli_wbint_QueryGroupList(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_QueryGroupList, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -2637,10 +2381,6 @@ struct tevent_req *rpccli_wbint_DsGetDcName_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_DsGetDcName, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_DsGetDcName_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -2692,10 +2432,6 @@ static void rpccli_wbint_DsGetDcName_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_DsGetDcName, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -2739,10 +2475,6 @@ NTSTATUS rpccli_wbint_DsGetDcName(struct rpc_pipe_client *cli,
r.in.site_name = site_name;
r.in.flags = flags;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_DsGetDcName, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -2753,10 +2485,6 @@ NTSTATUS rpccli_wbint_DsGetDcName(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_DsGetDcName, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -2804,10 +2532,6 @@ struct tevent_req *rpccli_wbint_LookupRids_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupRids, &state->orig);
- }
-
state->out_mem_ctx = talloc_named_const(state, 0,
"rpccli_wbint_LookupRids_out_memory");
if (tevent_req_nomem(state->out_mem_ctx, req)) {
@@ -2859,10 +2583,6 @@ static void rpccli_wbint_LookupRids_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupRids, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -2900,10 +2620,6 @@ NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
/* In parameters */
r.in.rids = rids;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_LookupRids, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -2914,10 +2630,6 @@ NTSTATUS rpccli_wbint_LookupRids(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_LookupRids, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -2961,10 +2673,6 @@ struct tevent_req *rpccli_wbint_CheckMachineAccount_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_CheckMachineAccount, &state->orig);
- }
-
/* make a temporary copy, that we pass to the dispatch function */
state->tmp = state->orig;
@@ -3009,10 +2717,6 @@ static void rpccli_wbint_CheckMachineAccount_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_CheckMachineAccount, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -3047,10 +2751,6 @@ NTSTATUS rpccli_wbint_CheckMachineAccount(struct rpc_pipe_client *cli,
/* In parameters */
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_CheckMachineAccount, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -3061,10 +2761,6 @@ NTSTATUS rpccli_wbint_CheckMachineAccount(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_CheckMachineAccount, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -3107,10 +2803,6 @@ struct tevent_req *rpccli_wbint_ChangeMachineAccount_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_ChangeMachineAccount, &state->orig);
- }
-
/* make a temporary copy, that we pass to the dispatch function */
state->tmp = state->orig;
@@ -3155,10 +2847,6 @@ static void rpccli_wbint_ChangeMachineAccount_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_ChangeMachineAccount, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -3193,10 +2881,6 @@ NTSTATUS rpccli_wbint_ChangeMachineAccount(struct rpc_pipe_client *cli,
/* In parameters */
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_ChangeMachineAccount, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -3207,10 +2891,6 @@ NTSTATUS rpccli_wbint_ChangeMachineAccount(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_ChangeMachineAccount, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -3259,10 +2939,6 @@ struct tevent_req *rpccli_wbint_SetMapping_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_SetMapping, &state->orig);
- }
-
/* make a temporary copy, that we pass to the dispatch function */
state->tmp = state->orig;
@@ -3307,10 +2983,6 @@ static void rpccli_wbint_SetMapping_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_SetMapping, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -3351,10 +3023,6 @@ NTSTATUS rpccli_wbint_SetMapping(struct rpc_pipe_client *cli,
r.in.type = type;
r.in.id = id;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_SetMapping, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -3365,10 +3033,6 @@ NTSTATUS rpccli_wbint_SetMapping(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_SetMapping, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -3417,10 +3081,6 @@ struct tevent_req *rpccli_wbint_RemoveMapping_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_RemoveMapping, &state->orig);
- }
-
/* make a temporary copy, that we pass to the dispatch function */
state->tmp = state->orig;
@@ -3465,10 +3125,6 @@ static void rpccli_wbint_RemoveMapping_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_RemoveMapping, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -3509,10 +3165,6 @@ NTSTATUS rpccli_wbint_RemoveMapping(struct rpc_pipe_client *cli,
r.in.type = type;
r.in.id = id;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_RemoveMapping, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -3523,10 +3175,6 @@ NTSTATUS rpccli_wbint_RemoveMapping(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_RemoveMapping, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
@@ -3573,10 +3221,6 @@ struct tevent_req *rpccli_wbint_SetHWM_send(TALLOC_CTX *mem_ctx,
/* Result */
ZERO_STRUCT(state->orig.out.result);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_SetHWM, &state->orig);
- }
-
/* make a temporary copy, that we pass to the dispatch function */
state->tmp = state->orig;
@@ -3621,10 +3265,6 @@ static void rpccli_wbint_SetHWM_done(struct tevent_req *subreq)
/* Reset temporary structure */
ZERO_STRUCT(state->tmp);
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_SetHWM, &state->orig);
- }
-
tevent_req_done(req);
}
@@ -3663,10 +3303,6 @@ NTSTATUS rpccli_wbint_SetHWM(struct rpc_pipe_client *cli,
r.in.type = type;
r.in.id = id;
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_IN_DEBUG(wbint_SetHWM, &r);
- }
-
status = cli->dispatch(cli,
mem_ctx,
&ndr_table_wbint,
@@ -3677,10 +3313,6 @@ NTSTATUS rpccli_wbint_SetHWM(struct rpc_pipe_client *cli,
return status;
}
- if (DEBUGLEVEL >= 10) {
- NDR_PRINT_OUT_DEBUG(wbint_SetHWM, &r);
- }
-
if (NT_STATUS_IS_ERR(status)) {
return status;
}
diff --git a/source3/rpc_client/ndr.c b/source3/rpc_client/ndr.c
index f9af2f5f7a..6433a7d196 100644
--- a/source3/rpc_client/ndr.c
+++ b/source3/rpc_client/ndr.c
@@ -59,6 +59,11 @@ struct tevent_req *cli_do_rpc_ndr_send(TALLOC_CTX *mem_ctx,
state->r = r;
state->call = &table->calls[opnum];
+ if (DEBUGLEVEL >= 10) {
+ ndr_print_function_debug(state->call->ndr_print,
+ state->call->name, NDR_IN, r);
+ }
+
push = ndr_push_init_ctx(talloc_tos(), NULL);
if (tevent_req_nomem(push, req)) {
return tevent_req_post(req, ev);
@@ -136,7 +141,13 @@ NTSTATUS cli_do_rpc_ndr_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
ndr_err = state->call->ndr_pull(pull, NDR_OUT, state->r);
TALLOC_FREE(pull);
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ if (NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ if (DEBUGLEVEL >= 10) {
+ ndr_print_function_debug(state->call->ndr_print,
+ state->call->name, NDR_OUT,
+ state->r);
+ }
+ } else {
return ndr_map_error2ntstatus(ndr_err);
}