1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

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 5f47bf1187)
This commit is contained in:
Jelmer Vernooij 2004-11-01 23:35:15 +00:00 committed by Gerald (Jerry) Carter
parent 284349482f
commit 75b2790da8

View File

@ -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;
}