summaryrefslogtreecommitdiffstats
path: root/src/responder
diff options
context:
space:
mode:
authorPetr Čech <pcech@redhat.com>2017-03-23 09:17:55 +0100
committerLukas Slebodnik <lslebodn@redhat.com>2017-08-25 21:02:25 +0200
commit5fe1e8ba91a1e2e95aadf94ecc5148bec804aa5a (patch)
treef928c672335ffc74ece4aa598bf513ea0389a9e5 /src/responder
parented7767aa1e3a9bc2027aa6f5f8bdc2c928e9958e (diff)
downloadsssd-5fe1e8ba91a1e2e95aadf94ecc5148bec804aa5a.tar.gz
sssd-5fe1e8ba91a1e2e95aadf94ecc5148bec804aa5a.tar.xz
sssd-5fe1e8ba91a1e2e95aadf94ecc5148bec804aa5a.zip
IFP: Filter with * in infopipe group methods
This patch fixes asterisk in filter of the ListByName Groups' method, which ends up calling ifp_groups_list_copy() with a NULL pointer. Resolves: https://pagure.io/SSSD/sssd/issue/3305 Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/responder')
-rw-r--r--src/responder/ifp/ifp_groups.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/responder/ifp/ifp_groups.c b/src/responder/ifp/ifp_groups.c
index f03c3e4b3..def241f27 100644
--- a/src/responder/ifp/ifp_groups.c
+++ b/src/responder/ifp/ifp_groups.c
@@ -307,12 +307,14 @@ static void ifp_groups_list_by_name_done(struct tevent_req *req)
return;
}
- ret = ifp_groups_list_copy(list_ctx, result->ldb_result);
- if (ret != EOK) {
- error = sbus_error_new(sbus_req, SBUS_ERROR_INTERNAL,
- "Failed to copy domain result");
- sbus_request_fail_and_finish(sbus_req, error);
- return;
+ if (ret == EOK) {
+ ret = ifp_groups_list_copy(list_ctx, result->ldb_result);
+ if (ret != EOK) {
+ error = sbus_error_new(sbus_req, SBUS_ERROR_INTERNAL,
+ "Failed to copy domain result");
+ sbus_request_fail_and_finish(sbus_req, error);
+ return;
+ }
}
list_ctx->dom = get_next_domain(list_ctx->dom, SSS_GND_DESCEND);
@@ -394,11 +396,13 @@ static void ifp_groups_list_by_domain_and_name_done(struct tevent_req *req)
goto done;
}
- ret = ifp_groups_list_copy(list_ctx, result->ldb_result);
- if (ret != EOK) {
- error = sbus_error_new(sbus_req, SBUS_ERROR_INTERNAL,
- "Failed to copy domain result");
- goto done;
+ if (ret == EOK) {
+ ret = ifp_groups_list_copy(list_ctx, result->ldb_result);
+ if (ret != EOK) {
+ error = sbus_error_new(sbus_req, SBUS_ERROR_INTERNAL,
+ "Failed to copy domain result");
+ goto done;
+ }
}
done: