(krb5_build_authenticator): if the local sequence number is non-zero,

don't generate a new one


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12143 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2003-04-25 18:10:29 +00:00
parent 0b41135c1f
commit 10617940f1

View File

@@ -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.
*
@@ -63,22 +63,22 @@ krb5_build_authenticator (krb5_context context,
copy_Realm(&cred->client->realm, &auth->crealm);
copy_PrincipalName(&cred->client->name, &auth->cname);
{
int32_t sec, usec;
krb5_us_timeofday (context, &auth->ctime, &auth->cusec);
krb5_us_timeofday (context, &sec, &usec);
auth->ctime = sec;
auth->cusec = usec;
}
ret = krb5_auth_con_getlocalsubkey(context, auth_context, &auth->subkey);
if(ret)
goto fail;
if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_SEQUENCE) {
if(auth_context->local_seqnumber == 0)
krb5_generate_seq_number (context,
&cred->session,
&auth_context->local_seqnumber);
ALLOC(auth->seq_number, 1);
if(auth->seq_number == NULL) {
ret = ENOMEM;
goto fail;
}
*auth->seq_number = auth_context->local_seqnumber;
} else
auth->seq_number = NULL;