This is not related to the kvno of the key,
the mkvno tells the HDB layer that the keys need to
be decrypted with a master key (with the given [m]kvno).
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
return;
}
- if (k->mkvno) {
- free(k->mkvno);
- }
-
/* keyblock not alloced */
if (k->salt) {
};
struct sdb_key {
- unsigned int *mkvno;
krb5_keyblock key;
struct sdb_salt *salt;
};
{
int rc;
- if (s->mkvno != NULL) {
- h->mkvno = malloc(sizeof(unsigned int));
- if (h->mkvno == NULL) {
- goto error_nomem;
- }
- *h->mkvno = *s->mkvno;
- } else {
- h->mkvno = NULL;
- }
+ ZERO_STRUCTP(h);
h->key.keytype = s->key.keytype;
rc = smb_krb5_copy_data_contents(&h->key.keyvalue,