p->default_auth_state = auth;
- /*
- * For now we only support NDR32.
- */
- p->preferred_transfer = &ndr_transfer_syntax_ndr;
+ p->preferred_transfer = dce_ctx->preferred_transfer;
*_p = p;
return NT_STATUS_OK;
context->context_id = ctx->context_id;
context->iface = iface;
context->transfer_syntax = *selected_transfer;
+ context->ndr64 = ndr_syntax_id_equal(&context->transfer_syntax,
+ &ndr_transfer_syntax_ndr64);
DLIST_ADD(call->conn->contexts, context);
call->context = context;
talloc_set_destructor(context, dcesrv_connection_context_destructor);
return dcesrv_fault(call, faultcode);
}
+ if (call->context->ndr64) {
+ call->ndr_pull->flags |= LIBNDR_FLAG_NDR64;
+ }
+
/* unravel the NDR for the packet */
status = call->context->iface->ndr_pull(call, call, pull, &call->r);
if (!NT_STATUS_IS_OK(status)) {
dce_ctx->broken_connections = NULL;
dce_ctx->callbacks = cb;
+ /*
+ * For now we only support NDR32.
+ */
+ dce_ctx->preferred_transfer = &ndr_transfer_syntax_ndr;
+
*_dce_ctx = dce_ctx;
return NT_STATUS_OK;
}
/* the negotiated transfer syntax */
struct ndr_syntax_id transfer_syntax;
+ bool ndr64;
};
struct dcesrv_connection *broken_connections;
+ /*
+ * Our preferred transfer syntax.
+ */
+ const struct ndr_syntax_id *preferred_transfer;
+
struct dcesrv_context_callbacks *callbacks;
};
push->flags |= LIBNDR_FLAG_BIGENDIAN;
}
+ if (context->ndr64) {
+ push->flags |= LIBNDR_FLAG_NDR64;
+ }
+
status = context->iface->ndr_push(call, call, push, call->r);
if (!NT_STATUS_IS_OK(status)) {
return dcesrv_fault(call, call->fault_code);