diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2011-12-21 19:17:42 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-12-21 14:47:41 -0500 |
commit | 85ecf49fdacd910f804caab1be7bf68d23702dc9 (patch) | |
tree | f2a3dcd490ce79c01c2800d46108f4b4cc81be8e /src/providers/krb5/krb5_utils.c | |
parent | 65b813f8bb176d5db33cb486e1cc1bcd6dd8f1cc (diff) | |
download | sssd_unused-85ecf49fdacd910f804caab1be7bf68d23702dc9.tar.gz sssd_unused-85ecf49fdacd910f804caab1be7bf68d23702dc9.tar.xz sssd_unused-85ecf49fdacd910f804caab1be7bf68d23702dc9.zip |
Honor case sensitive flag when creating the ccname template
Diffstat (limited to 'src/providers/krb5/krb5_utils.c')
-rw-r--r-- | src/providers/krb5/krb5_utils.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/providers/krb5/krb5_utils.c b/src/providers/krb5/krb5_utils.c index 7fb0c8b3..2957598c 100644 --- a/src/providers/krb5/krb5_utils.c +++ b/src/providers/krb5/krb5_utils.c @@ -30,13 +30,14 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct krb5child_req *kr, const char *template, bool file_mode, - bool *private_path) + bool case_sensitive, bool *private_path) { char *copy; char *p; char *n; char *result = NULL; char *dummy; + char *name; char *res = NULL; const char *cache_dir_tmpl; TALLOC_CTX *tmp_ctx = NULL; @@ -79,8 +80,16 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct krb5child_req *kr, "because user name is empty.\n")); goto done; } + name = sss_get_cased_name(tmp_ctx, kr->pd->user, + case_sensitive); + if (!name) { + DEBUG(SSSDBG_CRIT_FAILURE, + ("sss_get_cased_name failed\n")); + goto done; + } + result = talloc_asprintf_append(result, "%s%s", p, - kr->pd->user); + name); if (!file_mode) *private_path = true; break; case 'U': @@ -132,7 +141,8 @@ char *expand_ccname_template(TALLOC_CTX *mem_ctx, struct krb5child_req *kr, } dummy = expand_ccname_template(tmp_ctx, kr, cache_dir_tmpl, - false, private_path); + false, case_sensitive, + private_path); if (dummy == NULL) { DEBUG(1, ("Expanding credential cache directory " "template failed.\n")); |