summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-12-07 13:39:31 +0100
committerMichael Adam <obnox@samba.org>2012-12-07 16:04:26 +0100
commit802124789513ef207a154ee950dc03e66a80e0b1 (patch)
tree6e3c858c05a95f7c817a314bd9449ec24ab03f17 /source4/dsdb
parent14b5b729049d92c30ba518adb82c9396fdddd09f (diff)
downloadsamba-802124789513ef207a154ee950dc03e66a80e0b1.tar.gz
samba-802124789513ef207a154ee950dc03e66a80e0b1.tar.bz2
samba-802124789513ef207a154ee950dc03e66a80e0b1.zip
s4:dsdb/acl_read: improve debugging for fatal error
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl_read.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c
index 0b0f363660..2b20f249d9 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_read.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_read.c
@@ -91,7 +91,9 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
msg = ares->message;
ret = dsdb_get_sd_from_ldb_message(ldb, tmp_ctx, msg, &sd);
if (ret != LDB_SUCCESS || sd == NULL ) {
- DEBUG(10, ("acl_read: cannot get descriptor\n"));
+ ldb_debug_set(ldb, LDB_DEBUG_FATAL,
+ "acl_read: cannot get descriptor of %s\n",
+ ldb_dn_get_linearized(msg->dn));
ret = LDB_ERR_OPERATIONS_ERROR;
goto fail;
}
@@ -113,6 +115,11 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
talloc_free(tmp_ctx);
return LDB_SUCCESS;
} else if (ret != LDB_SUCCESS) {
+ ldb_debug_set(ldb, LDB_DEBUG_FATAL,
+ "acl_read: %s check parent %s - %s\n",
+ ldb_dn_get_linearized(msg->dn),
+ ldb_strerror(ret),
+ ldb_errstring(ldb));
goto fail;
}
}
@@ -124,8 +131,10 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
attr = dsdb_attribute_by_lDAPDisplayName(ac->schema,
msg->elements[i].name);
if (!attr) {
- DEBUG(2, ("acl_read: cannot find attribute %s in schema\n",
- msg->elements[i].name));
+ ldb_debug_set(ldb, LDB_DEBUG_FATAL,
+ "acl_read: %s cannot find attr[%s] in of schema\n",
+ ldb_dn_get_linearized(msg->dn),
+ msg->elements[i].name);
ret = LDB_ERR_OPERATIONS_ERROR;
goto fail;
}
@@ -216,6 +225,12 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
}
}
} else if (ret != LDB_SUCCESS) {
+ ldb_debug_set(ldb, LDB_DEBUG_FATAL,
+ "acl_read: %s check attr[%s] gives %s - %s\n",
+ ldb_dn_get_linearized(msg->dn),
+ msg->elements[i].name,
+ ldb_strerror(ret),
+ ldb_errstring(ldb));
goto fail;
}
}