summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_smb.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-09-17 09:09:48 -0700
committerAndrew Tridgell <tridge@samba.org>2009-09-17 15:19:27 -0700
commitc9b0b89cc06531cb57f89b9f98d33d6e0c300957 (patch)
treee09108a31dae6fa1cef5b7337a6ff1233d3a0443 /source4/librpc/rpc/dcerpc_smb.c
parent056cbf7f816a6d01bc0ef3105eca43b4aeee9116 (diff)
downloadsamba-c9b0b89cc06531cb57f89b9f98d33d6e0c300957.tar.gz
samba-c9b0b89cc06531cb57f89b9f98d33d6e0c300957.tar.bz2
samba-c9b0b89cc06531cb57f89b9f98d33d6e0c300957.zip
s4-rpc: added NDR64 support
This adds support for the nd464 binding string option
Diffstat (limited to 'source4/librpc/rpc/dcerpc_smb.c')
-rw-r--r--source4/librpc/rpc/dcerpc_smb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/librpc/rpc/dcerpc_smb.c b/source4/librpc/rpc/dcerpc_smb.c
index 8b221747ac..f4e6b8c3dd 100644
--- a/source4/librpc/rpc/dcerpc_smb.c
+++ b/source4/librpc/rpc/dcerpc_smb.c
@@ -325,7 +325,7 @@ static NTSTATUS smb_send_request(struct dcerpc_connection *c, DATA_BLOB *blob,
union smb_write io;
struct smbcli_request *req;
- if (smb->dead) {
+ if (!smb || smb->dead) {
return NT_STATUS_CONNECTION_DISCONNECTED;
}
@@ -388,6 +388,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status)
}
talloc_free(smb);
+ c->transport.private_data = NULL;
return status;
}
@@ -398,6 +399,7 @@ static NTSTATUS smb_shutdown_pipe(struct dcerpc_connection *c, NTSTATUS status)
static const char *smb_peer_name(struct dcerpc_connection *c)
{
struct smb_private *smb = (struct smb_private *)c->transport.private_data;
+ if (smb == NULL) return "";
return smb->server_name;
}
@@ -407,6 +409,7 @@ static const char *smb_peer_name(struct dcerpc_connection *c)
static const char *smb_target_hostname(struct dcerpc_connection *c)
{
struct smb_private *smb = talloc_get_type(c->transport.private_data, struct smb_private);
+ if (smb == NULL) return "";
return smb->tree->session->transport->socket->hostname;
}
@@ -417,6 +420,7 @@ static NTSTATUS smb_session_key(struct dcerpc_connection *c, DATA_BLOB *session_
{
struct smb_private *smb = (struct smb_private *)c->transport.private_data;
+ if (smb == NULL) return NT_STATUS_CONNECTION_DISCONNECTED;
if (smb->tree->session->user_session_key.data) {
*session_key = smb->tree->session->user_session_key;
return NT_STATUS_OK;