From 51354c3e23aa59d88e0340fb7cdbb9b7d4990743 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek@redhat.com>
Date: Mon, 25 Jun 2018 13:10:34 +0200
Subject: [PATCH] IPA: Add the options that the IPA subdomains code will read
for trusted domains on the client
With this patchset, IPA clients will read and evaluate the ad_server and
ad_site options. This patch just adds the required structures for later
usage.
Related:
https://pagure.io/SSSD/sssd/issue/3291
Reviewed-by: Sumit Bose <sbose@redhat.com>
(cherry picked from commit 1cce549e0f88f4873c320577d6213dcaeb08766f)
---
src/providers/ipa/ipa_common.h | 7 +++++++
src/providers/ipa/ipa_opts.c | 6 ++++++
src/providers/ipa/ipa_opts.h | 2 ++
3 files changed, 15 insertions(+)
diff --git a/src/providers/ipa/ipa_common.h b/src/providers/ipa/ipa_common.h
index 725e0e93728f7643bdf2220a4cb7ecfbbb8b958a..31e671eb50393f77225281226558d9848b3d3d78 100644
--- a/src/providers/ipa/ipa_common.h
+++ b/src/providers/ipa/ipa_common.h
@@ -175,6 +175,13 @@ enum ipa_sudocmd_attrs {
IPA_OPTS_SUDOCMD
};
+enum ipa_cli_ad_subdom_attrs {
+ IPA_CLI_AD_SERVER,
+ IPA_CLI_AD_SITE,
+
+ IPA_OPTS_CLI_AD_SUBDOM
+};
+
struct ipa_auth_ctx {
struct krb5_ctx *krb5_auth_ctx;
struct sdap_id_ctx *sdap_id_ctx;
diff --git a/src/providers/ipa/ipa_opts.c b/src/providers/ipa/ipa_opts.c
index 9419cdcc3913c58e2bcefe238b56fb75e8aa52ec..485ad4fe3ff9808343a94b1792f8c632a3d4b481 100644
--- a/src/providers/ipa/ipa_opts.c
+++ b/src/providers/ipa/ipa_opts.c
@@ -389,3 +389,9 @@ struct sdap_attr_map ipa_sudocmd_map[] = {
{ "ipa_sudocmd_memberof", "memberOf", SYSDB_MEMBEROF, NULL },
SDAP_ATTR_MAP_TERMINATOR
};
+
+struct dp_option ipa_cli_ad_subdom_opts [] = {
+ { "ad_server", DP_OPT_STRING, NULL_STRING, NULL_STRING },
+ { "ad_site", DP_OPT_STRING, NULL_STRING, NULL_STRING },
+ DP_OPTION_TERMINATOR
+};
diff --git a/src/providers/ipa/ipa_opts.h b/src/providers/ipa/ipa_opts.h
index 68326b8649a268232394a8fe970d932feb01d46e..378a9922c7b58fc4374262250efbd61b4b6a932f 100644
--- a/src/providers/ipa/ipa_opts.h
+++ b/src/providers/ipa/ipa_opts.h
@@ -64,4 +64,6 @@ extern struct sdap_attr_map ipa_sudocmdgroup_map[];
extern struct sdap_attr_map ipa_sudocmd_map[];
+extern struct dp_option ipa_cli_ad_subdom_opts[];
+
#endif /* IPA_OPTS_H_ */
--
2.17.1