From c9b19d9b696d8528e59eade89695c60a40461ec9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 24 Sep 2010 14:17:58 +1000 Subject: s4-kerberos Rework keytab handling to export servicePrincipalName entries This creates keytab entries with all the servicePrincipalNames listed in the secrets.ldb entry. Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/update_keytab.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/update_keytab.c b/source4/dsdb/samdb/ldb_modules/update_keytab.c index 86ced73b5d..9db2c59baa 100644 --- a/source4/dsdb/samdb/ldb_modules/update_keytab.c +++ b/source4/dsdb/samdb/ldb_modules/update_keytab.c @@ -379,11 +379,15 @@ static int update_kt_prepare_commit(struct ldb_module *module) ldb = ldb_module_get_ctx(module); for (p=data->changed_dns; p; p = p->next) { - krb5_ret = smb_krb5_update_keytab(smb_krb5_context, ldb, p->msg, p->do_delete); + const char *error_string; + krb5_ret = smb_krb5_update_keytab(data, smb_krb5_context, ldb, p->msg, p->do_delete, &error_string); if (krb5_ret != 0) { talloc_free(data->changed_dns); data->changed_dns = NULL; - ldb_asprintf_errstring(ldb, "Failed to update keytab: %s", error_message(krb5_ret)); + ldb_asprintf_errstring(ldb, "Failed to update keytab from entry %s in %s: %s", + ldb_dn_get_linearized(p->msg->dn), + (const char *)ldb_get_opaque(ldb, "ldb_url"), + error_string); return LDB_ERR_OPERATIONS_ERROR; } } -- cgit