summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-03 18:58:31 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-06-03 13:04:06 +0200
commit6ac6b196e6ce329873df34e8fda8eacf40acb0dd (patch)
treee6528064e5ca50659895e5e8871767bf31aa6610 /lib
parentd42d4523ed0bddd2a34ac429bc8750712973996f (diff)
downloadsamba-6ac6b196e6ce329873df34e8fda8eacf40acb0dd.tar.gz
samba-6ac6b196e6ce329873df34e8fda8eacf40acb0dd.tar.bz2
samba-6ac6b196e6ce329873df34e8fda8eacf40acb0dd.zip
lib/krb5_wrap: Remove unused smb_krb5_get_creds
Found by callcatcher This has been unsused since commit 61f0b247633501d6bf4103ca8345048e537c043d Author: Günther Deschner <gd@samba.org> Date: Thu Nov 12 15:42:03 2009 +0100 s3-kerberos: remove smb_krb5_get_tkt_from_creds(). Now that cli_krb5_get_ticket() already handles S4U2SELF impersonation, remove smb_krb5_get_tkt_from_creds() which is not required anymore. Guenther Andrew Bartlett Autobuild-User: Andrew Bartlett <abartlet@samba.org> Autobuild-Date: Sun Jun 3 13:04:06 CEST 2012 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r--lib/krb5_wrap/krb5_samba.c120
-rw-r--r--lib/krb5_wrap/krb5_samba.h5
2 files changed, 0 insertions, 125 deletions
diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c
index dc90f19075..2d237ffa12 100644
--- a/lib/krb5_wrap/krb5_samba.c
+++ b/lib/krb5_wrap/krb5_samba.c
@@ -1436,126 +1436,6 @@ krb5_error_code smb_krb5_get_credentials(krb5_context context,
return ret;
}
-/*
- * smb_krb5_get_creds
- *
- * @brief Get krb5 credentials for a server
- *
- * @param[in] server_s The string name of the service
- * @param[in] time_offset The offset to the KDCs time in seconds (optional)
- * @param[in] cc The krb5 credential cache string name (optional)
- * @param[in] impersonate_princ_s The string principal name to impersonate (optional)
- * @param[out] creds_p The returned krb5_creds structure
- * @return krb5_error_code
- *
- */
-krb5_error_code smb_krb5_get_creds(const char *server_s,
- time_t time_offset,
- const char *cc,
- const char *impersonate_princ_s,
- krb5_creds **creds_p)
-{
- krb5_error_code ret;
- krb5_context context = NULL;
- krb5_principal me = NULL;
- krb5_principal server = NULL;
- krb5_principal impersonate_princ = NULL;
- krb5_creds *creds = NULL;
- krb5_ccache ccache = NULL;
-
- *creds_p = NULL;
-
- initialize_krb5_error_table();
- ret = krb5_init_context(&context);
- if (ret) {
- goto done;
- }
-
- if (time_offset != 0) {
- krb5_set_real_time(context, time(NULL) + time_offset, 0);
- }
-
- ret = krb5_cc_resolve(context, cc ? cc :
- krb5_cc_default_name(context), &ccache);
- if (ret) {
- goto done;
- }
-
- ret = krb5_cc_get_principal(context, ccache, &me);
- if (ret) {
- goto done;
- }
-
- ret = smb_krb5_parse_name(context, server_s, &server);
- if (ret) {
- goto done;
- }
-
- if (impersonate_princ_s) {
- ret = smb_krb5_parse_name(context, impersonate_princ_s,
- &impersonate_princ);
- if (ret) {
- goto done;
- }
- }
-
- ret = smb_krb5_get_credentials(context, ccache,
- me, server, impersonate_princ,
- &creds);
- if (ret) {
- goto done;
- }
-
- ret = krb5_cc_store_cred(context, ccache, creds);
- if (ret) {
- goto done;
- }
-
- if (creds_p) {
- *creds_p = creds;
- }
-
- DEBUG(1,("smb_krb5_get_creds: got ticket for %s\n",
- server_s));
-
- if (impersonate_princ_s) {
- char *client = NULL;
-
- ret = smb_krb5_unparse_name(talloc_tos(), context, creds->client, &client);
- if (ret) {
- goto done;
- }
- DEBUGADD(1,("smb_krb5_get_creds: using S4U2SELF impersonation as %s\n",
- client));
- TALLOC_FREE(client);
- }
-
- done:
- if (!context) {
- return ret;
- }
-
- if (creds && ret) {
- krb5_free_creds(context, creds);
- }
- if (server) {
- krb5_free_principal(context, server);
- }
- if (me) {
- krb5_free_principal(context, me);
- }
- if (impersonate_princ) {
- krb5_free_principal(context, impersonate_princ);
- }
- if (ccache) {
- krb5_cc_close(context, ccache);
- }
- krb5_free_context(context);
-
- return ret;
-}
-
-
krb5_error_code smb_krb5_keyblock_init_contents(krb5_context context,
krb5_enctype enctype,
const void *data,
diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h
index bd34879374..9db43b7535 100644
--- a/lib/krb5_wrap/krb5_samba.h
+++ b/lib/krb5_wrap/krb5_samba.h
@@ -188,11 +188,6 @@ krb5_error_code smb_krb5_get_credentials(krb5_context context,
krb5_principal server,
krb5_principal impersonate_princ,
krb5_creds **out_creds);
-krb5_error_code smb_krb5_get_creds(const char *server_s,
- time_t time_offset,
- const char *cc,
- const char *impersonate_princ_s,
- krb5_creds **creds_p);
krb5_error_code smb_krb5_keyblock_init_contents(krb5_context context,
krb5_enctype enctype,
const void *data,