summaryrefslogtreecommitdiffstats
path: root/src/util/sss_krb5.c
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/util/sss_krb5.c
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/util/sss_krb5.c')
-rw-r--r--src/util/sss_krb5.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index 8a6bfe2dc..6cbf8c61a 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -1121,10 +1121,14 @@ sss_krb5_get_type(const char *full_location)
if (strncmp(full_location, SSS_KRB5_FILE,
sizeof(SSS_KRB5_FILE)-1) == 0) {
return SSS_KRB5_TYPE_FILE;
- } else if (strncmp(full_location, SSS_KRB5_DIR,
+ }
+#ifdef HAVE_KRB5_DIRCACHE
+ else if (strncmp(full_location, SSS_KRB5_DIR,
sizeof(SSS_KRB5_DIR)-1) == 0) {
return SSS_KRB5_TYPE_DIR;
- } else if (full_location[0] == '/') {
+ }
+#endif /* HAVE_KRB5_DIRCACHE */
+ else if (full_location[0] == '/') {
return SSS_KRB5_TYPE_FILE;
}
@@ -1147,9 +1151,11 @@ sss_krb5_residual_by_type(const char *full_location,
offset = sizeof(SSS_KRB5_FILE)-1;
}
break;
+#ifdef HAVE_KRB5_DIRCACHE
case SSS_KRB5_TYPE_DIR:
offset = sizeof(SSS_KRB5_DIR)-1;
break;
+#endif /* HAVE_KRB5_DIRCACHE */
default:
return NULL;
}
@@ -1169,9 +1175,11 @@ sss_krb5_cc_file_path(const char *full_location)
switch(cc_type) {
case SSS_KRB5_TYPE_FILE:
return residual;
+#ifdef HAVE_KRB5_DIRCACHE
case SSS_KRB5_TYPE_DIR:
/* DIR::/run/user/tkt_foo */
if (residual[0] == ':') return residual+1;
+#endif
case SSS_KRB5_TYPE_UNKNOWN:
break;
}