diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2012-06-15 13:59:44 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-06-15 14:38:22 -0400 |
commit | 6ca87e797982061576885f944e2ccfaba9573897 (patch) | |
tree | 6128b84210a53f5f0f98feb8aba1d8056dffc8d7 /src/providers/krb5/krb5_child.c | |
parent | 7cc8729dec26c1fd5b06323237acc9ba2bdaaa17 (diff) | |
download | sssd-6ca87e797982061576885f944e2ccfaba9573897.tar.gz sssd-6ca87e797982061576885f944e2ccfaba9573897.tar.bz2 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/providers/krb5/krb5_child.c')
-rw-r--r-- | src/providers/krb5/krb5_child.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/providers/krb5/krb5_child.c b/src/providers/krb5/krb5_child.c index bfec956b..c434c97f 100644 --- a/src/providers/krb5/krb5_child.c +++ b/src/providers/krb5/krb5_child.c @@ -244,11 +244,13 @@ store_creds_in_ccache(krb5_context ctx, krb5_principal princ, goto done; } +#ifdef HAVE_KRB5_DIRCACHE kerr = krb5_cc_switch(ctx, cc); if (kerr != 0) { KRB5_CHILD_DEBUG(SSSDBG_OP_FAILURE, kerr); goto done; } +#endif /* HAVE_KRB5_DIRCACHE */ kerr = krb5_cc_close(ctx, cc); if (kerr != 0) { @@ -366,6 +368,8 @@ done: return kerr; } +#ifdef HAVE_KRB5_DIRCACHE + static errno_t create_ccdir(const char *dirname, uid_t uid, gid_t gid) { @@ -491,6 +495,8 @@ done: return kerr; } +#endif /* HAVE_KRB5_DIRCACHE */ + static krb5_error_code create_ccache(uid_t uid, gid_t gid, krb5_context ctx, krb5_principal princ, char *ccname, krb5_creds *creds) @@ -501,8 +507,10 @@ create_ccache(uid_t uid, gid_t gid, krb5_context ctx, switch (cctype) { case SSS_KRB5_TYPE_FILE: return create_ccache_file(ctx, princ, ccname, creds); +#ifdef HAVE_KRB5_DIRCACHE case SSS_KRB5_TYPE_DIR: return create_ccache_in_dir(uid, gid, ctx, princ, ccname, creds); +#endif /* HAVE_KRB5_DIRCACHE */ default: DEBUG(SSSDBG_CRIT_FAILURE, ("Unknown cache type\n")); return EINVAL; |