diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-03 13:13:25 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:03:39 -0500 |
commit | 8e2d624a588552f5d06f21fe37281615f3ec6296 (patch) | |
tree | 72d45a64cf0e3defd2537fb08596df58233d90be /source4/librpc | |
parent | 6a92d816a7dc97b8ca8a1b2419c31515add5ac87 (diff) | |
download | samba-8e2d624a588552f5d06f21fe37281615f3ec6296.tar.gz samba-8e2d624a588552f5d06f21fe37281615f3ec6296.tar.bz2 samba-8e2d624a588552f5d06f21fe37281615f3ec6296.zip |
r24937: Merge tests spoolss RPC callbacks.
(This used to be commit 9b256a0ca232ea6e89771bf73a1adf877273a752)
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/rpc/dcerpc_connect.c | 5 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_smb.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index be95f21594..bd05498aed 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -110,7 +110,10 @@ static struct composite_context *dcerpc_pipe_connect_ncacn_np_smb_send(TALLOC_CT remote rpc server */ conn->in.dest_host = s->io.binding->host; conn->in.port = 0; - conn->in.called_name = s->io.binding->target_hostname; + if (s->io.binding->target_hostname == NULL) + conn->in.called_name = "*SMBSERVER"; + else + conn->in.called_name = s->io.binding->target_hostname; conn->in.service = "IPC$"; conn->in.service_type = NULL; conn->in.workgroup = lp_workgroup(); diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c index 6b43de3358..5064e998dd 100644 --- a/source4/librpc/rpc/dcerpc_smb.c +++ b/source4/librpc/rpc/dcerpc_smb.c @@ -430,7 +430,9 @@ struct composite_context *dcerpc_pipe_open_smb_send(struct dcerpc_pipe *p, /* if we don't have a binding on this pipe yet, then create one */ if (p->binding == NULL) { NTSTATUS status; - char *s = talloc_asprintf(p, "ncacn_np:%s", tree->session->transport->socket->hostname); + char *s; + SMB_ASSERT(tree->session->transport->socket->hostname != NULL); + s = talloc_asprintf(p, "ncacn_np:%s", tree->session->transport->socket->hostname); if (s == NULL) return NULL; status = dcerpc_parse_binding(p, s, &p->binding); talloc_free(s); |