s4:lib/registry/regf.c - always generate debug messages on error cases
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Fri, 28 Oct 2011 16:20:47 +0000 (18:20 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Thu, 3 Nov 2011 19:10:06 +0000 (20:10 +0100)
We need to know what is going on.

Reviewed-by: Jelmer
source4/lib/registry/regf.c

index 5ca7b7c66cdcb18d423c158c38b49a1e12e9490d..b6a586cf78bd6edad3909761c43edbd219683583 100644 (file)
@@ -2211,7 +2211,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
        pull->data.data = (uint8_t*)fd_load(regf->fd, &pull->data.length, 0, regf);
 
        if (pull->data.data == NULL) {
-               DEBUG(0, ("Error reading data\n"));
+               DEBUG(0, ("Error reading data from file: %s\n", location));
                talloc_free(regf);
                return WERR_GENERAL_FAILURE;
        }
@@ -2220,6 +2220,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
        W_ERROR_HAVE_NO_MEMORY(regf_hdr);
 
        if (NT_STATUS_IS_ERR(tdr_pull_regf_hdr(pull, regf_hdr, regf_hdr))) {
+               DEBUG(0, ("Failed to pull regf header from file: %s\n", location));
                talloc_free(regf);
                return WERR_GENERAL_FAILURE;
        }