$self->pidl("static NTSTATUS $name\__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)");
$self->pidl("{");
$self->indent();
- $self->pidl("struct pipes_struct *p = NULL;");
- $self->pidl("");
- $self->pidl("/* Retrieve pipes struct */");
- $self->pidl("p = dcesrv_get_pipes_struct(context->conn);");
- $self->pidl("p->pipe_bound = true;");
$self->pidlnoindent("#ifdef DCESRV_INTERFACE_$uname\_BIND");
$self->pidl("return DCESRV_INTERFACE_$uname\_BIND(context,iface);");
$self->pidlnoindent("#else");
if (lp_restrict_anonymous() > 0) {
+ struct dcesrv_call_state *dce_call = p->dce_call;
+ struct dcesrv_auth *auth_state = dce_call->auth_state;
+ enum dcerpc_AuthType auth_type = DCERPC_AUTH_TYPE_NONE;
+
+ if (!auth_state->auth_finished) {
+ return false;
+ }
+
+ dcesrv_call_auth_info(dce_call, &auth_type, NULL);
+
/* schannel, so we must be ok */
- if (p->pipe_bound &&
- (p->auth.auth_type == DCERPC_AUTH_TYPE_SCHANNEL)) {
+ if (auth_type == DCERPC_AUTH_TYPE_SCHANNEL) {
return True;
}
struct pipe_auth_data auth;
- /*
- * Set to true when an RPC bind has been done on this pipe.
- */
- bool pipe_bound;
-
/*
* Set the DCERPC_FAULT to return.
*/
/* iremotewinspool - dcerpc server boilerplate generated by pidl */
static NTSTATUS iremotewinspool__op_bind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
{
- struct pipes_struct *p = NULL;
-
- /* Retrieve pipes struct */
- p = dcesrv_get_pipes_struct(context->conn);
- p->pipe_bound = true;
#ifdef DCESRV_INTERFACE_IREMOTEWINSPOOL_BIND
return DCESRV_INTERFACE_IREMOTEWINSPOOL_BIND(context,iface);
#else