summaryrefslogtreecommitdiffstats
path: root/src/providers/krb5/krb5_init.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_init.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_init.c')
-rw-r--r--src/providers/krb5/krb5_init.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/providers/krb5/krb5_init.c b/src/providers/krb5/krb5_init.c
index 43cbc1bc7..4d2123815 100644
--- a/src/providers/krb5/krb5_init.c
+++ b/src/providers/krb5/krb5_init.c
@@ -53,6 +53,9 @@ int sssm_krb5_auth_init(struct be_ctx *bectx,
FILE *debug_filep;
const char *krb5_servers;
const char *krb5_realm;
+ const char *errstr;
+ int errval;
+ int errpos;
if (krb5_options == NULL) {
krb5_options = talloc_zero(bectx, struct krb5_options);
@@ -135,6 +138,15 @@ int sssm_krb5_auth_init(struct be_ctx *bectx,
fcntl(ctx->child_debug_fd, F_SETFD, v & ~FD_CLOEXEC);
}
+ ctx->illegal_path_re = pcre_compile2(ILLEGAL_PATH_PATTERN, 0,
+ &errval, &errstr, &errpos, NULL);
+ if (ctx->illegal_path_re == NULL) {
+ DEBUG(1, ("Invalid Regular Expression pattern at position %d. "
+ "(Error: %d [%s])\n", errpos, errval, errstr));
+ ret = EFAULT;
+ goto fail;
+ }
+
*ops = &krb5_auth_ops;
*pvt_auth_data = ctx;
return EOK;