diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-12-28 11:34:19 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:54 -0500 |
commit | 451797744d8c2bd2c9521a2cdada3f6b8621e2dc (patch) | |
tree | a517e061785ae9187bd87752f84626dd2c259bbc /source4/lib/ldb/ldb_tdb/ldb_tdb.c | |
parent | 43c3c7349d4d5029fc800d46c2c589f28daadb89 (diff) | |
download | samba-451797744d8c2bd2c9521a2cdada3f6b8621e2dc.tar.gz samba-451797744d8c2bd2c9521a2cdada3f6b8621e2dc.tar.bz2 samba-451797744d8c2bd2c9521a2cdada3f6b8621e2dc.zip |
r12540: Provide more information in the ldb error string.
Andrew Bartlett
(This used to be commit 31f65e510cdd46b1962cf06b3d51f152b1cecf37)
Diffstat (limited to 'source4/lib/ldb/ldb_tdb/ldb_tdb.c')
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index 0de7a3e558..ebee029d9c 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -577,7 +577,7 @@ int ltdb_modify_internal(struct ldb_module *module, const struct ldb_message *ms if (msg->elements[i].num_values == 0) { if (msg_delete_attribute(module, ldb, msg2, msg->elements[i].name) != 0) { - err_string = talloc_strdup(module, "No such attribute"); + err_string = talloc_asprintf(module, "No such attribute: %s", msg->elements[i].name); if (err_string) ldb_set_errstring(module, err_string); ret = LDB_ERR_NO_SUCH_ATTRIBUTE; goto failed; @@ -589,7 +589,7 @@ int ltdb_modify_internal(struct ldb_module *module, const struct ldb_message *ms msg2, msg->elements[i].name, &msg->elements[i].values[j]) != 0) { - err_string = talloc_strdup(module, "No such attribute"); + err_string = talloc_asprintf(module, "No such attribute: %s", msg->elements[i].name); if (err_string) ldb_set_errstring(module, err_string); ret = LDB_ERR_NO_SUCH_ATTRIBUTE; goto failed; @@ -600,7 +600,9 @@ int ltdb_modify_internal(struct ldb_module *module, const struct ldb_message *ms } break; default: - err_string = talloc_strdup(module, "Invalid ldb_modify flags"); + err_string = talloc_asprintf(module, "Invalid ldb_modify flags on %s: 0x%x", + msg->elements[i].name, + msg->elements[i].flags & LDB_FLAG_MOD_MASK); if (err_string) ldb_set_errstring(module, err_string); ret = LDB_ERR_PROTOCOL_ERROR; goto failed; |