diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-11-01 23:35:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:05:12 -0500 |
commit | 75b2790da896dee22e638bcc760d26c5064a9b3c (patch) | |
tree | a9c1bdd4f27f5426dd823fb278134249e1c74ecc /source4/librpc/rpc/dcerpc_util.c | |
parent | 284349482f5293a9a23d0f72d7c2aab46b55843b (diff) | |
download | samba-75b2790da896dee22e638bcc760d26c5064a9b3c.tar.gz samba-75b2790da896dee22e638bcc760d26c5064a9b3c.tar.bz2 samba-75b2790da896dee22e638bcc760d26c5064a9b3c.zip |
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)
Diffstat (limited to 'source4/librpc/rpc/dcerpc_util.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |