krb5: Do not clobber keytab entry timestamps
We set the timestamp field of krb5_keytab_entry in every case in-tree, so we should not clobber it in krb5_kt_add_entry(). This is very important in the context of virtual service principals, as the timestamp of the keys in the keytab is a clue to when they must be refetched!
This commit is contained in:
@@ -883,7 +883,8 @@ krb5_kt_add_entry(krb5_context context,
|
||||
id->prefix);
|
||||
return KRB5_KT_NOWRITE;
|
||||
}
|
||||
entry->timestamp = time(NULL);
|
||||
if (entry->timestamp == 0)
|
||||
entry->timestamp = time(NULL);
|
||||
return (*id->add)(context, id,entry);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user