summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5/krb5_auth.c
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2010-02-23 09:43:51 +0100
committerStephen Gallagher <sgallagh@redhat.com>2010-03-11 09:22:41 -0500
commit29752834fbf3a19e4e117668abfce4e4c7c48ee4 (patch)
treea39de5ce10404f2c8397a587db535c6ae795a8c7 /src/providers/krb5/krb5_auth.c
parent3ea37e96974387d57593dfb1010ee6974c7d9e1e (diff)
downloadsssd-29752834fbf3a19e4e117668abfce4e4c7c48ee4.tar.gz
sssd-29752834fbf3a19e4e117668abfce4e4c7c48ee4.tar.xz
sssd-29752834fbf3a19e4e117668abfce4e4c7c48ee4.zip
Add expandable sequences to krb5_ccachedir
As with krb5_ccname_template sequences like %u can be used in the krb5_ccachedir parameter which are expanded at runtime. If the directory does not exist, it will be created. Depending on the used sequences it is created as a public or private directory.
Diffstat (limited to 'src/providers/krb5/krb5_auth.c')
-rw-r--r--src/providers/krb5/krb5_auth.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index 5be42a81..b8b498a0 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -881,6 +881,7 @@ static void krb5_resolve_done(struct tevent_req *req)
struct be_req *be_req = kr->req;
char *msg;
size_t offset = 0;
+ bool private_path = false;
ret = be_resolve_server_recv(req, &kr->srv);
talloc_zfree(req);
@@ -916,12 +917,20 @@ static void krb5_resolve_done(struct tevent_req *req)
}
kr->ccname = expand_ccname_template(kr, kr,
dp_opt_get_cstring(kr->krb5_ctx->opts,
- KRB5_CCNAME_TMPL)
- );
+ KRB5_CCNAME_TMPL),
+ true, &private_path);
if (kr->ccname == NULL) {
DEBUG(1, ("expand_ccname_template failed.\n"));
goto done;
}
+
+ ret = create_ccache_dir(kr, kr->ccname,
+ kr->krb5_ctx->illegal_path_re,
+ kr->uid, kr->gid, private_path);
+ if (ret != EOK) {
+ DEBUG(1, ("create_ccache_dir failed.\n"));
+ goto done;
+ }
}
if (be_is_offline(be_req->be_ctx)) {