From: Zhanna Tsitkov Date: Wed, 10 Aug 2011 17:10:37 +0000 (+0000) Subject: Clean up some ldap #define's X-Git-Tag: krb5-1.10-alpha1~283 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0352f592cc61cda42ed70eb49abd50a13523db92;p=krb5.git Clean up some ldap #define's git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25092 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 2ca649ee7..42c0e088d 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -238,12 +238,13 @@ typedef INT64_TYPE krb5_int64; #define KRB5_CONF_KEY_STASH_FILE "key_stash_file" #define KRB5_CONF_KPASSWD_PORT "kpasswd_port" #define KRB5_CONF_KPASSWD_SERVER "kpasswd_server" -#define KRB5_CONF_LDAP_KDC_DN "ldap_kdc_dn" +#define KRB5_CONF_LDAP_CONNS_PER_SERVER "ldap_conns_per_server" #define KRB5_CONF_LDAP_KADMIN_DN "ldap_kadmind_dn" -#define KRB5_CONF_LDAP_SERVICE_PASSWORD_FILE "ldap_service_password_file" -#define KRB5_CONF_LDAP_ROOT_CERTIFICATE_FILE "ldap_root_certificate_file" +#define KRB5_CONF_LDAP_KDC_DN "ldap_kdc_dn" +#define KRB5_CONF_LDAP_KERBEROS_CONTAINER_DN "ldap_kerberos_container_dn" +#define KRB5_CONF_LDAP_KPASSWDD_DN "ldap_kpasswdd_dn" #define KRB5_CONF_LDAP_SERVERS "ldap_servers" -#define KRB5_CONF_LDAP_CONNS_PER_SERVER "ldap_conns_per_server" +#define KRB5_CONF_LDAP_SERVICE_PASSWORD_FILE "ldap_service_password_file" #define KRB5_CONF_LIBDEFAULTS "libdefaults" #define KRB5_CONF_LOGGING "logging" #define KRB5_CONF_MASTER_KEY_NAME "master_key_name" diff --git a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c index fcc1ebdb9..72b4f7e65 100644 --- a/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c +++ b/src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c @@ -538,7 +538,7 @@ kdb5_ldap_create(int argc, char *argv[]) if (ldap_context->conf_section) { if ((retval=profile_get_string(util_context->profile, KDB_MODULE_SECTION, ldap_context->conf_section, - "ldap_kerberos_container_dn", NULL, + KRB5_CONF_LDAP_KERBEROS_CONTAINER_DN, NULL, &kparams.DN)) != 0) { goto cleanup; } @@ -546,7 +546,7 @@ kdb5_ldap_create(int argc, char *argv[]) if (kparams.DN == NULL) { if ((retval=profile_get_string(util_context->profile, KDB_MODULE_DEF_SECTION, - "ldap_kerberos_container_dn", NULL, + KRB5_CONF_LDAP_KERBEROS_CONTAINER_DN, NULL, NULL, &kparams.DN)) != 0) { goto cleanup; } diff --git a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h index 27eb3cbfa..1f45b6c9c 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h +++ b/src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h @@ -146,10 +146,6 @@ extern void prepend_err_str (krb5_context ctx, const char *s, krb5_error_code er #define UNSTORE16_INT(ptr, val) (val = load_16_be(ptr)) #define UNSTORE32_INT(ptr, val) (val = load_32_be(ptr)) -#define KRB5_CONF_KDC_BIND_DN "ldap_kdc_dn" -#define KRB5_CONF_ADMIN_BIND_DN "ldap_kadmind_dn" -#define KRB5_CONF_PWD_BIND_DN "ldap_passwd_dn" - #define KDB_TL_USER_INFO 0x7ffe #define KDB_TL_PRINCTYPE 0x01 diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c index 24b442d8f..bfe866792 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c @@ -258,7 +258,7 @@ krb5_ldap_create(krb5_context context, char *conf_section, char **db_args) if (ldap_context->conf_section) { if ((status = profile_get_string(context->profile, KDB_MODULE_SECTION, ldap_context->conf_section, - "ldap_kerberos_container_dn", NULL, + KRB5_CONF_LDAP_KERBEROS_CONTAINER_DN, NULL, &kparams.DN)) != 0) { goto cleanup; } @@ -266,7 +266,7 @@ krb5_ldap_create(krb5_context context, char *conf_section, char **db_args) if (kparams.DN == NULL) { if ((status = profile_get_string(context->profile, KDB_MODULE_DEF_SECTION, - "ldap_kerberos_container_dn", NULL, + KRB5_CONF_LDAP_KERBEROS_CONTAINER_DN, NULL, NULL, &kparams.DN)) != 0) { goto cleanup; } diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c index 25d5ad4f4..b52ba799b 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c @@ -91,7 +91,7 @@ krb5_ldap_read_krbcontainer_params(krb5_context context, /* read kerberos containter location from [dbmodules] section of krb5.conf file */ if (ldap_context->conf_section) { if ((st=profile_get_string(context->profile, KDB_MODULE_SECTION, ldap_context->conf_section, - "ldap_kerberos_container_dn", NULL, + KRB5_CONF_LDAP_KERBEROS_CONTAINER_DN, NULL, &cparams->DN)) != 0) { krb5_set_error_message(context, st, _("Error reading kerberos container " @@ -103,7 +103,7 @@ krb5_ldap_read_krbcontainer_params(krb5_context context, /* read kerberos containter location from [dbdefaults] section of krb5.conf file */ if (cparams->DN == NULL) { if ((st=profile_get_string(context->profile, KDB_MODULE_DEF_SECTION, - "ldap_kerberos_container_dn", NULL, + KRB5_CONF_LDAP_KERBEROS_CONTAINER_DN, NULL, NULL, &cparams->DN)) != 0) { krb5_set_error_message(context, st, _("Error reading kerberos container " diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c index 4500bb69c..6719d403b 100644 --- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c +++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c @@ -242,7 +242,7 @@ krb5_ldap_read_server_params(krb5_context context, char *conf_section, else if (srv_type == KRB5_KDB_SRV_TYPE_ADMIN) name = KRB5_CONF_LDAP_KADMIN_DN; else if (srv_type == KRB5_KDB_SRV_TYPE_PASSWD) - name = "ldap_kpasswdd_dn"; + name = KRB5_CONF_LDAP_KPASSWDD_DN; if (name) { st = prof_get_string_def (context, conf_section, name,