diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/krb5/krb/ChangeLog | 6 | ||||
| -rw-r--r-- | src/lib/krb5/krb/ser_ctx.c | 22 |
2 files changed, 22 insertions, 6 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 14026dc28..6222799ed 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,9 @@ +2003-05-16 Ken Raeburn <raeburn@mit.edu> + + * ser_ctx.c (krb5_context_internalize): Copy read-in OS context + data into krb5_context and free up the newly allocated OS + context. + 2003-05-13 Sam Hartman <hartmans@mit.edu> * fwd_tgt.c (krb5_fwd_tgt_creds): Try with no specified enctype if diff --git a/src/lib/krb5/krb/ser_ctx.c b/src/lib/krb5/krb/ser_ctx.c index 014d232e7..d48f61e83 100644 --- a/src/lib/krb5/krb/ser_ctx.c +++ b/src/lib/krb5/krb/ser_ctx.c @@ -461,12 +461,22 @@ krb5_context_internalize(krb5_context kcontext, krb5_pointer *argp, krb5_octet * goto cleanup; context->scc_default_format = (int) ibuf; - /* Attempt to read in the os_context */ - kret = krb5_internalize_opaque(kcontext, KV5M_OS_CONTEXT, - (krb5_pointer *) &context->os_context, - &bp, &remain); - if (kret && (kret != EINVAL) && (kret != ENOENT)) - goto cleanup; + /* Attempt to read in the os_context. It's an array now, but + we still treat it in most places as a separate object with + a pointer. */ + { + krb5_os_context osp = 0; + kret = krb5_internalize_opaque(kcontext, KV5M_OS_CONTEXT, + (krb5_pointer *) &osp, + &bp, &remain); + if (kret && (kret != EINVAL) && (kret != ENOENT)) + goto cleanup; + /* Put the newly allocated data into the krb5_context + structure where we're really keeping it these days. */ + if (osp) + *context->os_context = *osp; + free(osp); + } /* Attempt to read in the db_context */ kret = krb5_internalize_opaque(kcontext, KV5M_DB_CONTEXT, |
