dsdb: Expand on what the error finding the ntSecurityDescriptor was in acl_read
authorAndrew Bartlett <abartlet@samba.org>
Mon, 13 May 2013 02:06:14 +0000 (14:06 +1200)
committerStefan Metzmacher <metze@samba.org>
Thu, 16 May 2013 17:02:04 +0000 (19:02 +0200)
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source4/dsdb/samdb/ldb_modules/acl_read.c

index 07b1bc4e5e02f988ec331b7bd762322e3fde15bb..f15633f28f8d43f590777dd3d6936c1fbcbf3b63 100644 (file)
@@ -92,9 +92,15 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
        case LDB_REPLY_ENTRY:
                msg = ares->message;
                ret = dsdb_get_sd_from_ldb_message(ldb, tmp_ctx, msg, &sd);
-               if (ret != LDB_SUCCESS || sd == NULL ) {
+               if (ret != LDB_SUCCESS) {
+                       ldb_debug_set(ldb, LDB_DEBUG_FATAL,
+                                     "acl_read: cannot get descriptor of %s: %s\n",
+                                     ldb_dn_get_linearized(msg->dn), ldb_strerror(ret));
+                       ret = LDB_ERR_OPERATIONS_ERROR;
+                       goto fail;
+               } else if (sd == NULL) {
                        ldb_debug_set(ldb, LDB_DEBUG_FATAL,
-                                     "acl_read: cannot get descriptor of %s\n",
+                                     "acl_read: cannot get descriptor of %s (attribute not found)\n",
                                      ldb_dn_get_linearized(msg->dn));
                        ret = LDB_ERR_OPERATIONS_ERROR;
                        goto fail;