sssd/SOURCES/0016-ipa-Add-BUILD_PASSKEY-...

59 lines
2.0 KiB
Diff

From 7cf9a1ff0e876ea0970a3f0b3c389b87be834b4f Mon Sep 17 00:00:00 2001
From: Justin Stephenson <jstephen@redhat.com>
Date: Tue, 15 Aug 2023 13:33:03 -0400
Subject: [PATCH] ipa: Add `BUILD_PASSKEY` conditional for passkey codepath
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
---
Makefile.am | 2 ++
src/providers/ipa/ipa_subdomains.c | 4 ++++
2 files changed, 6 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 273ac1c523..c68461675f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4568,9 +4568,10 @@ if BUILD_SSH
libsss_ipa_la_SOURCES += src/providers/ipa/ipa_hostid.c
endif
+if BUILD_PASSKEY
libsss_ipa_la_SOURCES += \
src/providers/ipa/ipa_subdomains_passkey.c
-
+endif
libsss_ad_la_SOURCES = \
src/providers/ad/ad_opts.c \
diff --git a/src/providers/ipa/ipa_subdomains.c b/src/providers/ipa/ipa_subdomains.c
index 34cedc0362..e19343a77d 100644
--- a/src/providers/ipa/ipa_subdomains.c
+++ b/src/providers/ipa/ipa_subdomains.c
@@ -30,7 +30,9 @@
#include "providers/ipa/ipa_id.h"
#include "providers/ipa/ipa_opts.h"
#include "providers/ipa/ipa_config.h"
+#ifdef BUILD_PASSKEY
#include "providers/ipa/ipa_subdomains_passkey.h"
+#endif /* BUILD_PASSKEY */
#include <ctype.h>
@@ -2762,6 +2764,7 @@ static void ipa_subdomains_refresh_certmap_done(struct tevent_req *subreq)
/* Not good, but let's try to continue with other server side options */
}
+#ifdef BUILD_PASSKEY
subreq = ipa_subdomains_passkey_send(state, state->ev, state->sd_ctx,
sdap_id_op_handle(state->sdap_op));
if (subreq == NULL) {
@@ -2792,6 +2795,7 @@ static void ipa_subdomains_refresh_passkey_done(struct tevent_req *subreq)
DEBUG(SSSDBG_IMPORTANT_INFO, "Passkey feature is not configured "
"on IPA server");
}
+#endif /* BUILD_PASSKEY */
subreq = ipa_subdomains_master_send(state, state->ev, state->sd_ctx,
sdap_id_op_handle(state->sdap_op));