r164: Viewing remote registries with gregedit works now
authorJelmer Vernooij <jelmer@samba.org>
Sun, 11 Apr 2004 15:34:18 +0000 (15:34 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:51:13 +0000 (12:51 -0500)
(This used to be commit 697560a117ba19bb44539d6d63cc9143127e29d1)

source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
source4/lib/registry/tools/regtree.c

index e61301d6f214332093c6aa71c0fd9b01b4081f07..7c30302e8423922290ae20928eaa0f8d9a27a855 100644 (file)
@@ -47,7 +47,7 @@ static void init_winreg_String(struct winreg_String *name, const char *s)
        r.out.handle = hnd;\
        \
        if (!NT_STATUS_IS_OK(dcerpc_winreg_Open ## u(p, h->mem_ctx, &r))) {\
-               printf("Error executing open\n");\
+               DEBUG(0,("Error executing open\n"));\
                return NULL;\
        }\
 \
@@ -89,7 +89,7 @@ static WERROR rpc_open_registry(REG_HANDLE *h, const char *location, const char
        user = talloc_strdup(h->mem_ctx, credentials);
        pass = strchr(user, '%');
        *pass = '\0'; pass++;
-       
+
        ZERO_STRUCTP(mydata);
        
        status = dcerpc_pipe_connect(&mydata->pipe, binding, 
index 548a702d48d44d16111c50c1ac277c5a7b026294..b8a5f5049683f298e0638aca03bee9df368a4a21 100644 (file)
@@ -72,7 +72,7 @@ int main (int argc, char **argv)
                POPT_AUTOHELP
                {"backend", 'b', POPT_ARG_STRING, &backend, 0, "backend to use", NULL},
                {"fullpath", 'f', POPT_ARG_NONE, &fullpath, 0, "show full paths", NULL},
-               {"credentials", 'c', POPT_ARG_NONE, &credentials, 0, "credentials (user%password)", NULL},
+               {"credentials", 'c', POPT_ARG_STRING, &credentials, 0, "credentials (user%password)", NULL},
                {"no-values", 'V', POPT_ARG_NONE, &no_values, 0, "don't show values", NULL},
                POPT_TABLEEND
        };
@@ -86,7 +86,7 @@ int main (int argc, char **argv)
 
        error = reg_open(backend, poptPeekArg(pc), credentials, &h);
        if(!W_ERROR_IS_OK(error)) {
-               fprintf(stderr, "Unable to open '%s' with backend '%s'\n", poptGetArg(pc), backend);
+               fprintf(stderr, "Unable to open '%s' with backend '%s':%s \n", poptGetArg(pc), backend, win_errstr(error));
                return 1;
        }
        poptFreeContext(pc);