(krb5_get_forwarded_creds): use KRB5_AUTH_CONTEXT_DO_TIME if we want
timestamp in forwarded krb-cred git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13191 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -163,8 +163,6 @@ krb5_get_forwarded_creds (krb5_context context,
|
|||||||
size_t len;
|
size_t len;
|
||||||
unsigned char *buf;
|
unsigned char *buf;
|
||||||
size_t buf_size;
|
size_t buf_size;
|
||||||
krb5_timestamp sec;
|
|
||||||
int32_t usec;
|
|
||||||
krb5_kdc_flags kdc_flags;
|
krb5_kdc_flags kdc_flags;
|
||||||
krb5_crypto crypto;
|
krb5_crypto crypto;
|
||||||
struct addrinfo *ai;
|
struct addrinfo *ai;
|
||||||
@@ -224,6 +222,10 @@ krb5_get_forwarded_creds (krb5_context context,
|
|||||||
goto out4;
|
goto out4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (auth_context->flags & KRB5_AUTH_CONTEXT_DO_TIME) {
|
||||||
|
krb5_timestamp sec;
|
||||||
|
int32_t usec;
|
||||||
|
|
||||||
krb5_us_timeofday (context, &sec, &usec);
|
krb5_us_timeofday (context, &sec, &usec);
|
||||||
|
|
||||||
ALLOC(enc_krb_cred_part.timestamp, 1);
|
ALLOC(enc_krb_cred_part.timestamp, 1);
|
||||||
@@ -240,6 +242,10 @@ krb5_get_forwarded_creds (krb5_context context,
|
|||||||
goto out4;
|
goto out4;
|
||||||
}
|
}
|
||||||
*enc_krb_cred_part.usec = usec;
|
*enc_krb_cred_part.usec = usec;
|
||||||
|
} else {
|
||||||
|
enc_krb_cred_part.timestamp = NULL;
|
||||||
|
enc_krb_cred_part.usec = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (auth_context->local_address && auth_context->local_port) {
|
if (auth_context->local_address && auth_context->local_port) {
|
||||||
krb5_boolean noaddr;
|
krb5_boolean noaddr;
|
||||||
|
Reference in New Issue
Block a user