From 75b2790da896dee22e638bcc760d26c5064a9b3c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 1 Nov 2004 23:35:15 +0000 Subject: r3444: Don't use random data as endpoint if no default endpoint is known and no endpoint was specified for ncacn_np. (This used to be commit 5f47bf1187fbd07fd8eb88da2a1fea2b0e9addf8) --- source4/librpc/rpc/dcerpc_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source4/librpc/rpc/dcerpc_util.c') diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index 638b2e1c55..db30354609 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -749,7 +749,7 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **p, NTSTATUS status; BOOL retry; struct smbcli_state *cli; - const char *pipe_name; + const char *pipe_name = NULL; TALLOC_CTX *mem_ctx = talloc_init("dcerpc_pipe_connect_ncacn_np"); if (!binding->endpoint) { @@ -773,6 +773,11 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **p, } } + + if (pipe_name == NULL) { + DEBUG(0, ("No default named pipe specified for interface with UUID %s\n", pipe_uuid)); + return NT_STATUS_OBJECT_NAME_NOT_FOUND; + } } else { pipe_name = binding->endpoint; } -- cgit