summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-09-24 14:17:58 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-09-24 15:07:56 +1000
commitc9b19d9b696d8528e59eade89695c60a40461ec9 (patch)
tree92b084758f58190e0c4b4a04ecdadba96c6bb84d /source4/dsdb/samdb
parentd8814b1a48adaf1f428c7119b97c87b69123e6fa (diff)
downloadsamba-c9b19d9b696d8528e59eade89695c60a40461ec9.tar.gz
samba-c9b19d9b696d8528e59eade89695c60a40461ec9.tar.bz2
samba-c9b19d9b696d8528e59eade89695c60a40461ec9.zip
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
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/update_keytab.c8
1 files changed, 6 insertions, 2 deletions
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;
}
}