summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/spoolss_notify.c
Commit message (Collapse)AuthorAgeFilesLines
* s4:rpc_server: Fix duplicated function name between s3 and s4Samuel Cabrero2022-04-081-1/+1
| | | | | | | | | | It can lead to link errors: /usr/lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/bin/ld: source3/rpc_server/rpc_server.c.24.o: in function `dcesrv_assoc_group_find': /home/scabrero/workspace/samba/samba/bin/default/../../source3/rpc_server/rpc_server.c:229: multiple definition of `dcesrv_assoc_group_find'; source4/rpc_server/dcerpc_server.c.5.o:/home/scabrero/workspace/samba/samba/bin/default/../../source4/rpc_server/dcerpc_server.c:121: first defined here Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Make srv_cb staticVolker Lendecke2021-03-161-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Fix a gcc qualifier ordering warningVolker Lendecke2021-01-221-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jan 22 21:07:57 UTC 2021 on sn-devel-184
* torture: Align integer typesVolker Lendecke2021-01-221-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4: rename source4/smbd/ to source4/samba/Ralph Boehme2020-11-271-1/+1
| | | | | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Fri Nov 27 10:07:18 UTC 2020 on sn-devel-184
* pidl:NDR/Server: Allow to define endpoint server shutdown functionsSamuel Cabrero2019-12-121-0/+7
| | | | | | | | | | | | | | The next commits will register legacy api_struct when the endpoint server is initialized. This commit adds a shutdown function which will be used to unregister the legacy api_struct. The shutdown function will be also used to replace the rpc_srv_callbacks struct shutdown member used, for example, by the spoolss service to cleanup before exiting. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc:core: Add public functions to initialize endpoint serversSamuel Cabrero2019-12-121-0/+2
| | | | | | | | | | | | | | | The dcesrv_init_registered_ep_servers() will be used by the S3 server to initialize all registered endpoint servers (for embedded services), and the dcesrv_init_ep_server() function will be used by the external daemons to initialize the required ones. As serveral S3 services may require to initialize another one before itself (svcctl and eventlog for example require winreg) a boolean flag is added to track the initialization status. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc:core: Split dcesrv context init and endpoint servers initSamuel Cabrero2019-12-121-2/+6
| | | | | | | | | | The S4 server will initialize the endpoint servers specified in smb.conf, but the S3 server need to initialize all registered endpoint servers (the embedded ones). Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* librpc: Unify packet dumping on ndr_pull() failureAndrew Bartlett2019-11-201-6/+0
| | | | | | | | | | | | | | | | There were two duplicate implementations of packet dumping just for the s4 RPC server! This unifies them and makes them easier to find because they are not triggered from the generated server stub any more. The behaviour have unified on setting "dcesrv:stubs directory" and being compiled with --enable-developer. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Nov 20 02:14:56 UTC 2019 on sn-devel-184
* s4:rpc_server: Find association groups through context callbacksSamuel Cabrero2019-10-181-0/+1
| | | | | | | | | Split the association group management from the server code, the s3 and s4 implementation will handle differently. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:rpc_server: Hide gensec prepare behind function pointerSamuel Cabrero2019-10-181-0/+1
| | | | | | | | This function will be different for s3 and s4 Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:rpc_server: Add dcesrv_context_callbacks to dcesrv_contextSamuel Cabrero2019-10-181-1/+7
| | | | | | | | | | | | Add a new struct dcesrv_context_callbacks in dcesrv_context to hold pointers to functions whose implementation will differ between S3 and S4. The log_successful_dcesrv_authz_event implementation will differ as it requires an imessaging_context. Signed-off-by: Samuel Cabrero <scabrero@suse.de> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4:rpc_server: make it possible to specify ncacn_np_secondary_endpointStefan Metzmacher2019-01-121-1/+5
| | | | | | | | | | | Even a connect to \\pipe\lsarpc should return a secondary_address of '\\pipe\\lsass'. But that will be implemented in a following commit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:rpc_server: only pass context to op_bind() hooksStefan Metzmacher2019-01-121-3/+2
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113 BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: remove spurious semicolonUri Simchoni2017-11-221-1/+2
| | | | | Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* source4/smbd: refactor the process model for preforkGary Lockyer2017-10-191-2/+5
| | | | | | | | | | | | | | | | | | Refactor the process model code to allow the addition of a prefork process model. - Add a process context to contain process model specific state - Add a service details structure to allow service to indicate which process model options they can support. In the new code the services advertise the features they support to the process model. The process model context is plumbed through to allow the process model to keep track of the supported options, and any state the process model may require. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4: torture: Remove the last talloc_autofree_context() from source4/torture/*.cJeremy Allison2017-05-051-3/+18
| | | | | | | | | | | | Allocate the saved packets off the NULL context instead, and use a new function free_received_packets() to clear out the received_packets list. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 5 19:47:50 CEST 2017 on sn-devel-144
* spoolss: Use correct values for secdesc and devmode pointersGünther Deschner2016-11-111-2/+2
| | | | | | | | | | | | | | ULONG_PTR needs to be decoded as a uint3264 and not as a 'uint32 *'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11197 Guenther Pair-Programmed-With: Andreas Schneider <asn@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* dlist: remove unneeded type argument from DLIST_ADD_END()Michael Adam2016-02-061-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture/rpc: remove compiler warnings in spoolss_notify.cStefan Metzmacher2014-01-161-1/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4:torture/rpc: avoid usage of p->conn->event_ctxStefan Metzmacher2014-01-161-1/+1
| | | | | | | | | | | torture_suite_add_rpc_iface_tcase() uses tctx->ev, which means p->conn->event_ctx and tctx->ev are the same. As we want to get rid of per connection tevent_context pointers, we should use tctx->ev. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.Günther Deschner2013-01-171-2/+2
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-smbtorture: rework the spoolss notify test a bit.Günther Deschner2011-06-211-16/+15
| | | | Guenther
* s4-smbtorture: use ipv4 addresses for backchannel spoolss change notifyGünther Deschner2011-06-211-1/+1
| | | | | | connections for now. Guenther
* s4-ipv6: update callers to load_interface_list()Andrew Tridgell2011-06-061-1/+1
|
* s4-interfaces Rename interfaces code so not to conflict with source3/Andrew Bartlett2011-05-081-2/+2
| | | | | | | | | The iface_count, iface_n_bcast, and load_interfaces functions conflicted with functions of the same name in source3, so the source4 functions were renamed. Hopefully we can actually wrap one around the other in future. Andrew Bartlett
* s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij2010-12-111-1/+1
| | | | | | | | This is consistent with the test names used by selftest, should make the names less confusing and easier to integrate with other tools. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
* s4-server: make server sockets a child of the task contextAndrew Tridgell2010-11-151-1/+1
| | | | | | | | | | | | We previously allocated sockets as direct children of the event context. That led to crashes if a service called task_server_terminate(), as it left the socket open and handling events for a dead protocol. Making them a child of the task allows the task to terminate and take all its sockets with it. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* s4-smbd: initialise process models in smbtorture before useAndrew Tridgell2010-10-301-0/+4
| | | | | | | the spoolss notify test needs to setup the process models before use Autobuild-User: Andrew Tridgell <tridge@samba.org> Autobuild-Date: Sat Oct 30 13:32:09 UTC 2010 on sn-devel-104
* s4-smbd: don't initialise process models more than onceAndrew Tridgell2010-10-301-2/+2
| | | | | | | | | this also removes the event_context parameter from process model initialisation. It isn't needed, and is confusing when a process model init can be called from more than one place, possibly with different event contexts. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
* Revert "s4:RPC-SPOOLSS-NOTIFY: skip test_RFFPCNEx() for now, as the test is ↵Günther Deschner2010-08-161-9/+0
| | | | | | broken" This reverts commit 8ca8250443319e0f19f05aab2014118fd03eaa8a.
* s4:RPC-SPOOLSS-NOTIFY: skip test_RFFPCNEx() for now, as the test is brokenStefan Metzmacher2010-08-081-0/+9
| | | | | | See https://bugzilla.samba.org/show_bug.cgi?id=7486. metze
* s4-loadparm: 2nd half of lp_ to lpcfg_ conversionAndrew Tridgell2010-07-161-2/+2
| | | | | | | this converts all callers that use the Samba4 loadparm lp_ calling convention to use the lpcfg_ prefix. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
* s4-smbtorture: remove another incarnation of test_ClosePrinter.Günther Deschner2010-06-051-19/+0
| | | | | | This should fix the build; why waf didn't catch that durint make bin/smbtorture4 ? Guenther
* s4-smbtorture: print local_machine name in ↵Günther Deschner2010-05-201-2/+3
| | | | | | RemoteFindFirstPrinterChangeNotifyEx test. Guenther
* s4:torture/rpc: rename rpc.h => torture_rpc.hStefan Metzmacher2010-04-141-1/+1
| | | | | | | | | | | The reason for this is that some systems include <rpc/rpc.h> from within system headers. HP-UX 11.00 does so somewhere deep inside of <shadow.h>. For torture/winbind/struct_based.c <rpc/rpc.h> resolves to torture/rpc/rpc.h and breaks the build. metze
* s4:torture/rpc/spoolss_notify.c: make use of dcerpc_binding_handle stubsStefan Metzmacher2010-03-161-15/+19
| | | | metze
* s4:torture/rpc/spoolss_notify.c: fix compiler warningsStefan Metzmacher2010-03-161-1/+5
| | | | metze
* s4-smbtorture: use test_GetPrinter_level in RPC-SPOOLSS-NOTIFY.Günther Deschner2010-02-101-39/+21
| | | | Guenther
* s4-smbtorture: check for RouterReplyPrinterEx packets inside backchannel in ↵Günther Deschner2010-01-311-6/+147
| | | | | | RPC-SPOOLSS-NOTIFY. Guenther
* s4-smbtorture: also test RouterRefreshPrinterChangeNotify call in ↵Günther Deschner2010-01-311-0/+25
| | | | | | RPC-SPOOLSS-NOTIFY. Guenther
* s4-smbtorture: rework spoolss_NotifyOption handling in RPC-SPOOLSS-NOTIFY.Günther Deschner2010-01-311-19/+31
| | | | Guenther
* s4-smbtorture: pick correct last packet while checking backchannel replies ↵Günther Deschner2010-01-271-2/+10
| | | | | | in RPC-SPOOLSS-NOTIFY. Guenther
* s4-smbtorture: split spoolss_RemoteFindFirstPrinterChangeNotifyEx test into ↵Günther Deschner2010-01-251-73/+108
| | | | | | smaller parts. Guenther
* s4-smbtorture: remove unneeded ncaclrpc dir setup from RPC-SPOOLSS-NOTIFY.Günther Deschner2010-01-191-10/+0
| | | | Guenther
* s4-smbtorture: support spoolss_ReplyClosePrinter server call in ↵Günther Deschner2010-01-191-2/+36
| | | | | | | | | RPC-SPOOLSS-NOTIFY. A handle obtained with spoolss_ReplyOpenPrinter will be closed with spoolss_ReplyClosePrinter when we call spoolss_ClosePrinter on the remote side. Guenther
* s4-smbtorture: restructure spoolss server implementations in RPC-SPOOLSS-NOTIFY.Günther Deschner2010-01-191-1/+19
| | | | Guenther
* s4-smbtorture: skip ReplyOpenPrinter test in RPC-SPOOLSS-NOTIFY while ↵Günther Deschner2010-01-191-0/+4
| | | | | | testing s3. Guenther
* s4-smbtorture: strip trailing whitespace.Günther Deschner2010-01-191-12/+12
| | | | Guenther
* s4-torture: ran minimal_includes.pl over source4/tortureAndrew Tridgell2009-10-201-4/+0
| | | | This reduces compile time somewhat.