From b9956de1b1319f1869efa79d76674484b7f41166 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 24 Oct 2004 16:31:00 +0000 Subject: 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) --- source4/lib/registry/reg_backend_rpc/reg_backend_rpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/lib/registry') 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, '%'); -- cgit