URL:
https://github.com/SSSD/sssd/pull/424
Title: #424: TOOLS: Add a new sssctl command access-report
jhrozek commented:
"""
one:
```
diff --git a/src/tools/sssctl/sssctl_access_report.c
b/src/tools/sssctl/sssctl_access_report.c
index 25889f582..8cf1a8a87 100644
--- a/src/tools/sssctl/sssctl_access_report.c
+++ b/src/tools/sssctl/sssctl_access_report.c
@@ -282,15 +282,17 @@ static errno_t refresh_hbac_rules(struct sss_tool_ctx *tool_ctx,
return ENOMEM;
}
- path = sbus_opath_compose(tool_ctx, IFP_PATH_DOMAINS, domain->name);
+ path = sbus_opath_compose(tmp_ctx, IFP_PATH_DOMAINS, domain->name);
if (path == NULL) {
printf(_("Out of memory!\n"));
- return ENOMEM;
+ ret = ENOMEM;
+ goto done;
}
error = sssctl_sifp_init(tool_ctx, &sifp);
if (error != SSS_SIFP_OK) {
sssctl_sifp_error(sifp, error, "Unable to connect to the InfoPipe");
+ ret = EIO;
goto done;
}
```
two:
```
diff --git a/src/providers/ipa/ipa_access.c b/src/providers/ipa/ipa_access.c
index 110cde26b..de9f68170 100644
--- a/src/providers/ipa/ipa_access.c
+++ b/src/providers/ipa/ipa_access.c
@@ -711,7 +711,6 @@ ipa_refresh_access_rules_send(TALLOC_CTX *mem_ctx,
struct ipa_refresh_access_rules_state *state;
struct tevent_req *subreq;
struct tevent_req *req;
- errno_t ret;
DEBUG(SSSDBG_TRACE_FUNC, "Refreshing HBAC rules\n");
@@ -724,7 +723,7 @@ ipa_refresh_access_rules_send(TALLOC_CTX *mem_ctx,
subreq = ipa_fetch_hbac_send(state, params->ev, params->be_ctx, access_ctx);
if (subreq == NULL) {
- tevent_req_error(req, ret);
+ tevent_req_error(req, ENOMEM);
tevent_req_post(req, params->ev);
return req;
}
```
"""
See the full comment at
https://github.com/SSSD/sssd/pull/424#issuecomment-345524613