From bc1103e93b5af364f3f61c6e9729cda18500bd44 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Thu, 10 Aug 2023 15:53:23 +1200 Subject: [PATCH] s4:kdc: Check return value from ldb_dn_get_linearized() Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- source4/kdc/db-glue.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source4/kdc/db-glue.c b/source4/kdc/db-glue.c index 37f9734fa91..22990e5133e 100644 --- a/source4/kdc/db-glue.c +++ b/source4/kdc/db-glue.c @@ -108,6 +108,11 @@ static void auth_sam_trigger_repl_secret(TALLOC_CTX *mem_ctx, } r.in.user_dn = ldb_dn_get_linearized(user_dn); + if (r.in.user_dn == NULL) { + DBG_WARNING("Unable to get user DN\n"); + TALLOC_FREE(tmp_ctx); + return; + } /* * This seem to rely on the current IRPC implementation, -- 2.11.4.GIT