{"padcheck", DCERPC_DEBUG_PAD_CHECK},
{"bigendian", DCERPC_PUSH_BIGENDIAN},
{"smb2", DCERPC_SMB2},
- {"hdrsign", DCERPC_HEADER_SIGNING}
+ {"hdrsign", DCERPC_HEADER_SIGNING},
+ {"ndr64", DCERPC_NDR64}
};
const char *epm_floor_string(TALLOC_CTX *mem_ctx, struct epm_floor *epm_floor)
ndr->flags |= LIBNDR_FLAG_REF_ALLOC;
}
+ if (c->flags & DCERPC_NDR64) {
+ ndr->flags |= LIBNDR_FLAG_NDR64;
+ }
+
return ndr;
}
ndr->flags |= LIBNDR_FLAG_BIGENDIAN;
}
+ if (c->flags & DCERPC_NDR64) {
+ ndr->flags |= LIBNDR_FLAG_NDR64;
+ }
+
if (pkt->pfc_flags & DCERPC_PFC_FLAG_OBJECT_UUID) {
ndr->flags |= LIBNDR_FLAG_OBJECT_PRESENT;
hdr_size += 16;
push->flags |= LIBNDR_FLAG_BIGENDIAN;
}
+ if (p->conn->flags & DCERPC_NDR64) {
+ push->flags |= LIBNDR_FLAG_NDR64;
+ }
+
/* push the structure into a blob */
ndr_err = call->ndr_push(push, NDR_IN, r);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
/* this triggers the DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN flag in the bind request */
#define DCERPC_HEADER_SIGNING (1<<20)
+/* use NDR64 transport */
+#define DCERPC_NDR64 (1<<21)
+
/* this describes a binding to a particular transport/pipe */
struct dcerpc_binding {
enum dcerpc_transport_t transport;
return the rpc syntax and transfer syntax given the pipe uuid and version
*/
static NTSTATUS dcerpc_init_syntaxes(const struct ndr_interface_table *table,
- struct ndr_syntax_id *syntax,
- struct ndr_syntax_id *transfer_syntax)
+ uint32_t pipe_flags,
+ struct ndr_syntax_id *syntax,
+ struct ndr_syntax_id *transfer_syntax)
{
syntax->uuid = table->syntax_id.uuid;
syntax->if_version = table->syntax_id.if_version;
- *transfer_syntax = ndr_transfer_syntax;
+ if (pipe_flags & DCERPC_NDR64) {
+ *transfer_syntax = ndr64_transfer_syntax;
+ } else {
+ *transfer_syntax = ndr_transfer_syntax;
+ }
return NT_STATUS_OK;
}
c = composite_create(mem_ctx, p->conn->event_ctx);
if (c == NULL) return NULL;
- c->status = dcerpc_init_syntaxes(table,
+ c->status = dcerpc_init_syntaxes(table, p->conn->flags,
&syntax, &transfer_syntax);
if (!NT_STATUS_IS_OK(c->status)) {
DEBUG(2,("Invalid uuid string in "
state->pipe = p;
- c->status = dcerpc_init_syntaxes(table,
+ c->status = dcerpc_init_syntaxes(table, p->conn->flags,
&syntax,
&transfer_syntax);
if (!composite_is_ok(c)) return c;
union smb_write io;
struct smbcli_request *req;
- if (smb->dead) {
+ if (!smb || smb->dead) {
return NT_STATUS_CONNECTION_DISCONNECTED;
}
}
talloc_free(smb);
+ c->transport.private_data = NULL;
return 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;
}
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;
}
{
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;
p2->syntax = table->syntax_id;
- p2->transfer_syntax = ndr_transfer_syntax;
+ p2->transfer_syntax = p->transfer_syntax;
p2->binding = talloc_reference(p2, p->binding);