krb5 commit: Rename ccache configuration macros

Zhanna A Tsitkova tsitkova at MIT.EDU
Wed Jan 9 12:19:55 EST 2013


https://github.com/krb5/krb5/commit/941e26f9eb76471159e0a024aeac63f1b6e6ea45
commit 941e26f9eb76471159e0a024aeac63f1b6e6ea45
Author: Zhanna Tsitkov <tsitkova at mit.edu>
Date:   Wed Jan 9 12:03:13 2013 -0500

    Rename ccache configuration macros
    
    KRB5_CONF_ prefix should be used for the krb5/kdc.conf parameters.
    Use KRB5_CC_CONF_ prefix for cache configuration variables.

 src/include/k5-int.h               |   10 +++++-----
 src/lib/gssapi/krb5/acquire_cred.c |   10 +++++-----
 src/lib/gssapi/krb5/s4u_gss_glue.c |    2 +-
 src/lib/krb5/krb/fast.c            |    2 +-
 src/lib/krb5/krb/get_in_tkt.c      |   10 +++++-----
 src/tests/gssapi/ccrefresh.c       |    8 ++++----
 6 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 1f644ef..fef1ddb 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -278,11 +278,11 @@ typedef INT64_TYPE krb5_int64;
 #define KRB5_CONF_ASTERISK                    "*"
 
 /* Cache configuration variables */
-#define KRB5_CONF_FAST_AVAIL                  "fast_avail"
-#define KRB5_CONF_PROXY_IMPERSONATOR          "proxy_impersonator"
-#define KRB5_CONF_REFRESH_TIME                "refresh_time"
-#define KRB5_CONF_PA_TYPE                     "pa_type"
-#define KRB5_CONF_PA_CONFIG_DATA              "pa_config_data"
+#define KRB5_CC_CONF_FAST_AVAIL                  "fast_avail"
+#define KRB5_CC_CONF_PROXY_IMPERSONATOR          "proxy_impersonator"
+#define KRB5_CC_CONF_REFRESH_TIME                "refresh_time"
+#define KRB5_CC_CONF_PA_TYPE                     "pa_type"
+#define KRB5_CC_CONF_PA_CONFIG_DATA              "pa_config_data"
 
 /* Error codes used in KRB_ERROR protocol messages.
    Return values of library routines are based on a different error table
diff --git a/src/lib/gssapi/krb5/acquire_cred.c b/src/lib/gssapi/krb5/acquire_cred.c
index 258ec74..4d499e4 100644
--- a/src/lib/gssapi/krb5/acquire_cred.c
+++ b/src/lib/gssapi/krb5/acquire_cred.c
@@ -310,8 +310,8 @@ scan_cc_config(krb5_context context, krb5_gss_cred_id_rec *cred,
 
     if (config_princ->length != 2)
         return 0;
-    if (data_eq_string(config_princ->data[1], KRB5_CONF_PROXY_IMPERSONATOR) &&
-        cred->impersonator == NULL) {
+    if (data_eq_string(config_princ->data[1], KRB5_CC_CONF_PROXY_IMPERSONATOR)
+        && cred->impersonator == NULL) {
         code = krb5int_copy_data_contents_add0(context, value, &data0);
         if (code)
             return code;
@@ -319,8 +319,8 @@ scan_cc_config(krb5_context context, krb5_gss_cred_id_rec *cred,
         krb5_free_data_contents(context, &data0);
         if (code)
             return code;
-    } else if (data_eq_string(config_princ->data[1], KRB5_CONF_REFRESH_TIME) &&
-               cred->refresh_time == 0) {
+    } else if (data_eq_string(config_princ->data[1], KRB5_CC_CONF_REFRESH_TIME)
+               && cred->refresh_time == 0) {
         code = krb5int_copy_data_contents_add0(context, value, &data0);
         if (code)
             return code;
@@ -539,7 +539,7 @@ set_refresh_time(krb5_context context, krb5_ccache ccache,
 
     snprintf(buf, sizeof(buf), "%ld", (long)refresh_time);
     d = string2data(buf);
-    (void)krb5_cc_set_config(context, ccache, NULL, KRB5_CONF_REFRESH_TIME,
+    (void)krb5_cc_set_config(context, ccache, NULL, KRB5_CC_CONF_REFRESH_TIME,
                              &d);
     krb5_clear_error_message(context);
 }
diff --git a/src/lib/gssapi/krb5/s4u_gss_glue.c b/src/lib/gssapi/krb5/s4u_gss_glue.c
index 79d83ee..a7e720b 100644
--- a/src/lib/gssapi/krb5/s4u_gss_glue.c
+++ b/src/lib/gssapi/krb5/s4u_gss_glue.c
@@ -193,7 +193,7 @@ make_proxy_cred(krb5_context context, krb5_gss_cred_id_t cred,
 
     data = string2data(str);
     code = krb5_cc_set_config(context, cred->ccache, NULL,
-                              KRB5_CONF_PROXY_IMPERSONATOR, &data);
+                              KRB5_CC_CONF_PROXY_IMPERSONATOR, &data);
     krb5_free_unparsed_name(context, str);
     if (code)
         return code;
diff --git a/src/lib/krb5/krb/fast.c b/src/lib/krb5/krb/fast.c
index 612fffd..5e37b45 100644
--- a/src/lib/krb5/krb/fast.c
+++ b/src/lib/krb5/krb/fast.c
@@ -193,7 +193,7 @@ krb5int_fast_as_armor(krb5_context context,
             krb5_data config_data;
             config_data.data = NULL;
             retval = krb5_cc_get_config(context, ccache, target_principal,
-                                        KRB5_CONF_FAST_AVAIL, &config_data);
+                                        KRB5_CC_CONF_FAST_AVAIL, &config_data);
             if ((retval == 0) && config_data.data) {
                 TRACE_FAST_CCACHE_CONFIG(context);
                 state->fast_state_flags |= KRB5INT_FAST_DO_FAST;
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index 462ec22..df1bacf 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -1088,7 +1088,7 @@ read_allowed_preauth_type(krb5_context context, krb5_init_creds_context ctx)
     memset(&config, 0, sizeof(config));
     if (krb5_cc_get_config(context, ctx->opte->opt_private->in_ccache,
                            ctx->request->server,
-                           KRB5_CONF_PA_TYPE, &config) != 0)
+                           KRB5_CC_CONF_PA_TYPE, &config) != 0)
         return;
     tmp = malloc(config.length + 1);
     if (tmp == NULL) {
@@ -1118,7 +1118,7 @@ save_selected_preauth_type(krb5_context context, krb5_ccache ccache,
         return ENOMEM;
     config_data = string2data(tmp);
     code = krb5_cc_set_config(context, ccache, ctx->cred.server,
-                              KRB5_CONF_PA_TYPE, &config_data);
+                              KRB5_CC_CONF_PA_TYPE, &config_data);
     free(tmp);
     return code;
 }
@@ -1152,7 +1152,7 @@ read_cc_config_in_data(krb5_context context, krb5_init_creds_context ctx)
     memset(&config, 0, sizeof(config));
     code = krb5_cc_get_config(context, ctx->opte->opt_private->in_ccache,
                               ctx->request->server,
-                              KRB5_CONF_PA_CONFIG_DATA, &config);
+                              KRB5_CC_CONF_PA_CONFIG_DATA, &config);
     if (code)
         return code;
 
@@ -1190,7 +1190,7 @@ save_cc_config_out_data(krb5_context context, krb5_ccache ccache,
         return ENOMEM;
     config = string2data(encoded);
     code = krb5_cc_set_config(context, ccache, ctx->cred.server,
-                              KRB5_CONF_PA_CONFIG_DATA, &config);
+                              KRB5_CC_CONF_PA_CONFIG_DATA, &config);
     free(encoded);
     return code;
 }
@@ -1600,7 +1600,7 @@ init_creds_step_reply(krb5_context context,
             config_data.data = "yes";
             config_data.length = strlen(config_data.data);
             code = krb5_cc_set_config(context, out_ccache, ctx->cred.server,
-                                      KRB5_CONF_FAST_AVAIL, &config_data);
+                                      KRB5_CC_CONF_FAST_AVAIL, &config_data);
             if (code != 0)
                 goto cc_cleanup;
         }
diff --git a/src/tests/gssapi/ccrefresh.c b/src/tests/gssapi/ccrefresh.c
index bff299e..e1f04ed 100644
--- a/src/tests/gssapi/ccrefresh.c
+++ b/src/tests/gssapi/ccrefresh.c
@@ -66,11 +66,11 @@ main(int argc, char **argv)
     check(krb5_cc_resolve(context, ccname, &ccache));
     if (value != NULL) {
         d = string2data((char *)value);
-        check(krb5_cc_set_config(context, ccache, NULL, KRB5_CONF_REFRESH_TIME,
-                                 &d));
+        check(krb5_cc_set_config(context, ccache, NULL,
+                                 KRB5_CC_CONF_REFRESH_TIME, &d));
     } else {
-        check(krb5_cc_get_config(context, ccache, NULL, KRB5_CONF_REFRESH_TIME,
-                                 &d));
+        check(krb5_cc_get_config(context, ccache, NULL,
+                                 KRB5_CC_CONF_REFRESH_TIME, &d));
         printf("%.*s\n", (int)d.length, d.data);
         krb5_free_data_contents(context, &d);
     }


More information about the cvs-krb5 mailing list