summaryrefslogtreecommitdiff
path: root/source4/lib/registry
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-24 16:31:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:02:28 -0500
commitb9956de1b1319f1869efa79d76674484b7f41166 (patch)
treea23791b99bab84aec03fb24077572fb4da79fa0f /source4/lib/registry
parent78e5bc76b602f9ccf49e2f139cbd1f20b458def4 (diff)
downloadsamba-b9956de1b1319f1869efa79d76674484b7f41166.tar.gz
samba-b9956de1b1319f1869efa79d76674484b7f41166.tar.bz2
samba-b9956de1b1319f1869efa79d76674484b7f41166.zip
r3164: Look up ncalrpc identifiers using the EPMAPPER. ncalrpc now works nicely :-)
The various interface that support ncalrpc work nicely when tested with smbtorture and ncalrpc. Running RPC-SAMR against local smbd here is slightly faster using ncalrpc: ncalrpc: 1.8 sec ncacn_ip_tcp: 1.9 sec ncacn_np: 2.5 sec (This used to be commit 2cfc8f24ce209f47153d3a5bd7007dd1b0578b26)
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, '%');