summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-06-14 21:18:10 +0200
committerStephen Gallagher <sgallagh@redhat.com>2012-06-14 15:52:29 -0400
commitbc9235cfb80bd64a3bfa959e8d26d5ad1be0bdf4 (patch)
treefd5d852a84b5d443e4bc9f816b0df5ef3fe6a80b
parent95cc3f4be93d3cb5bb28bb3787f0aace4edb3124 (diff)
downloadsssd-bc9235cfb80bd64a3bfa959e8d26d5ad1be0bdf4.tar.gz
sssd-bc9235cfb80bd64a3bfa959e8d26d5ad1be0bdf4.tar.bz2
sssd-bc9235cfb80bd64a3bfa959e8d26d5ad1be0bdf4.zip
Make krb5_ccname_template and krb5_ccachedir configurable
-rw-r--r--configure.ac2
-rw-r--r--contrib/sssd.spec.in5
-rw-r--r--src/conf_macros.m430
-rw-r--r--src/providers/ipa/ipa_opts.h4
-rw-r--r--src/providers/krb5/krb5_opts.h4
5 files changed, 41 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index d4647d8a..f43c32ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,8 @@ WITH_LOG_PATH
WITH_PUBCONF_PATH
WITH_PIPE_PATH
WITH_MCACHE_PATH
+WITH_DEFAULT_CCACHE_DIR
+WITH_DEFAULT_CCNAME_TEMPLATE
WITH_INIT_DIR
WITH_TEST_DIR
WITH_MANPAGES
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 8d7a8d5a..871fbda4 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -19,6 +19,10 @@
%define __provides_exclude_from %{python_sitearch}/.*\.so$
%endif
+%if (0%{?fedora} >= 17)
+ %global with_ccache --with-default-ccache-dir='/run/user/%U' --with-default-ccname-template="DIR:%d/ccdir"
+%endif
+
%global enable_experimental 1
%if (0%{?enable_experimental} == 1)
@@ -233,6 +237,7 @@ autoreconf -ivf
--disable-static \
--disable-rpath \
%{with_unicode_lib} \
+ %{with_ccache} \
%{experimental}
make %{?_smp_mflags} all
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index 8c13e5db..2e98b84c 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -247,6 +247,36 @@ AC_DEFUN([WITH_KRB5_RCACHE_DIR],
AC_DEFINE_UNQUOTED(KRB5_RCACHE_DIR, "$krb5rcachedir", [Directory used for storing Kerberos replay caches])
])
+AC_DEFUN([WITH_DEFAULT_CCACHE_DIR],
+ [ AC_ARG_WITH([default-ccache-dir],
+ [AC_HELP_STRING([--with-default-ccache-dir=CCACHEDIR],
+ [The default value of krb5_ccachedir [/tmp]]
+ )
+ ]
+ )
+ config_def_ccache_dir="/tmp"
+ if test x"$with_default_ccache_dir" != x; then
+ config_def_ccache_dir=$with_default_ccache_dir
+ fi
+ AC_SUBST(config_def_ccache_dir)
+ AC_DEFINE_UNQUOTED(DEFAULT_CCACHE_DIR, "$config_def_ccache_dir", [The default value of krb5_ccachedir])
+ ])
+
+AC_DEFUN([WITH_DEFAULT_CCNAME_TEMPLATE],
+ [ AC_ARG_WITH([default-ccname-template],
+ [AC_HELP_STRING([--with-default-ccname-template=CCACHE],
+ [The default value of krb5_ccname_template [FILE:%d/krb5cc_%U_XXXXXX]]
+ )
+ ]
+ )
+ config_def_ccname_template="FILE:%d/krb5cc_%U_XXXXXX"
+ if test x"$with_default_ccname_template" != x; then
+ config_def_ccname_template=$with_default_ccname_template
+ fi
+ AC_SUBST(config_def_ccname_template)
+ AC_DEFINE_UNQUOTED(DEFAULT_CCNAME_TEMPLATE, "$config_def_ccname_template", [The default value of krb5_ccname_template])
+ ])
+
AC_DEFUN([WITH_PYTHON_BINDINGS],
[ AC_ARG_WITH([python-bindings],
[AC_HELP_STRING([--with-python-bindings],
diff --git a/src/providers/ipa/ipa_opts.h b/src/providers/ipa/ipa_opts.h
index a0714cb4..4366a12c 100644
--- a/src/providers/ipa/ipa_opts.h
+++ b/src/providers/ipa/ipa_opts.h
@@ -234,8 +234,8 @@ struct sdap_attr_map ipa_selinux_user_map[] = {
struct dp_option ipa_def_krb5_opts[] = {
{ "krb5_server", DP_OPT_STRING, NULL_STRING, NULL_STRING },
{ "krb5_realm", DP_OPT_STRING, NULL_STRING, NULL_STRING },
- { "krb5_ccachedir", DP_OPT_STRING, { "/tmp" }, NULL_STRING },
- { "krb5_ccname_template", DP_OPT_STRING, { "FILE:%d/krb5cc_%U_XXXXXX" }, NULL_STRING},
+ { "krb5_ccachedir", DP_OPT_STRING, { DEFAULT_CCACHE_DIR }, NULL_STRING },
+ { "krb5_ccname_template", DP_OPT_STRING, { DEFAULT_CCNAME_TEMPLATE }, NULL_STRING},
{ "krb5_auth_timeout", DP_OPT_NUMBER, { .number = 15 }, NULL_NUMBER },
{ "krb5_keytab", DP_OPT_STRING, { "/etc/krb5.keytab" }, NULL_STRING },
{ "krb5_validate", DP_OPT_BOOL, BOOL_TRUE, BOOL_TRUE },
diff --git a/src/providers/krb5/krb5_opts.h b/src/providers/krb5/krb5_opts.h
index 45dfec54..9de93b0c 100644
--- a/src/providers/krb5/krb5_opts.h
+++ b/src/providers/krb5/krb5_opts.h
@@ -28,8 +28,8 @@
struct dp_option default_krb5_opts[] = {
{ "krb5_server", DP_OPT_STRING, NULL_STRING, NULL_STRING },
{ "krb5_realm", DP_OPT_STRING, NULL_STRING, NULL_STRING },
- { "krb5_ccachedir", DP_OPT_STRING, { "/run/user/%u" }, NULL_STRING },
- { "krb5_ccname_template", DP_OPT_STRING, { "DIR:%d" }, NULL_STRING},
+ { "krb5_ccachedir", DP_OPT_STRING, { DEFAULT_CCACHE_DIR }, NULL_STRING },
+ { "krb5_ccname_template", DP_OPT_STRING, { DEFAULT_CCNAME_TEMPLATE }, NULL_STRING},
{ "krb5_auth_timeout", DP_OPT_NUMBER, { .number = 15 }, NULL_NUMBER },
{ "krb5_keytab", DP_OPT_STRING, { "/etc/krb5.keytab" }, NULL_STRING },
{ "krb5_validate", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE },