Blob Blame History Raw
From 2e027e43f0adb1b7c80e51d5613fca5a497ca331 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Wed, 3 Aug 2016 18:03:59 +0200
Subject: [PATCH 76/82] IPA: Check the return value of
 sss_parse_internal_fqname
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We should fail the request if sss_parse_internal_fqname() fails.

Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
---
 src/providers/ipa/ipa_subdomains_id.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/providers/ipa/ipa_subdomains_id.c b/src/providers/ipa/ipa_subdomains_id.c
index 002857699b65c86a6ed0c912a2a7ae06a8f9e507..2299523d0c52e3277db6d1061c79b320e78c8f72 100644
--- a/src/providers/ipa/ipa_subdomains_id.c
+++ b/src/providers/ipa/ipa_subdomains_id.c
@@ -509,6 +509,14 @@ static void ipa_get_subdom_acct_connected(struct tevent_req *subreq)
             } else {
                 ret = sss_parse_internal_fqname(req_input, state->filter,
                                                 &shortname, NULL);
+                if (ret != EOK) {
+                    DEBUG(SSSDBG_CRIT_FAILURE,
+                          "Cannot parse internal name [%s]: %d\n",
+                          state->filter, ret);
+                    tevent_req_error(req, ret);
+                    return;
+                }
+
                 req_input->inp.name = talloc_steal(req_input, shortname);
             }
             if (req_input->inp.name == NULL) {
-- 
2.4.11