summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-02-19 11:14:15 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-02-19 11:18:27 +1100
commitaf4a7c0f4be4bb94d6299e93f22d26e2f8340e69 (patch)
tree6ad36815d368b7ed2d1f59c03bbe4fd242f7d3a5 /source4/param
parent91a4db635802a391a560b739c996b5599a3df1a4 (diff)
downloadsamba-af4a7c0f4be4bb94d6299e93f22d26e2f8340e69.tar.gz
samba-af4a7c0f4be4bb94d6299e93f22d26e2f8340e69.tar.bz2
samba-af4a7c0f4be4bb94d6299e93f22d26e2f8340e69.zip
s4:winbind Make the 'no SID found' message even more detailed
Now we give the user a clue as to what may be wrong, and the file path that we could not find the domain SID in. Andrew Bartlett
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/secrets.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/param/secrets.c b/source4/param/secrets.c
index 18a0800779..407e27ff67 100644
--- a/source4/param/secrets.c
+++ b/source4/param/secrets.c
@@ -165,12 +165,15 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
attrs, 0, SECRETS_PRIMARY_DOMAIN_FILTER, domain);
if (ldb_ret != LDB_SUCCESS) {
- *errstring = talloc_asprintf(mem_ctx, "Failed to find record for %s in secrets.ldb: %s: %s", domain, ldb_strerror(ldb_ret), ldb_errstring(ldb));
+ *errstring = talloc_asprintf(mem_ctx, "Failed to find record for %s in %s: %s: %s",
+ domain, ldb_get_opaque(ldb, "ldb_url"),
+ ldb_strerror(ldb_ret), ldb_errstring(ldb));
return NULL;
}
v = ldb_msg_find_ldb_val(msg, "objectSid");
if (v == NULL) {
- *errstring = talloc_asprintf(mem_ctx, "Failed to find a SID on record for %s in secrets.ldb", domain);
+ *errstring = talloc_asprintf(mem_ctx, "Failed to find a SID on record for %s in %s",
+ domain, ldb_get_opaque(ldb, "ldb_url"));
return NULL;
}
result = talloc(mem_ctx, struct dom_sid);
@@ -182,7 +185,8 @@ struct dom_sid *secrets_get_domain_sid(TALLOC_CTX *mem_ctx,
ndr_err = ndr_pull_struct_blob(v, result, NULL, result,
(ndr_pull_flags_fn_t)ndr_pull_dom_sid);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
- *errstring = talloc_asprintf(mem_ctx, "Failed to parse SID on record for %s in secrets.ldb", domain);
+ *errstring = talloc_asprintf(mem_ctx, "Failed to parse SID on record for %s in %s",
+ domain, ldb_get_opaque(ldb, "ldb_url"));
talloc_free(result);
talloc_free(ldb);
return NULL;