r23344: Better error message
authorVolker Lendecke <vlendec@samba.org>
Mon, 4 Jun 2007 19:50:30 +0000 (19:50 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:08 +0000 (12:23 -0500)
source/lib/messages_local.c

index b459ce02388614013905192de9ce8e9515169f14..f210bff6957ccf10ec1ead4e28a51ff7b4e3fb7f 100644 (file)
@@ -93,9 +93,11 @@ NTSTATUS messaging_tdb_init(struct messaging_context *msg_ctx,
                           O_RDWR|O_CREAT,0600);
 
        if (!tdb) {
-               DEBUG(0,("ERROR: Failed to initialise messages database\n"));
+               NTSTATUS status = map_nt_error_from_unix(errno);
+               DEBUG(0, ("ERROR: Failed to initialise messages database: "
+                         "%s\n", strerror(errno)));
                TALLOC_FREE(result);
-               return NT_STATUS_INTERNAL_DB_CORRUPTION;
+               return status;
        }
 
        sec_init();