static NTSTATUS dcesrv_interface_samr_bind(struct dcesrv_call_state *dce_call,
const struct dcesrv_interface *iface)
{
- return dcesrv_interface_bind_reject_connect(dce_call, iface);
+ struct dcesrv_connection_context *context = dce_call->context;
+ return dcesrv_interface_bind_reject_connect(context, iface);
}
/* these query macros make samr_Query[User|Group|Alias]Info a bit easier to read */
}
- handle = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_CONNECT);
+ handle = dcesrv_handle_create(dce_call, SAMR_HANDLE_CONNECT);
if (!handle) {
talloc_free(c_state);
return NT_STATUS_NO_MEMORY;
initialize_guid_cache(&d_state->guid_caches[i]);
}
- h_domain = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_DOMAIN);
+ h_domain = dcesrv_handle_create(dce_call, SAMR_HANDLE_DOMAIN);
if (!h_domain) {
talloc_free(d_state);
return NT_STATUS_NO_MEMORY;
a_state->account_name = talloc_steal(a_state, groupname);
/* create the policy handle */
- g_handle = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_GROUP);
+ g_handle = dcesrv_handle_create(dce_call, SAMR_HANDLE_GROUP);
if (!g_handle) {
return NT_STATUS_NO_MEMORY;
}
}
/* create the policy handle */
- u_handle = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_USER);
+ u_handle = dcesrv_handle_create(dce_call, SAMR_HANDLE_USER);
if (!u_handle) {
return NT_STATUS_NO_MEMORY;
}
a_state->account_name = talloc_steal(a_state, alias_name);
/* create the policy handle */
- a_handle = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_ALIAS);
+ a_handle = dcesrv_handle_create(dce_call, SAMR_HANDLE_ALIAS);
if (a_handle == NULL)
return NT_STATUS_NO_MEMORY;
}
/* create the policy handle */
- g_handle = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_GROUP);
+ g_handle = dcesrv_handle_create(dce_call, SAMR_HANDLE_GROUP);
if (!g_handle) {
return NT_STATUS_NO_MEMORY;
}
}
/* create the policy handle */
- g_handle = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_ALIAS);
+ g_handle = dcesrv_handle_create(dce_call, SAMR_HANDLE_ALIAS);
if (!g_handle) {
return NT_STATUS_NO_MEMORY;
}
}
/* create the policy handle */
- u_handle = dcesrv_handle_new(dce_call->context, SAMR_HANDLE_USER);
+ u_handle = dcesrv_handle_create(dce_call, SAMR_HANDLE_USER);
if (!u_handle) {
return NT_STATUS_NO_MEMORY;
}
NTSTATUS status;
enum dcerpc_transport_t transport =
dcerpc_binding_get_transport(dce_call->conn->endpoint->ep_description);
+ enum dcerpc_AuthLevel auth_level = DCERPC_AUTH_LEVEL_NONE;
if (transport != NCACN_IP_TCP && transport != NCALRPC) {
DCESRV_FAULT(DCERPC_FAULT_ACCESS_DENIED);
}
- if (dce_call->conn->auth_state.auth_level != DCERPC_AUTH_LEVEL_PRIVACY) {
+ dcesrv_call_auth_info(dce_call, NULL, &auth_level);
+ if (auth_level != DCERPC_AUTH_LEVEL_PRIVACY) {
DCESRV_FAULT(DCERPC_FAULT_ACCESS_DENIED);
}