~vcs-imports/nfs-utils/main

« back to all changes in this revision

Viewing changes to utils/gssd/context_mit.c

  • Committer: neilbrown
  • Date: 2006-03-28 00:48:27 UTC
  • Revision ID: Arch-1:nfs-utils@products.ubuntu.com%nfs-utils--MAIN--0--patch-569
        Update krb5 code to use glue routine lucid context functions



        The gssd code should not know about the glue layer's context structure.
        A previous patch added gss_export_lucid_sec_context() and
        gss_free_lucid_sec_context() functions to the gssapi glue layer.
        Use these functions rather than calling directly to the Kerberos
        gssapi code (which requires the Kerberos context handle rather
        than the glue's context handle).

        (really this time)

Show diffs side-by-side

added added

removed removed

Lines of Context:
232
232
        int retcode = 0;
233
233
 
234
234
        printerr(2, "DEBUG: serialize_krb5_ctx: lucid version!\n");
235
 
        maj_stat = gss_krb5_export_lucid_sec_context(&min_stat, &ctx,
236
 
                                                        1, &return_ctx);
237
 
        if (maj_stat != GSS_S_COMPLETE)
 
235
        maj_stat = gss_export_lucid_sec_context(&min_stat, ctx,
 
236
                                                1, &return_ctx);
 
237
        if (maj_stat != GSS_S_COMPLETE) {
 
238
                pgsserr("gss_export_lucid_sec_context",
 
239
                        maj_stat, min_stat, &krb5oid);
238
240
                goto out_err;
 
241
        }
239
242
 
240
243
        /* Check the version returned, we only support v1 right now */
241
244
        vers = ((gss_krb5_lucid_context_version_t *)return_ctx)->version;
256
259
        else
257
260
                retcode = prepare_krb5_rfc_cfx_buffer(lctx, buf);
258
261
 
259
 
        maj_stat = gss_krb5_free_lucid_sec_context(&min_stat,
260
 
                                                   (void *)lctx);
261
 
        if (maj_stat != GSS_S_COMPLETE)
 
262
        maj_stat = gss_free_lucid_sec_context(&min_stat, ctx, return_ctx);
 
263
        if (maj_stat != GSS_S_COMPLETE) {
 
264
                pgsserr("gss_export_lucid_sec_context",
 
265
                        maj_stat, min_stat, &krb5oid);
262
266
                printerr(0, "WARN: failed to free lucid sec context\n");
263
 
        if (retcode)
 
267
        }
 
268
 
 
269
        if (retcode) {
 
270
                printerr(1, "serialize_krb5_ctx: prepare_krb5_*_buffer "
 
271
                         "failed (retcode = %d)\n", retcode);
264
272
                goto out_err;
 
273
        }
265
274
 
266
275
        return 0;
267
276