unsigned int i;
int rc;
+ ZERO_STRUCTP(h);
+
rc = krb5_copy_principal(context,
s->principal,
&h->principal);
}
}
- h->generation = NULL;
- h->extensions = NULL; /* really sure ? FIXME */
-
return 0;
error:
free_hdb_entry(h);
const struct sdb_entry_ex *s,
hdb_entry *h)
{
- struct samba_kdc_entry *skdc_entry;
+ int ret;
- ZERO_STRUCTP(h);
+ ret = sdb_entry_to_hdb_entry(context, &s->entry, h);
+ if (ret != 0) {
+ return ret;
+ }
if (s->ctx != NULL) {
+ struct samba_kdc_entry *skdc_entry;
+
skdc_entry = talloc_get_type(s->ctx, struct samba_kdc_entry);
h->context = skdc_entry;
samba_kdc_hdb_entry_destructor);
}
- return sdb_entry_to_hdb_entry(context, &s->entry, h);
+ return 0;
}