diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-05-01 18:19:34 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-09-18 20:34:43 +0200 |
commit | f0704f5abcec0317afd0dae29c096498206b1136 (patch) | |
tree | 6c6d4951a0c48e0284314ceb18e2418d5ab26d5e | |
parent | d0e73ab534831a6c57f21a472ef90afffa575e3a (diff) | |
download | samba-f0704f5abcec0317afd0dae29c096498206b1136.tar.gz samba-f0704f5abcec0317afd0dae29c096498206b1136.tar.bz2 samba-f0704f5abcec0317afd0dae29c096498206b1136.zip |
s4:torture: the spoolss notify test should listen on the ncacn_np endpoint
metze
-rw-r--r-- | source4/torture/rpc/spoolss_notify.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/torture/rpc/spoolss_notify.c b/source4/torture/rpc/spoolss_notify.c index 0bfd3be812..60f1175f27 100644 --- a/source4/torture/rpc/spoolss_notify.c +++ b/source4/torture/rpc/spoolss_notify.c @@ -20,10 +20,12 @@ */ #include "includes.h" +#include "system/filesys.h" #include "torture/torture.h" #include "torture/rpc/rpc.h" #include "librpc/gen_ndr/ndr_spoolss_c.h" #include "rpc_server/dcerpc_server.h" +#include "rpc_server/service_rpc.h" #include "lib/events/events.h" #include "smbd/process_model.h" #include "smb_server/smb_server.h" @@ -191,6 +193,7 @@ static bool test_RFFPCNEx(struct torture_context *tctx, NTSTATUS status; struct dcesrv_context *dce_ctx; const char *endpoints[] = { "spoolss", NULL }; + struct dcesrv_endpoint *e; struct spoolss_NotifyOption t1; struct spoolss_ClosePrinter cp; @@ -244,6 +247,23 @@ static bool test_RFFPCNEx(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "unable to initialize DCE/RPC server"); + /* Make sure the directory for NCALRPC exists */ + if (!directory_exist(lp_ncalrpc_dir(tctx->lp_ctx))) { + int ret; + ret = mkdir(lp_ncalrpc_dir(tctx->lp_ctx), 0755); + torture_assert(tctx, (ret == 0), talloc_asprintf(tctx, + "failed to mkdir(%s) ret[%d] errno[%d - %s]", + lp_ncalrpc_dir(tctx->lp_ctx), ret, + errno, strerror(errno))); + } + + for (e=dce_ctx->endpoint_list;e;e=e->next) { + status = dcesrv_add_ep(dce_ctx, tctx->lp_ctx, + e, tctx->ev, &single_ops); + torture_assert_ntstatus_ok(tctx, status, + "unable listen on dcerpc endpoint server"); + } + r.in.flags = 0; r.in.local_machine = talloc_asprintf(tctx, "\\\\%s", address); r.in.options = 0; |