Whamcloud - gitweb
branch: b_new_cmd
authorericm <ericm>
Sat, 2 Dec 2006 01:07:04 +0000 (01:07 +0000)
committerericm <ericm>
Sat, 2 Dec 2006 01:07:04 +0000 (01:07 +0000)
backport from b1_8_gss:
fix gss-krb5 lucid context export format.

lustre/utils/gss/context_lucid.c

index bfae6a6..965b123 100644 (file)
@@ -355,6 +355,7 @@ static int
 prepare_krb5_rfc4121_buffer(gss_krb5_lucid_context_v1_t *lctx,
                            gss_buffer_desc *buf)
 {
+       static int constant_two = 2;
        char *p, *end;
        uint32_t v2_flags = 0;
        gss_krb5_lucid_key_t enc_key;
@@ -373,7 +374,7 @@ prepare_krb5_rfc4121_buffer(gss_krb5_lucid_context_v1_t *lctx,
        end = buf->value + MAX_CTX_LEN;
 
        /* Version 2 */
-       if (WRITE_BYTES(&p, end, lctx->initiate)) goto out_err;
+       if (WRITE_BYTES(&p, end, constant_two)) goto out_err;
        if (WRITE_BYTES(&p, end, lctx->endtime)) goto out_err;
 
        if (lctx->initiate)