|
|
bb7cd1 |
From 359fe83281f2f54d71da65879eafec5ae383f33f Mon Sep 17 00:00:00 2001
|
|
|
bb7cd1 |
From: Justin Stephenson <jstephen@redhat.com>
|
|
|
bb7cd1 |
Date: Thu, 16 Mar 2017 14:46:55 -0400
|
|
|
bb7cd1 |
Subject: [PATCH 15/15] IPA: Enhance debug logging for ipa s2n operations
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
Add log messages to provide useful debug logging surrounding
|
|
|
bb7cd1 |
IPA client extended operations to the IPA Server during AD trust
|
|
|
bb7cd1 |
requests to retrieve information. Print more details about the
|
|
|
bb7cd1 |
objects requested and received during the ipa_s2n operations.
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
This will improve log analysis and troubleshooting efforts during AD
|
|
|
bb7cd1 |
trust user and group resolution failures on IPA clients, such as missing
|
|
|
bb7cd1 |
groups.
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
Reviewed-by: Sumit Bose <sbose@redhat.com>
|
|
|
bb7cd1 |
---
|
|
|
bb7cd1 |
src/providers/ipa/ipa_s2n_exop.c | 28 ++++++++++++++++++++++++++++
|
|
|
bb7cd1 |
1 file changed, 28 insertions(+)
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
|
|
|
bb7cd1 |
index 4fe20689fe4c0f2bb5217691dd05b37d2a1cc820..c99312274073858e5e03f3e82c069dafc839eb61 100644
|
|
|
bb7cd1 |
--- a/src/providers/ipa/ipa_s2n_exop.c
|
|
|
bb7cd1 |
+++ b/src/providers/ipa/ipa_s2n_exop.c
|
|
|
bb7cd1 |
@@ -1156,6 +1156,13 @@ static errno_t ipa_s2n_get_list_step(struct tevent_req *req)
|
|
|
bb7cd1 |
need_v1 = true;
|
|
|
bb7cd1 |
}
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
+ if (state->req_input.type == REQ_INP_NAME
|
|
|
bb7cd1 |
+ && state->req_input.inp.name != NULL) {
|
|
|
bb7cd1 |
+ DEBUG(SSSDBG_TRACE_FUNC, "Sending request_type: [%s] for group [%s].\n",
|
|
|
bb7cd1 |
+ ipa_s2n_reqtype2str(state->request_type),
|
|
|
bb7cd1 |
+ state->list[state->list_idx]);
|
|
|
bb7cd1 |
+ }
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
subreq = ipa_s2n_exop_send(state, state->ev, state->sh, need_v1,
|
|
|
bb7cd1 |
state->exop_timeout, bv_req);
|
|
|
bb7cd1 |
if (subreq == NULL) {
|
|
|
bb7cd1 |
@@ -1194,6 +1201,9 @@ static void ipa_s2n_get_list_next(struct tevent_req *subreq)
|
|
|
bb7cd1 |
goto fail;
|
|
|
bb7cd1 |
}
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
+ DEBUG(SSSDBG_TRACE_FUNC, "Received [%s] attributes from IPA server.\n",
|
|
|
bb7cd1 |
+ state->attrs->a.name);
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
if (is_default_view(state->ipa_ctx->view_name)) {
|
|
|
bb7cd1 |
ret = ipa_s2n_get_list_save_step(req);
|
|
|
bb7cd1 |
if (ret == EOK) {
|
|
|
bb7cd1 |
@@ -1375,6 +1385,11 @@ struct tevent_req *ipa_s2n_get_acct_info_send(TALLOC_CTX *mem_ctx,
|
|
|
bb7cd1 |
goto fail;
|
|
|
bb7cd1 |
}
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
+ DEBUG(SSSDBG_TRACE_FUNC, "Sending request_type: [%s] for trust user [%s] "
|
|
|
bb7cd1 |
+ "to IPA server\n",
|
|
|
bb7cd1 |
+ ipa_s2n_reqtype2str(state->request_type),
|
|
|
bb7cd1 |
+ req_input->inp.name);
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
subreq = ipa_s2n_exop_send(state, state->ev, state->sh, is_v1,
|
|
|
bb7cd1 |
state->exop_timeout, bv_req);
|
|
|
bb7cd1 |
if (subreq == NULL) {
|
|
|
bb7cd1 |
@@ -1661,6 +1676,19 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
|
|
|
bb7cd1 |
state->attrs = attrs;
|
|
|
bb7cd1 |
|
|
|
bb7cd1 |
if (attrs->response_type == RESP_USER_GROUPLIST) {
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
+ if (DEBUG_IS_SET(SSSDBG_TRACE_FUNC)) {
|
|
|
bb7cd1 |
+ size_t c;
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
+ DEBUG(SSSDBG_TRACE_FUNC, "Received [%zu] groups in group list "
|
|
|
bb7cd1 |
+ "from IPA Server\n", attrs->ngroups);
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
+ for (c = 0; c < attrs->ngroups; c++) {
|
|
|
bb7cd1 |
+ DEBUG(SSSDBG_TRACE_FUNC, "[%s].\n", attrs->groups[c]);
|
|
|
bb7cd1 |
+ }
|
|
|
bb7cd1 |
+ }
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
+
|
|
|
bb7cd1 |
ret = get_group_dn_list(state, state->dom,
|
|
|
bb7cd1 |
attrs->ngroups, attrs->groups,
|
|
|
bb7cd1 |
&group_dn_list, &missing_list);
|
|
|
bb7cd1 |
--
|
|
|
bb7cd1 |
2.9.3
|
|
|
bb7cd1 |
|