diff options
author | Luke Howard <lukeh@padl.com> | 2009-01-01 01:44:25 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2009-01-01 01:44:25 +0000 |
commit | 6c2978d8ea21a1335bf401ff069818899a5c662a (patch) | |
tree | 74cdf3028b3feec0cb2edcccdec2d02deb921390 | |
parent | cf6ecd774daa18f4edc62672f654ff9bc8854ffd (diff) | |
download | krb5-6c2978d8ea21a1335bf401ff069818899a5c662a.zip krb5-6c2978d8ea21a1335bf401ff069818899a5c662a.tar.gz krb5-6c2978d8ea21a1335bf401ff069818899a5c662a.tar.bz2 |
Restore old gss_krb5_ccache_name() implementation, it does not need to
be indirected through gssspi_mech_invoke()
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/mskrb-integ@21648 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/gssapi/krb5/gssapiP_krb5.h | 14 | ||||
-rw-r--r-- | src/lib/gssapi/krb5/krb5_gss_glue.c | 38 | ||||
-rw-r--r-- | src/lib/gssapi/krb5/set_ccache.c | 24 |
3 files changed, 8 insertions, 68 deletions
diff --git a/src/lib/gssapi/krb5/gssapiP_krb5.h b/src/lib/gssapi/krb5/gssapiP_krb5.h index 30d64fe..9a664c9 100644 --- a/src/lib/gssapi/krb5/gssapiP_krb5.h +++ b/src/lib/gssapi/krb5/gssapiP_krb5.h @@ -823,20 +823,6 @@ OM_uint32 KRB5_CALLCONV gss_krb5int_copy_ccache const gss_OID desired_oid, const gss_buffer_t value); -#define GSS_KRB5_CCACHE_NAME_OID_LENGTH 11 -#define GSS_KRB5_CCACHE_NAME_OID "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x05\x0a" - -struct krb5_gss_ccache_name_req { - const char *name; - const char *out_name; -}; - -OM_uint32 KRB5_CALLCONV gss_krb5int_ccache_name - (OM_uint32 *minor_status, - const gss_OID, - const gss_OID, - const gss_buffer_t); - #define GSS_KRB5_SET_ALLOWABLE_ENCTYPES_OID_LENGTH 11 #define GSS_KRB5_SET_ALLOWABLE_ENCTYPES_OID "\x2a\x86\x48\x86\xf7\x12\x01\x02\x02\x05\x08" diff --git a/src/lib/gssapi/krb5/krb5_gss_glue.c b/src/lib/gssapi/krb5/krb5_gss_glue.c index fa45c8b..62ce567 100644 --- a/src/lib/gssapi/krb5/krb5_gss_glue.c +++ b/src/lib/gssapi/krb5/krb5_gss_glue.c @@ -319,10 +319,6 @@ static struct { gss_krb5int_register_acceptor_identity }, { - {GSS_KRB5_CCACHE_NAME_OID_LENGTH, GSS_KRB5_CCACHE_NAME_OID}, - gss_krb5int_ccache_name - }, - { {GSS_KRB5_FREE_LUCID_SEC_CONTEXT_OID_LENGTH, GSS_KRB5_FREE_LUCID_SEC_CONTEXT_OID}, gss_krb5int_free_lucid_sec_context }, @@ -694,40 +690,6 @@ gss_krb5_set_allowable_enctypes( } OM_uint32 KRB5_CALLCONV -gss_krb5_ccache_name( - OM_uint32 *minor_status, - const char *name, - const char **out_name) -{ - static const gss_OID_desc const req_oid = { - GSS_KRB5_CCACHE_NAME_OID_LENGTH, - GSS_KRB5_CCACHE_NAME_OID }; - OM_uint32 major_status; - struct krb5_gss_ccache_name_req req; - gss_buffer_desc req_buffer; - - if (out_name == NULL) - return GSS_S_CALL_INACCESSIBLE_WRITE; - - *out_name = NULL; - - req.name = name; - req.out_name = NULL; - - req_buffer.length = sizeof(req); - req_buffer.value = &req; - - major_status = gssspi_mech_invoke(minor_status, - (const gss_OID)gss_mech_krb5, - (const gss_OID)&req_oid, - &req_buffer); - - *out_name = req.out_name; - - return major_status; -} - -OM_uint32 KRB5_CALLCONV gss_krb5_free_lucid_sec_context( OM_uint32 *minor_status, void *kctx) diff --git a/src/lib/gssapi/krb5/set_ccache.c b/src/lib/gssapi/krb5/set_ccache.c index 63cd538..1c67dcb 100644 --- a/src/lib/gssapi/krb5/set_ccache.c +++ b/src/lib/gssapi/krb5/set_ccache.c @@ -32,16 +32,15 @@ #include "gssapiP_krb5.h" OM_uint32 KRB5_CALLCONV -gss_krb5int_ccache_name(OM_uint32 *minor_status, - const gss_OID desired_mech, - const gss_OID desired_object, - gss_buffer_t value) +gss_krb5_ccache_name(minor_status, name, out_name) + OM_uint32 *minor_status; + const char *name; + const char **out_name; { char *old_name = NULL; OM_uint32 err = 0; OM_uint32 minor = 0; char *gss_out_name; - struct krb5_gss_ccache_name_req *req; err = gss_krb5int_initialize_library(); if (err) { @@ -49,16 +48,9 @@ gss_krb5int_ccache_name(OM_uint32 *minor_status, return GSS_S_FAILURE; } - assert(value->length == sizeof(*req)); - - if (value->length != sizeof(*req)) - return GSS_S_FAILURE; - - req = (struct krb5_gss_ccache_name_req *)value->value; - gss_out_name = k5_getspecific(K5_KEY_GSS_KRB5_SET_CCACHE_OLD_NAME); - if (req->out_name) { + if (out_name) { const char *tmp_name = NULL; if (!err) { @@ -73,7 +65,7 @@ gss_krb5int_ccache_name(OM_uint32 *minor_status, don't free up any storage (leave old_name NULL). */ if (!err) - kg_set_ccache_name (&err, req->name); + kg_set_ccache_name (&err, name); minor = k5_setspecific(K5_KEY_GSS_KRB5_SET_CCACHE_OLD_NAME, gss_out_name); if (minor) { @@ -86,8 +78,8 @@ gss_krb5int_ccache_name(OM_uint32 *minor_status, } if (!err) { - if (req->out_name != NULL) { - req->out_name = gss_out_name; + if (out_name) { + *out_name = gss_out_name; } } |