svn rev #21648: branches/mskrb-integ/src/lib/gssapi/krb5/
lhoward@MIT.EDU
lhoward at MIT.EDU
Wed Dec 31 20:44:26 EST 2008
http://src.mit.edu/fisheye/changelog/krb5/?cs=21648
Commit By: lhoward
Log Message:
Restore old gss_krb5_ccache_name() implementation, it does not need to
be indirected through gssspi_mech_invoke()
Changed Files:
U branches/mskrb-integ/src/lib/gssapi/krb5/gssapiP_krb5.h
U branches/mskrb-integ/src/lib/gssapi/krb5/krb5_gss_glue.c
U branches/mskrb-integ/src/lib/gssapi/krb5/set_ccache.c
Modified: branches/mskrb-integ/src/lib/gssapi/krb5/gssapiP_krb5.h
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/krb5/gssapiP_krb5.h 2009-01-01 01:23:23 UTC (rev 21647)
+++ branches/mskrb-integ/src/lib/gssapi/krb5/gssapiP_krb5.h 2009-01-01 01:44:25 UTC (rev 21648)
@@ -823,20 +823,6 @@
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"
Modified: branches/mskrb-integ/src/lib/gssapi/krb5/krb5_gss_glue.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/krb5/krb5_gss_glue.c 2009-01-01 01:23:23 UTC (rev 21647)
+++ branches/mskrb-integ/src/lib/gssapi/krb5/krb5_gss_glue.c 2009-01-01 01:44:25 UTC (rev 21648)
@@ -319,10 +319,6 @@
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 @@
}
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)
Modified: branches/mskrb-integ/src/lib/gssapi/krb5/set_ccache.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/krb5/set_ccache.c 2009-01-01 01:23:23 UTC (rev 21647)
+++ branches/mskrb-integ/src/lib/gssapi/krb5/set_ccache.c 2009-01-01 01:44:25 UTC (rev 21648)
@@ -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 @@
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 @@
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 @@
}
if (!err) {
- if (req->out_name != NULL) {
- req->out_name = gss_out_name;
+ if (out_name) {
+ *out_name = gss_out_name;
}
}
More information about the cvs-krb5
mailing list