summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-06-09 23:15:34 +0000
committerJeremy Allison <jra@samba.org>2003-06-09 23:15:34 +0000
commit966578c615202408a368ef8c94d808eec3adb5a2 (patch)
treebaec813c8a8b1ba4b6487652df968de4bc43a295 /source3/rpc_client
parent98e1dfd3d984bcf384ec8cb086deeeee0ccf86d3 (diff)
downloadsamba-966578c615202408a368ef8c94d808eec3adb5a2.tar.gz
samba-966578c615202408a368ef8c94d808eec3adb5a2.tar.bz2
samba-966578c615202408a368ef8c94d808eec3adb5a2.zip
Add some basic DEBUG statements at level 10 so we can see what is being
called. This is *essential* (and should be done on all the other cli_XX rpc calls) to help debug winbindd problems remotely. Jeremy. (This used to be commit bc215612cb7c1abc7fb78eda4016ba9e64cdc785)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_samr.c54
1 files changed, 54 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 4fe8fba7b0..3f75a00a35 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -35,6 +35,8 @@ NTSTATUS cli_samr_connect(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_CONNECT r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_connect to %s\n", cli->desthost));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -82,6 +84,8 @@ NTSTATUS cli_samr_connect4(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_CONNECT4 r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_connect4 to %s\n", cli->desthost));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -129,6 +133,8 @@ NTSTATUS cli_samr_close(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_CLOSE_HND r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_close\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -177,6 +183,8 @@ NTSTATUS cli_samr_open_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_OPEN_DOMAIN r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_open_domain with sid %s\n", sid_string_static(domain_sid) ));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -225,6 +233,8 @@ NTSTATUS cli_samr_open_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_OPEN_USER r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_open_user with rid 0x%x\n", user_rid ));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -273,6 +283,8 @@ NTSTATUS cli_samr_open_group(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_OPEN_GROUP r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_open_group with rid 0x%x\n", group_rid ));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -321,6 +333,8 @@ NTSTATUS cli_samr_query_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_QUERY_USERINFO r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_query_userinfo\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -365,6 +379,8 @@ NTSTATUS cli_samr_query_groupinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_QUERY_GROUPINFO r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_query_groupinfo\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -410,6 +426,8 @@ NTSTATUS cli_samr_query_usergroups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_QUERY_USERGROUPS r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_query_usergroups\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -457,6 +475,8 @@ NTSTATUS cli_samr_query_useraliases(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
unsigned int ptr=1;
+ DEBUG(10,("cli_samr_query_useraliases\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -503,6 +523,8 @@ NTSTATUS cli_samr_query_groupmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_QUERY_GROUPMEM r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_query_groupmem\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -568,6 +590,8 @@ NTSTATUS cli_samr_enum_dom_users(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
int i;
+ DEBUG(10,("cli_samr_enum_dom_users starting at index %u\n", (unsigned int)*start_idx));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -646,6 +670,8 @@ NTSTATUS cli_samr_enum_dom_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 name_idx, i;
+ DEBUG(10,("cli_samr_enum_dom_groups starting at index %u\n", (unsigned int)*start_idx));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -724,6 +750,8 @@ NTSTATUS cli_samr_enum_als_groups(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 name_idx, i;
+ DEBUG(10,("cli_samr_enum_als_groups starting at index %u\n", (unsigned int)*start_idx));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -804,6 +832,8 @@ NTSTATUS cli_samr_query_aliasmem(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 i;
+ DEBUG(10,("cli_samr_query_aliasmem\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -862,6 +892,8 @@ NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_OPEN_ALIAS r;
NTSTATUS result;
+ DEBUG(10,("cli_samr_open_alias with rid 0x%x\n", alias_rid));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -914,6 +946,8 @@ NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_QUERY_DOMAIN_INFO r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_query_dom_info\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -997,6 +1031,8 @@ NTSTATUS cli_samr_query_dispinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_QUERY_DISPINFO r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_query_dispinfo for start_idx = %u\n", *start_idx));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1059,6 +1095,8 @@ NTSTATUS cli_samr_lookup_rids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 i;
+ DEBUG(10,("cli_samr_lookup_rids\n"));
+
if (num_rids > 1000) {
DEBUG(2, ("cli_samr_lookup_rids: warning: NT4 can crash if "
"more than ~1000 rids are looked up at once.\n"));
@@ -1133,6 +1171,8 @@ NTSTATUS cli_samr_lookup_names(struct cli_state *cli, TALLOC_CTX *mem_ctx,
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
uint32 i;
+ DEBUG(10,("cli_samr_lookup_names\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1196,6 +1236,8 @@ NTSTATUS cli_samr_create_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_CREATE_USER r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_create_dom_user %s\n", acct_name));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1249,6 +1291,8 @@ NTSTATUS cli_samr_set_userinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_SET_USERINFO r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_set_userinfo\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1299,6 +1343,8 @@ NTSTATUS cli_samr_set_userinfo2(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_SET_USERINFO2 r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_set_userinfo2\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1345,6 +1391,8 @@ NTSTATUS cli_samr_delete_dom_user(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_DELETE_DOM_USER r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_delete_dom_user\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1390,6 +1438,8 @@ NTSTATUS cli_samr_query_sec_obj(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_QUERY_SEC_OBJ r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_query_sec_obj\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1435,6 +1485,8 @@ NTSTATUS cli_samr_get_dom_pwinfo(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_GET_DOM_PWINFO r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_get_dom_pwinfo\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);
@@ -1487,6 +1539,8 @@ NTSTATUS cli_samr_lookup_domain(struct cli_state *cli, TALLOC_CTX *mem_ctx,
SAMR_R_LOOKUP_DOMAIN r;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
+ DEBUG(10,("cli_samr_lookup_domain\n"));
+
ZERO_STRUCT(q);
ZERO_STRUCT(r);