Clean up some ldap #define's
authorZhanna Tsitkov <tsitkova@mit.edu>
Wed, 10 Aug 2011 17:10:37 +0000 (17:10 +0000)
committerZhanna Tsitkov <tsitkova@mit.edu>
Wed, 10 Aug 2011 17:10:37 +0000 (17:10 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25092 dc483132-0cff-0310-8789-dd5450dbe970

src/include/k5-int.h
src/plugins/kdb/ldap/ldap_util/kdb5_ldap_realm.c
src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h
src/plugins/kdb/ldap/libkdb_ldap/ldap_create.c
src/plugins/kdb/ldap/libkdb_ldap/ldap_krbcontainer.c
src/plugins/kdb/ldap/libkdb_ldap/ldap_misc.c

index 2ca649ee7409ba293eb4b9ea253bad7ea0b6ed5d..42c0e088d305dd38450dce2821d28f57034c32b1 100644 (file)
@@ -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"
index fcc1ebdb9f7f8942e997f14e3d4ba754273e62c6..72b4f7e654fe2aeb54b91f581734e79a745c08e8 100644 (file)
@@ -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;
             }
index 27eb3cbfac3daad7f2b38dcd6e8061fc309f79b3..1f45b6c9c60544856c902a9bc422e60df6f71b2e 100644 (file)
@@ -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
index 24b442d8fc4efeca928b3fe5cd2bf80b7175ef26..bfe866792b8a6ca84ada0c65e139a80edc2ae02b 100644 (file)
@@ -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;
             }
index 25d5ad4f479c068a67c765ef64bcdaf73fc5d3ea..b52ba799b8557342663f75f4278ad765188c4a39 100644 (file)
@@ -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 "
index 4500bb69c78b8f79253d099f5717f6fdc4aa978a..6719d403bbc77bdd5acf7cd22f37d2d915ea07d0 100644 (file)
@@ -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,