summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2013-01-14 09:46:22 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-01-14 11:33:09 +0100
commit19b16ff743afa45653a43bb3f4b5dd923d1db811 (patch)
treec604748ce066059aec5c207a3571d087fc0dcf45 /src
parent9c6e14c0d39f36085f11114e1f3155ee120558d5 (diff)
downloadsssd-19b16ff743afa45653a43bb3f4b5dd923d1db811.tar.gz
sssd-19b16ff743afa45653a43bb3f4b5dd923d1db811.tar.xz
sssd-19b16ff743afa45653a43bb3f4b5dd923d1db811.zip
let ldap_backup_chpass_uri work
https://fedorahosted.org/sssd/ticket/1760
Diffstat (limited to 'src')
-rw-r--r--src/providers/ldap/ldap_init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/providers/ldap/ldap_init.c b/src/providers/ldap/ldap_init.c
index 807526b88..fa888ba7d 100644
--- a/src/providers/ldap/ldap_init.c
+++ b/src/providers/ldap/ldap_init.c
@@ -219,6 +219,7 @@ int sssm_ldap_chpass_init(struct be_ctx *bectx,
void *data;
struct sdap_auth_ctx *ctx = NULL;
const char *urls;
+ const char *backup_urls;
const char *dns_service_name;
ret = sssm_ldap_auth_init(bectx, ops, &data);
@@ -237,13 +238,14 @@ int sssm_ldap_chpass_init(struct be_ctx *bectx,
}
urls = dp_opt_get_string(ctx->opts->basic, SDAP_CHPASS_URI);
- if (!urls && !dns_service_name) {
+ backup_urls = dp_opt_get_string(ctx->opts->basic, SDAP_CHPASS_BACKUP_URI);
+ if (!urls && !backup_urls && !dns_service_name) {
DEBUG(9, ("ldap_chpass_uri and ldap_chpass_dns_service_name not set, "
"using ldap_uri.\n"));
ctx->chpass_service = NULL;
} else {
ret = sdap_service_init(ctx, ctx->be, "LDAP_CHPASS", dns_service_name,
- urls, NULL, &ctx->chpass_service);
+ urls, backup_urls, &ctx->chpass_service);
if (ret != EOK) {
DEBUG(1, ("Failed to initialize failover service!\n"));
goto done;