dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone

Blame SOURCES/0116-krb5_client-rename-krb5_set_canonicalize-to-set_cano.patch

2fc102
From 7dbdbb87a5660128b0bbac011c3684e13380f162 Mon Sep 17 00:00:00 2001
2fc102
From: Sumit Bose <sbose@redhat.com>
2fc102
Date: Fri, 21 Mar 2014 16:15:39 +0100
2fc102
Subject: [PATCH 116/117] krb5_client: rename krb5_set_canonicalize() to
2fc102
 set_canonicalize_option()
2fc102
2fc102
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
2fc102
---
2fc102
 src/providers/krb5/krb5_child.c | 32 ++++++++++++++++----------------
2fc102
 1 file changed, 16 insertions(+), 16 deletions(-)
2fc102
2fc102
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c
2fc102
index 7ea111e108e189c6839feec0f1108175c0291605..674dad7387c6874209ee5e491cefc18eba4a6da5 100644
2fc102
--- a/src/providers/krb5/krb5_child.c
2fc102
+++ b/src/providers/krb5/krb5_child.c
2fc102
@@ -116,6 +116,20 @@ static krb5_error_code set_lifetime_options(krb5_get_init_creds_opt *options)
2fc102
     return 0;
2fc102
 }
2fc102
 
2fc102
+static void set_canonicalize_option(krb5_get_init_creds_opt *opts)
2fc102
+{
2fc102
+    int canonicalize = 0;
2fc102
+    char *tmp_str;
2fc102
+
2fc102
+    tmp_str = getenv(SSSD_KRB5_CANONICALIZE);
2fc102
+    if (tmp_str != NULL && strcasecmp(tmp_str, "true") == 0) {
2fc102
+        canonicalize = 1;
2fc102
+    }
2fc102
+    DEBUG(SSSDBG_CONF_SETTINGS, ("%s is set to [%s]\n",
2fc102
+          SSSD_KRB5_CANONICALIZE, tmp_str ? tmp_str : "not set"));
2fc102
+    sss_krb5_get_init_creds_opt_set_canonicalize(opts, canonicalize);
2fc102
+}
2fc102
+
2fc102
 static void set_changepw_options(krb5_context ctx,
2fc102
                                  krb5_get_init_creds_opt *options)
2fc102
 {
2fc102
@@ -875,20 +889,6 @@ done:
2fc102
 
2fc102
 }
2fc102
 
2fc102
-static void krb5_set_canonicalize(krb5_get_init_creds_opt *opts)
2fc102
-{
2fc102
-    int canonicalize = 0;
2fc102
-    char *tmp_str;
2fc102
-
2fc102
-    tmp_str = getenv(SSSD_KRB5_CANONICALIZE);
2fc102
-    if (tmp_str != NULL && strcasecmp(tmp_str, "true") == 0) {
2fc102
-        canonicalize = 1;
2fc102
-    }
2fc102
-    DEBUG(SSSDBG_CONF_SETTINGS, ("%s is set to [%s]\n",
2fc102
-          SSSD_KRB5_CANONICALIZE, tmp_str ? tmp_str : "not set"));
2fc102
-    sss_krb5_get_init_creds_opt_set_canonicalize(opts, canonicalize);
2fc102
-}
2fc102
-
2fc102
 static krb5_error_code get_and_save_tgt_with_keytab(krb5_context ctx,
2fc102
                                                     krb5_principal princ,
2fc102
                                                     krb5_keytab keytab,
2fc102
@@ -904,7 +904,7 @@ static krb5_error_code get_and_save_tgt_with_keytab(krb5_context ctx,
2fc102
     krb5_get_init_creds_opt_set_address_list(&options, NULL);
2fc102
     krb5_get_init_creds_opt_set_forwardable(&options, 0);
2fc102
     krb5_get_init_creds_opt_set_proxiable(&options, 0);
2fc102
-    krb5_set_canonicalize(&options);
2fc102
+    set_canonicalize_option(&options);
2fc102
 
2fc102
     kerr = krb5_get_init_creds_keytab(ctx, &creds, princ, keytab, 0, NULL,
2fc102
                                       &options);
2fc102
@@ -1881,7 +1881,7 @@ static int k5c_setup(struct krb5_req *kr, uint32_t offline)
2fc102
     }
2fc102
 
2fc102
     if (!offline) {
2fc102
-        krb5_set_canonicalize(kr->options);
2fc102
+        set_canonicalize_option(kr->options);
2fc102
 
2fc102
         use_fast_str = getenv(SSSD_KRB5_USE_FAST);
2fc102
         if (use_fast_str == NULL || strcasecmp(use_fast_str, "never") == 0) {
2fc102
-- 
2fc102
1.8.5.3
2fc102