From 0b41135c1f8717eda24f43c62c43c35875a71960 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Fri, 25 Apr 2003 18:05:14 +0000 Subject: [PATCH] (krb5_mk_rep): if the local sequence number is non-zero, don't generate a new one git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12142 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/krb5/mk_rep.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/krb5/mk_rep.c b/lib/krb5/mk_rep.c index 37bcb973e..93e36225f 100644 --- a/lib/krb5/mk_rep.c +++ b/lib/krb5/mk_rep.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997 - 2002 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2003 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -57,10 +57,11 @@ krb5_mk_rep(krb5_context context, body.cusec = auth_context->authenticator->cusec; body.subkey = NULL; if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) { - krb5_generate_seq_number (context, - auth_context->keyblock, - &auth_context->local_seqnumber); - body.seq_number = malloc (sizeof(*body.seq_number)); + if(auth_context->local_seqnumber == 0) + krb5_generate_seq_number (context, + auth_context->keyblock, + &auth_context->local_seqnumber); + ALLOC(body.seq_number, 1); if (body.seq_number == NULL) { krb5_set_error_string (context, "malloc: out of memory"); return ENOMEM;