summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5/krb5_common.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-12-07 13:18:39 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-12-07 17:23:25 -0500
commit8d163c0a088318ed9fc0b22def2649e27992ea53 (patch)
tree92c6b438d4473d5cc29522656b1b01f02db0b597 /src/providers/krb5/krb5_common.c
parenta3ea95747b33de4b50485fb9b5c4e5c45338b3db (diff)
downloadsssd-8d163c0a088318ed9fc0b22def2649e27992ea53.tar.gz
sssd-8d163c0a088318ed9fc0b22def2649e27992ea53.tar.xz
sssd-8d163c0a088318ed9fc0b22def2649e27992ea53.zip
Replace krb5_kdcip by krb5_server in LDAP provider
Diffstat (limited to 'src/providers/krb5/krb5_common.c')
-rw-r--r--src/providers/krb5/krb5_common.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/providers/krb5/krb5_common.c b/src/providers/krb5/krb5_common.c
index 25188c5f8..9d114e34f 100644
--- a/src/providers/krb5/krb5_common.c
+++ b/src/providers/krb5/krb5_common.c
@@ -184,12 +184,13 @@ errno_t check_and_export_options(struct dp_option *opts,
}
errno_t krb5_try_kdcip(TALLOC_CTX *memctx, struct confdb_ctx *cdb,
- const char *conf_path, struct dp_option *opts)
+ const char *conf_path, struct dp_option *opts,
+ int opt_id)
{
char *krb5_servers = NULL;
errno_t ret;
- krb5_servers = dp_opt_get_string(opts, KRB5_KDC);
+ krb5_servers = dp_opt_get_string(opts, opt_id);
if (krb5_servers == NULL) {
DEBUG(4, ("No KDC found in configuration, trying legacy option\n"));
ret = confdb_get_string(cdb, memctx, conf_path,
@@ -201,17 +202,18 @@ errno_t krb5_try_kdcip(TALLOC_CTX *memctx, struct confdb_ctx *cdb,
if (krb5_servers != NULL)
{
- ret = dp_opt_set_string(opts, KRB5_KDC, krb5_servers);
+ ret = dp_opt_set_string(opts, opt_id, krb5_servers);
if (ret != EOK) {
DEBUG(1, ("dp_opt_set_string failed.\n"));
talloc_free(krb5_servers);
return ret;
}
- DEBUG(9, ("Set krb5 server [%s] based on legacy krb5_kdcip option\n"));
+ DEBUG(9, ("Set krb5 server [%s] based on legacy krb5_kdcip option\n",
+ krb5_servers));
DEBUG(0, ("Your configuration uses the deprecated option 'krb5_kdcip' "
"to specify the KDC. Please change the configuration to use "
- "the 'krb5_server' option instead."));
+ "the 'krb5_server' option instead.\n"));
}
}
@@ -239,7 +241,7 @@ errno_t krb5_get_options(TALLOC_CTX *memctx, struct confdb_ctx *cdb,
/* If there is no KDC, try the deprecated krb5_kdcip option, too */
/* FIXME - this can be removed in a future version */
- ret = krb5_try_kdcip(memctx, cdb, conf_path, opts);
+ ret = krb5_try_kdcip(memctx, cdb, conf_path, opts, KRB5_KDC);
if (ret != EOK) {
DEBUG(1, ("sss_krb5_try_kdcip failed.\n"));
goto done;