1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +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 commit is contained in:
Jelmer Vernooij 2004-11-01 23:35:15 +00:00 committed by Gerald (Jerry) Carter
parent 2e25c71853
commit 5f47bf1187

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