summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/registry')
-rw-r--r--source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
index fd81983227..c819eb4254 100644
--- a/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
+++ b/source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c
@@ -105,7 +105,12 @@ static WERROR rpc_open_hive(TALLOC_CTX *mem_ctx, struct registry_hive *h, struct
struct dcerpc_pipe *p;
int n;
- if(!h->credentials || !h->location) return WERR_INVALID_PARAM;
+ if (!h->credentials) return WERR_INVALID_PARAM;
+
+ /* Default to local smbd if no connection is specified */
+ if (!h->location) {
+ h->location = talloc_strdup(mem_ctx, "ncalrpc:");
+ }
user = talloc_strdup(mem_ctx, h->credentials);
pass = strchr(user, '%');