tevent_req_data(req,
struct dcerpc_bind_state);
struct dcecli_connection *conn = state->p->conn;
+ struct dcerpc_binding *b = NULL;
NTSTATUS status;
uint32_t flags;
}
}
-
- status = dcerpc_binding_set_assoc_group_id(state->p->binding,
- pkt->u.bind_ack.assoc_group_id);
+ /*
+ * We're the owner of the binding, so we're allowed to modify it.
+ */
+ b = discard_const_p(struct dcerpc_binding, state->p->binding);
+ status = dcerpc_binding_set_assoc_group_id(b,
+ pkt->u.bind_ack.assoc_group_id);
if (tevent_req_nterror(req, status)) {
return;
}
struct ndr_syntax_id transfer_syntax;
struct dcecli_connection *conn;
- struct dcerpc_binding *binding;
+ const struct dcerpc_binding *binding;
/** the last fault code from a DCERPC fault */
uint32_t last_fault_code;
/* if we don't have a binding on this pipe yet, then create one */
if (p->binding == NULL) {
+ struct dcerpc_binding *b;
NTSTATUS status;
const char *r = smbXcli_conn_remote_name(conn);
char *str;
if (str == NULL) {
return NT_STATUS_NO_MEMORY;
}
- status = dcerpc_parse_binding(p, str,
- &p->binding);
+ status = dcerpc_parse_binding(p, str, &b);
talloc_free(str);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
+ p->binding = b;
}
ctx = dcerpc_pipe_open_smb_send(p->conn,
/* if we don't have a binding on this pipe yet, then create one */
if (p->binding == NULL) {
+ struct dcerpc_binding *b;
NTSTATUS status;
const char *r = smbXcli_conn_remote_name(conn);
char *str;
if (str == NULL) {
return NT_STATUS_NO_MEMORY;
}
- status = dcerpc_parse_binding(p, str,
- &p->binding);
+ status = dcerpc_parse_binding(p, str, &b);
talloc_free(str);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
+ p->binding = b;
}
ctx = dcerpc_pipe_open_smb_send(p->conn,