summaryrefslogtreecommitdiffstats
path: root/src/util/sss_krb5.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2013-08-21 12:44:47 -0400
committerJakub Hrozek <jhrozek@redhat.com>2013-08-22 19:29:08 +0200
commit8340ca480e0fe823441633720d67efc9e4a4bc64 (patch)
tree0913f1a34803b2684c8adfa207c6086f40991226 /src/util/sss_krb5.c
parent628f47f0faa5ce5dc0b3790b0dd2f987dddcab19 (diff)
downloadsssd-8340ca480e0fe823441633720d67efc9e4a4bc64.tar.gz
sssd-8340ca480e0fe823441633720d67efc9e4a4bc64.tar.xz
sssd-8340ca480e0fe823441633720d67efc9e4a4bc64.zip
KRB5: Add new #define for collection cache types
Kerberos now supports multiple types of collection caches, not just DIR: caches. We should add a macro for generic collection behavior and use that where appropriate.
Diffstat (limited to 'src/util/sss_krb5.c')
-rw-r--r--src/util/sss_krb5.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index b871b13c3..77234b989 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -939,12 +939,12 @@ sss_krb5_get_type(const char *full_location)
sizeof(SSS_KRB5_FILE)-1) == 0) {
return SSS_KRB5_TYPE_FILE;
}
-#ifdef HAVE_KRB5_DIRCACHE
+#ifdef HAVE_KRB5_CC_COLLECTION
else if (strncmp(full_location, SSS_KRB5_DIR,
sizeof(SSS_KRB5_DIR)-1) == 0) {
return SSS_KRB5_TYPE_DIR;
}
-#endif /* HAVE_KRB5_DIRCACHE */
+#endif /* HAVE_KRB5_CC_COLLECTION */
else if (full_location[0] == '/') {
return SSS_KRB5_TYPE_FILE;
}
@@ -968,11 +968,11 @@ sss_krb5_residual_by_type(const char *full_location,
offset = sizeof(SSS_KRB5_FILE)-1;
}
break;
-#ifdef HAVE_KRB5_DIRCACHE
+#ifdef HAVE_KRB5_CC_COLLECTION
case SSS_KRB5_TYPE_DIR:
offset = sizeof(SSS_KRB5_DIR)-1;
break;
-#endif /* HAVE_KRB5_DIRCACHE */
+#endif /* HAVE_KRB5_CC_COLLECTION */
default:
return NULL;
}
@@ -992,14 +992,14 @@ sss_krb5_cc_file_path(const char *full_location)
switch(cc_type) {
case SSS_KRB5_TYPE_FILE:
return residual;
-#ifdef HAVE_KRB5_DIRCACHE
+#ifdef HAVE_KRB5_CC_COLLECTION
case SSS_KRB5_TYPE_DIR:
/* DIR::/run/user/tkt_foo */
if (residual[0] == ':') {
++residual;
}
return residual;
-#endif
+#endif /* HAVE_KRB5_CC_COLLECTION */
case SSS_KRB5_TYPE_UNKNOWN:
break;
}
@@ -1185,7 +1185,7 @@ char * sss_get_ccache_name_for_principal(TALLOC_CTX *mem_ctx,
krb5_principal principal,
const char *location)
{
-#ifdef HAVE_KRB5_DIRCACHE
+#ifdef HAVE_KRB5_CC_COLLECTION
krb5_error_code kerr;
krb5_ccache tmp_cc = NULL;
char *tmp_ccname = NULL;
@@ -1229,5 +1229,5 @@ done:
return ret_ccname;
#else
return NULL;
-#endif /* HAVE_KRB5_DIRCACHE */
+#endif /* HAVE_KRB5_CC_COLLECTION */
}