summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/ipc/ipc_rap.c11
-rw-r--r--source4/ntvfs/ipc/rap_server.c3
-rw-r--r--source4/ntvfs/ipc/vfs_ipc.c2
3 files changed, 11 insertions, 5 deletions
diff --git a/source4/ntvfs/ipc/ipc_rap.c b/source4/ntvfs/ipc/ipc_rap.c
index faf48705c4..4969f1a791 100644
--- a/source4/ntvfs/ipc/ipc_rap.c
+++ b/source4/ntvfs/ipc/ipc_rap.c
@@ -21,6 +21,7 @@
#include "includes.h"
#include "libcli/raw/interfaces.h"
#include "libcli/rap/rap.h"
+#include "events/events.h"
#include "ntvfs/ipc/proto.h"
#include "librpc/ndr/libndr.h"
#include "param/param.h"
@@ -100,11 +101,14 @@ struct rap_call {
struct ndr_pull *ndr_pull_param;
struct ndr_pull *ndr_pull_data;
+
+ struct event_context *event_ctx;
};
#define RAPNDR_FLAGS (LIBNDR_FLAG_NOALIGN|LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
+ struct event_context *ev_ctx,
struct loadparm_context *lp_ctx,
struct smb_trans2 *trans)
{
@@ -118,6 +122,7 @@ static struct rap_call *new_rap_srv_call(TALLOC_CTX *mem_ctx,
ZERO_STRUCTP(call);
call->lp_ctx = talloc_reference(call, lp_ctx);
+ call->event_ctx = ev_ctx;
call->mem_ctx = mem_ctx;
@@ -271,7 +276,7 @@ static NTSTATUS _rap_netshareenum(struct rap_call *call)
break;
}
- result = rap_netshareenum(call, call->lp_ctx, &r);
+ result = rap_netshareenum(call, call->event_ctx, call->lp_ctx, &r);
if (!NT_STATUS_IS_OK(result))
return result;
@@ -430,7 +435,7 @@ static const struct
{NULL, -1, api_Unsupported}
};
-NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
+NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct event_context *event_ctx, struct loadparm_context *lp_ctx,
struct smb_trans2 *trans)
{
int i;
@@ -440,7 +445,7 @@ NTSTATUS ipc_rap_call(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
struct ndr_push *final_param;
struct ndr_push *final_data;
- call = new_rap_srv_call(mem_ctx, lp_ctx, trans);
+ call = new_rap_srv_call(mem_ctx, event_ctx, lp_ctx, trans);
if (call == NULL)
return NT_STATUS_NO_MEMORY;
diff --git a/source4/ntvfs/ipc/rap_server.c b/source4/ntvfs/ipc/rap_server.c
index 633f0bf36e..d9fb7e21b2 100644
--- a/source4/ntvfs/ipc/rap_server.c
+++ b/source4/ntvfs/ipc/rap_server.c
@@ -29,6 +29,7 @@
* idea. */
NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
+ struct event_context *event_ctx,
struct loadparm_context *lp_ctx,
struct rap_NetShareEnum *r)
{
@@ -42,7 +43,7 @@ NTSTATUS rap_netshareenum(TALLOC_CTX *mem_ctx,
r->out.available = 0;
r->out.info = NULL;
- nterr = share_get_context_by_name(mem_ctx, lp_share_backend(lp_ctx), lp_ctx, &sctx);
+ nterr = share_get_context_by_name(mem_ctx, lp_share_backend(lp_ctx), event_ctx, lp_ctx, &sctx);
if (!NT_STATUS_IS_OK(nterr)) {
return nterr;
}
diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 92f0eadae1..ea7b54ae6a 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -805,7 +805,7 @@ static NTSTATUS ipc_trans(struct ntvfs_module_context *ntvfs,
NTSTATUS status;
if (strequal(trans->in.trans_name, "\\PIPE\\LANMAN"))
- return ipc_rap_call(req, ntvfs->ctx->lp_ctx, trans);
+ return ipc_rap_call(req, ntvfs->ctx->event_ctx, ntvfs->ctx->lp_ctx, trans);
if (trans->in.setup_count != 2) {
return NT_STATUS_INVALID_PARAMETER;