diff options
author | Matthieu Patou <mat@matws.net> | 2010-09-05 02:56:30 +0400 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2010-09-05 12:29:20 +0400 |
commit | 42dfa71ef5d08b500e911e2ba54dba0b1b4a4599 (patch) | |
tree | c44f7f519c994dfdd6522767d04a3eafafda5d8c /source4 | |
parent | e4d1bdbe5505d63f7cd5b8cc7f07a11f9361f93b (diff) | |
download | samba-42dfa71ef5d08b500e911e2ba54dba0b1b4a4599.tar.gz samba-42dfa71ef5d08b500e911e2ba54dba0b1b4a4599.tar.bz2 samba-42dfa71ef5d08b500e911e2ba54dba0b1b4a4599.zip |
dsdb: make the ATTRIBUTE NOT FOUND more clear
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 2 | ||||
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/objectclass.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index fc117b9fa3..c409adbbe3 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -1644,6 +1644,8 @@ int samdb_reference_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_ *dn = ldb_msg_find_attr_as_dn(ldb, mem_ctx, res->msgs[0], attribute); if (!*dn) { talloc_free(res); + ldb_asprintf_errstring(ldb, "Cannot find dn of attribute %s of %s", attribute, + ldb_dn_get_linearized(base)); return LDB_ERR_NO_SUCH_ATTRIBUTE; } diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c index cd45963f37..005f0f2820 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass.c @@ -1005,6 +1005,9 @@ static int objectclass_do_mod(struct oc_context *ac) } if (!found) { /* we cannot delete a not existing object class */ + ldb_asprintf_errstring(ldb, "Cannot delete this %.*s ", + (int)oc_el_change->values[i].length, (const char *)oc_el_change->values[i].data); + talloc_free(mem_ctx); return LDB_ERR_NO_SUCH_ATTRIBUTE; } |