diff options
author | Theodore Tso <tytso@mit.edu> | 1996-10-19 05:05:24 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1996-10-19 05:05:24 +0000 |
commit | 2c00e1c235063a9fc812563c32acefcba1574e4f (patch) | |
tree | 8a01af0554082bdc513269d3c447dec4939e5154 /src/lib/gssapi/krb5/gssapi_krb5.c | |
parent | 954d7d2c60353d1659324cf3d04ed727e58d4ffa (diff) | |
download | krb5-2c00e1c235063a9fc812563c32acefcba1574e4f.zip krb5-2c00e1c235063a9fc812563c32acefcba1574e4f.tar.gz krb5-2c00e1c235063a9fc812563c32acefcba1574e4f.tar.bz2 |
ser_sctx.c (kg_oid_externalize, kg_oid_internalize,
kg_oid_size): Add a GSSAPI OID magic number to the externalized OID,
so that if the OID is skipped, (it is optional), the serialization
code can resyncronize if necessary.
(kg_queue_internalize, kg_queue_externalize, kg_queue_size): New functions
to externalize the gssapi queue.
(kg_ctx_size, kg_ctx_exteranlize, kg_ctx_import): Changed to include
the mech_used field and to include the auth context.
gssapi_krb5.c (kg_get_context): Add calls to correctly initialize the
serializers needed by import and export sec context.
delete_sec_context.c (krb5_gss_delete_sec_context): Remember to release the
mech_used OID if necessary!
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9213 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/gssapi/krb5/gssapi_krb5.c')
-rw-r--r-- | src/lib/gssapi/krb5/gssapi_krb5.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/lib/gssapi/krb5/gssapi_krb5.c b/src/lib/gssapi/krb5/gssapi_krb5.c index e13b453..9b631a1 100644 --- a/src/lib/gssapi/krb5/gssapi_krb5.c +++ b/src/lib/gssapi/krb5/gssapi_krb5.c @@ -130,13 +130,27 @@ kg_get_context(minor_status, context) static krb5_context kg_context = NULL; krb5_error_code code; - if ((! kg_context) && - (code = krb5_init_context(&kg_context))) { - *minor_status = (OM_uint32) code; - return GSS_S_FAILURE; + if (!kg_context) { + if ((code = krb5_init_context(&kg_context))) + goto fail; + if ((code = krb5_ser_context_init(kg_context))) + goto fail; + if ((code = krb5_ser_auth_context_init(kg_context))) + goto fail; + if ((code = krb5_ser_ccache_init(kg_context))) + goto fail; + if ((code = krb5_ser_rcache_init(kg_context))) + goto fail; + if ((code = krb5_ser_keytab_init(kg_context))) + goto fail; + if ((code = krb5_ser_auth_context_init(kg_context))) + goto fail; } - *context = kg_context; *minor_status = 0; return GSS_S_COMPLETE; + +fail: + *minor_status = (OM_uint32) code; + return GSS_S_FAILURE; } |