]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
gssd: Fix endtime issue
authorDoug Nazar <nazard.michi@gmail.com>
Mon, 19 Jul 2010 14:48:34 +0000 (10:48 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 19 Jul 2010 14:48:34 +0000 (10:48 -0400)
Commit 4c5ff6d4 removed the setting of endtime for a few contexts by
accident.

Now to figure out why I get stale handles on submounts.

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/context_lucid.c
utils/gssd/context_mit.c

index b87bf76219074e32de3dddc7b9f33c6404b2ad62..b8d4734fe1baa63a93fd019421bf4754053cb7ee 100644 (file)
@@ -77,7 +77,7 @@ prepare_krb5_rfc1964_buffer(gss_krb5_lucid_context_v1_t *lctx,
        unsigned char fakeseed[FAKESEED_SIZE];
        uint32_t word_send_seq;
        gss_krb5_lucid_key_t enc_key;
-       int i;
+       uint32_t i;
        char *skd, *dkd;
        gss_buffer_desc fakeoid;
 
@@ -202,6 +202,8 @@ prepare_krb5_rfc4121_buffer(gss_krb5_lucid_context_v1_t *lctx,
 
        if (WRITE_BYTES(&p, end, v2_flags)) goto out_err;
        if (WRITE_BYTES(&p, end, lctx->endtime)) goto out_err;
+       if (endtime)
+               *endtime = lctx->endtime;
        if (WRITE_BYTES(&p, end, lctx->send_seq)) goto out_err;
 
        /* Protocol 0 here implies DES3 or RC4 */
index f9cbb0297d4997b4d043aea377314fc8afa59326..e6db9cbb77b858ba91f659b9a7f43ef312317a21 100644 (file)
@@ -191,6 +191,8 @@ serialize_krb5_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf, int32_t *endtime)
                if (WRITE_BYTES(&p, end, kctx->signalg)) goto out_err;
                if (WRITE_BYTES(&p, end, kctx->sealalg)) goto out_err;
                if (WRITE_BYTES(&p, end, kctx->endtime)) goto out_err;
+               if (endtime)
+                       *endtime = kctx->endtime;
                word_seq_send = kctx->seq_send;
                if (WRITE_BYTES(&p, end, word_seq_send)) goto out_err;
                if (write_oid(&p, end, kctx->mech_used)) goto out_err;