summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-09-03 20:57:58 -0400
committerSimo Sorce <simo@redhat.com>2013-09-09 15:11:46 -0400
commit077fa994f62641a13665b6a07d38b3d5a903dcdc (patch)
treeb226331afdcea166a6809403b6528a253d665e5c /src/util
parenta6a0d4edebccd3cf04f9813fc65185845626b5d4 (diff)
downloadsssd-077fa994f62641a13665b6a07d38b3d5a903dcdc.tar.gz
sssd-077fa994f62641a13665b6a07d38b3d5a903dcdc.tar.bz2
sssd-077fa994f62641a13665b6a07d38b3d5a903dcdc.zip
krb5: Remove unused helper functions
these functions are not needed anymore. Related: https://fedorahosted.org/sssd/ticket/2061
Diffstat (limited to 'src/util')
-rw-r--r--src/util/sss_krb5.c80
-rw-r--r--src/util/sss_krb5.h8
2 files changed, 0 insertions, 88 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index d4fee42a..f8a7e6f9 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -854,86 +854,6 @@ sss_krb5_free_keytab_entry_contents(krb5_context context,
}
#endif
-#define SSS_KRB5_FILE "FILE:"
-#define SSS_KRB5_DIR "DIR:"
-#define SSS_KRB5_KEYRING "KEYRING:"
-
-enum sss_krb5_cc_type
-sss_krb5_get_type(const char *full_location)
-{
- if (!full_location) {
- return SSS_KRB5_TYPE_UNKNOWN;
- }
-
- if (strncmp(full_location, SSS_KRB5_FILE,
- sizeof(SSS_KRB5_FILE)-1) == 0) {
- return SSS_KRB5_TYPE_FILE;
- }
-#ifdef HAVE_KRB5_CC_COLLECTION
- else if (strncmp(full_location, SSS_KRB5_DIR,
- sizeof(SSS_KRB5_DIR)-1) == 0) {
- return SSS_KRB5_TYPE_DIR;
- }
- else if (strncmp(full_location, SSS_KRB5_KEYRING,
- sizeof(SSS_KRB5_KEYRING)-1) == 0) {
- return SSS_KRB5_TYPE_KEYRING;
- }
-#endif /* HAVE_KRB5_CC_COLLECTION */
-
- else if (full_location[0] == '/') {
- return SSS_KRB5_TYPE_FILE;
- }
-
- return SSS_KRB5_TYPE_UNKNOWN;
-}
-
-const char *
-sss_krb5_residual_by_type(const char *full_location,
- enum sss_krb5_cc_type type)
-{
- size_t offset;
-
- if (full_location == NULL) return NULL;
-
- switch (type) {
- case SSS_KRB5_TYPE_FILE:
- if (full_location[0] == '/') {
- offset = 0;
- } else {
- offset = sizeof(SSS_KRB5_FILE)-1;
- }
- break;
-#ifdef HAVE_KRB5_CC_COLLECTION
- case SSS_KRB5_TYPE_DIR:
- offset = sizeof(SSS_KRB5_DIR)-1;
- break;
-
- case SSS_KRB5_TYPE_KEYRING:
- offset = sizeof(SSS_KRB5_KEYRING)-1;
- break;
-#endif /* HAVE_KRB5_CC_COLLECTION */
-
- default:
- return NULL;
- }
-
- return full_location + offset;
-}
-
-const char *
-sss_krb5_residual_check_type(const char *full_location,
- enum sss_krb5_cc_type expected_type)
-{
- enum sss_krb5_cc_type type;
-
- type = sss_krb5_get_type(full_location);
- if (type != expected_type) {
- DEBUG(SSSDBG_OP_FAILURE, ("Unexpected ccache type\n"));
- return NULL;
- }
-
- return sss_krb5_residual_by_type(full_location, type);
-}
#ifdef HAVE_KRB5_SET_TRACE_CALLBACK
diff --git a/src/util/sss_krb5.h b/src/util/sss_krb5.h
index efde48b6..db47e0a6 100644
--- a/src/util/sss_krb5.h
+++ b/src/util/sss_krb5.h
@@ -149,14 +149,6 @@ enum sss_krb5_cc_type {
SSS_KRB5_TYPE_UNKNOWN
};
-enum sss_krb5_cc_type
-sss_krb5_get_type(const char *full_location);
-const char *
-sss_krb5_residual_by_type(const char *full_location, enum sss_krb5_cc_type type);
-const char *
-sss_krb5_residual_check_type(const char *full_location,
- enum sss_krb5_cc_type expected_type);
-
/* === Compatibility routines for the Heimdal Kerberos implementation === */
void sss_krb5_princ_realm(krb5_context context, krb5_const_principal princ,