summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-06-15 13:59:44 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-06-15 14:38:22 -0400
commit6ca87e797982061576885f944e2ccfaba9573897 (patch)
tree6128b84210a53f5f0f98feb8aba1d8056dffc8d7 /src/tests
parent7cc8729dec26c1fd5b06323237acc9ba2bdaaa17 (diff)
downloadsssd-6ca87e797982061576885f944e2ccfaba9573897.tar.gz
sssd-6ca87e797982061576885f944e2ccfaba9573897.tar.xz
sssd-6ca87e797982061576885f944e2ccfaba9573897.zip
KRB5: Auto-detect DIR cache support in configure
We can't support the DIR cache features in systems with kerberos libraries older than 1.10. Make sure we don't build it on those systems.
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/krb5_child-test.c2
-rw-r--r--src/tests/krb5_utils-tests.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/krb5_child-test.c b/src/tests/krb5_child-test.c
index fa9374c2d..636f73363 100644
--- a/src/tests/krb5_child-test.c
+++ b/src/tests/krb5_child-test.c
@@ -260,9 +260,11 @@ create_dummy_req(TALLOC_CTX *mem_ctx, const char *user,
case SSS_KRB5_TYPE_FILE:
kr->krb5_ctx->cc_be = &file_cc;
break;
+#ifdef HAVE_KRB5_DIRCACHE
case SSS_KRB5_TYPE_DIR:
kr->krb5_ctx->cc_be = &dir_cc;
break;
+#endif /* HAVE_KRB5_DIRCACHE */
default:
if (tmpl[0] != '/') {
DEBUG(SSSDBG_OP_FAILURE, ("Unkown ccname database\n"));
diff --git a/src/tests/krb5_utils-tests.c b/src/tests/krb5_utils-tests.c
index bcd9acb19..581212997 100644
--- a/src/tests/krb5_utils-tests.c
+++ b/src/tests/krb5_utils-tests.c
@@ -357,6 +357,7 @@ START_TEST(test_illegal_patterns)
}
END_TEST
+#ifdef HAVE_KRB5_DIRCACHE
START_TEST(test_cc_dir_create)
{
char *residual;
@@ -405,6 +406,8 @@ START_TEST(test_cc_dir_create)
free(cwd);
}
END_TEST
+#endif /* HAVE_KRB5_DIRCACHE */
+
void setup_talloc_context(void)
{
@@ -694,7 +697,9 @@ Suite *krb5_utils_suite (void)
tcase_add_checked_fixture (tc_create_dir, setup_create_dir,
teardown_create_dir);
tcase_add_test (tc_create_dir, test_illegal_patterns);
+#ifdef HAVE_KRB5_DIRCACHE
tcase_add_test (tc_create_dir, test_cc_dir_create);
+#endif /* HAVE_KRB5_DIRCACHE */
if (getuid() == 0) {
tcase_add_test (tc_create_dir, test_priv_ccache_dir);
tcase_add_test (tc_create_dir, test_private_ccache_dir_in_user_dir);