diff options
Diffstat (limited to 'src/providers/krb5')
-rw-r--r-- | src/providers/krb5/krb5_auth.c | 4 | ||||
-rw-r--r-- | src/providers/krb5/krb5_utils.c | 16 | ||||
-rw-r--r-- | src/providers/krb5/krb5_utils.h | 2 |
3 files changed, 17 insertions, 5 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c index 6aaf7fbe..66cee473 100644 --- a/src/providers/krb5/krb5_auth.c +++ b/src/providers/krb5/krb5_auth.c @@ -626,7 +626,9 @@ static void krb5_find_ccache_step(struct tevent_req *req) kr->ccname = expand_ccname_template(kr, kr, dp_opt_get_cstring(kr->krb5_ctx->opts, KRB5_CCNAME_TMPL), - true, &private_path); + true, + state->be_ctx->domain->case_sensitive, + &private_path); if (kr->ccname == NULL) { DEBUG(1, ("expand_ccname_template failed.\n")); ret = ENOMEM; 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")); diff --git a/src/providers/krb5/krb5_utils.h b/src/providers/krb5/krb5_utils.h index 8977e14f..7cc57d42 100644 --- a/src/providers/krb5/krb5_utils.h +++ b/src/providers/krb5/krb5_utils.h @@ -33,7 +33,7 @@ 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); errno_t become_user(uid_t uid, gid_t gid); |