summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-06-06 05:11:44 -0400
committerJakub Hrozek <jhrozek@redhat.com>2012-08-01 16:19:42 +0200
commit46118ee53dc0d25e449cd7e37e624a4c62b78ee2 (patch)
tree84cf091eb5857178d883195dc42c4133f0a56c5c /src/providers
parent07b7b76d7cd494cbd26263503ba2732c21819941 (diff)
downloadsssd-46118ee53dc0d25e449cd7e37e624a4c62b78ee2.tar.gz
sssd-46118ee53dc0d25e449cd7e37e624a4c62b78ee2.tar.bz2
sssd-46118ee53dc0d25e449cd7e37e624a4c62b78ee2.zip
Primary server support: new option in IPA provider
This patch adds support for new config option ipa_backup_server. The description of this option's functionality is included in man page in one of previous patches.
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_common.h1
-rw-r--r--src/providers/ipa/ipa_init.c8
-rw-r--r--src/providers/ipa/ipa_opts.h1
3 files changed, 6 insertions, 4 deletions
diff --git a/src/providers/ipa/ipa_common.h b/src/providers/ipa/ipa_common.h
index b0944595..01e14032 100644
--- a/src/providers/ipa/ipa_common.h
+++ b/src/providers/ipa/ipa_common.h
@@ -35,6 +35,7 @@ struct ipa_service {
enum ipa_basic_opt {
IPA_DOMAIN = 0,
IPA_SERVER,
+ IPA_BACKUP_SERVER,
IPA_HOSTNAME,
IPA_DYNDNS_UPDATE,
IPA_DYNDNS_IFACE,
diff --git a/src/providers/ipa/ipa_init.c b/src/providers/ipa/ipa_init.c
index 65c77664..d3d865e0 100644
--- a/src/providers/ipa/ipa_init.c
+++ b/src/providers/ipa/ipa_init.c
@@ -84,6 +84,7 @@ struct bet_ops ipa_subdomains_ops = {
int common_ipa_init(struct be_ctx *bectx)
{
const char *ipa_servers;
+ const char *ipa_backup_servers;
int ret;
ret = ipa_get_options(bectx, bectx->cdb,
@@ -94,11 +95,10 @@ int common_ipa_init(struct be_ctx *bectx)
}
ipa_servers = dp_opt_get_string(ipa_options->basic, IPA_SERVER);
- if (!ipa_servers) {
- DEBUG(1, ("Missing ipa_server option - using service discovery!\n"));
- }
+ ipa_backup_servers = dp_opt_get_string(ipa_options->basic, IPA_BACKUP_SERVER);
- ret = ipa_service_init(ipa_options, bectx, ipa_servers, NULL, ipa_options,
+ ret = ipa_service_init(ipa_options, bectx, ipa_servers,
+ ipa_backup_servers, ipa_options,
&ipa_options->service);
if (ret != EOK) {
DEBUG(0, ("Failed to init IPA failover service!\n"));
diff --git a/src/providers/ipa/ipa_opts.h b/src/providers/ipa/ipa_opts.h
index bf1b7a33..0f66d2f6 100644
--- a/src/providers/ipa/ipa_opts.h
+++ b/src/providers/ipa/ipa_opts.h
@@ -32,6 +32,7 @@
struct dp_option ipa_basic_opts[] = {
{ "ipa_domain", DP_OPT_STRING, NULL_STRING, NULL_STRING },
{ "ipa_server", DP_OPT_STRING, NULL_STRING, NULL_STRING },
+ { "ipa_backup_server", DP_OPT_STRING, NULL_STRING, NULL_STRING },
{ "ipa_hostname", DP_OPT_STRING, NULL_STRING, NULL_STRING },
{ "ipa_dyndns_update", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE },
{ "ipa_dyndns_iface", DP_OPT_STRING, NULL_STRING, NULL_STRING},