summaryrefslogtreecommitdiffstats
path: root/source4/torture/rpc/spoolss.c
Commit message (Collapse)AuthorAgeFilesLines
* s4-torture: add print_test_purgeDavid Disseldorp2014-05-221-0/+84
| | | | | | | | | | | This change adds a regression test for print job purging via SetPrinter(SPOOLSS_PRINTER_CONTROL_PURGE). Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu May 22 01:55:39 CEST 2014 on sn-devel-104
* s4:torture/rpc: avoid using dcecli_connection->binding_stringStefan Metzmacher2014-03-251-5/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s4-torture: add some tests for pre-allocated buffers in enumprinterdrivers call.Günther Deschner2014-03-201-0/+10
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: add test_EnumPrinterDrivers_buffers function.Günther Deschner2014-03-201-11/+31
| | | | | | | | | This will allow to test the enumdriver call with pre-allocated buffer. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* torture: Fix a torture crash with -O3Volker Lendecke2014-02-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiled with -O3, smbtorture can crash after the following valgrind trace: ==16944== Conditional jump or move depends on uninitialised value(s) ==16944== at 0x57FFAC3: ndr_push_unique_ptr (ndr_basic.c:730) ==16944== by 0x58CB855: ndr_push_spoolss_SetPrinterInfo (ndr_spoolss.c:7939) ==16944== by 0x58E2F95: ndr_push_spoolss_SetPrinter (ndr_spoolss.c:24724) ==16944== by 0x417C78C: dcerpc_binding_handle_call_send (binding_handle.c:410) ==16944== by 0x417C986: dcerpc_binding_handle_call (binding_handle.c:547) ==16944== by 0x522059C: dcerpc_spoolss_SetPrinter_r (ndr_spoolss_c.c:1722) ==16944== by 0x2853BD: test_sd_set_level (spoolss.c:1248) ==16944== by 0x28F146: test_PrinterInfo_SD (spoolss.c:1962) ==16944== by 0x2A3C31: test_EnumPrinters_old (spoolss.c:6589) ==16944== by 0x41F6D66: internal_torture_run_test.part.0 (torture.c:442) ==16944== by 0x41F711F: torture_run_tcase_restricted (torture.c:758) ==16944== by 0x2018E8: run_matching.isra.1 (smbtorture.c:103) ==16944== by 0x20176B: run_matching.isra.1 (smbtorture.c:95) ==16944== by 0x20176B: run_matching.isra.1 (smbtorture.c:95) ==16944== by 0x201C12: torture_run_named_tests (smbtorture.c:143) ==16944== by 0x202F5B: main (smbtorture.c:661) My assumption is that with optimization gcc makes use of the fact that the structures that this patch moves go out of scope. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Feb 28 21:27:11 CET 2014 on sn-devel-104
* torture: Fix a buffer overrunVolker Lendecke2014-02-281-2/+2
| | | | | | | | | | | In test_EnumPrinterDrivers we go up to driver level 8. In C, this means we are accessing the 9th entry in the following lines: ctx->driver_count[level] = count; ctx->drivers[level] = info; Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4:torture/rpc: fix compiler warnings in spoolss.cStefan Metzmacher2014-02-111-6/+14
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s4-torture: Fix out of bound array access.Andreas Schneider2013-12-061-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s3-torture: Comment out dead code in spoolss test.Andreas Schneider2013-12-061-1/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: Fix some compile warnings in spoolss.Andreas Schneider2013-12-061-5/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4-torture: Make sure handles are correctly initialized.Andreas Schneider2013-12-061-1/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* torture: test printing using "XPS_PASS" datatypeArvid Requate2013-11-211-3/+30
| | | | | | | | | | | | The "XPS_PASS" datatype is used by Windows 8. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10267 Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Nov 21 15:01:30 CET 2013 on sn-devel-104
* s4:torture:spoolss: use smb2_connect() instead of smb2_connet_ext()Michael Adam2013-10-051-12/+11
| | | | | | | | in print_test_smbd: we don't need to pass the previous_session_id. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* torture: support printer publish pending responsesDavid Disseldorp2013-06-031-14/+37
| | | | | | | | | | | | | Windows (tested against 2k8r2) returns WERR_IO_PENDING and DSPRINT_PENDING when a publish or unpublish is requested via setprinter(level=7). Modify the AD printer publishing test to support these responses. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Jun 3 16:06:15 CEST 2013 on sn-devel-104
* torture: add AD printer publishing testDavid Disseldorp2013-06-031-0/+121
| | | | | | | | | This test publishes and unpublishes a printer using setprinter(level=7). Printer info2.attributes and info7.action flags are check at each point to ensure MS-RPRN conformance. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* s4-torture: add simple tests for spoolss_{Add|Delete}PrintProcessor.Günther Deschner2013-05-201-0/+101
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-torture: also deal with "Microsoft XPS Document Writer v4" as default driver.Günther Deschner2013-05-201-1/+12
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-torture: add simple test for spoolss_RpcSendRecvBidiData.Günther Deschner2013-05-201-0/+44
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-torture: add test for spoolss_RpcEnumJobNamedProperties.Günther Deschner2013-05-201-0/+293
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* s4-torture: add missing NTSTATUS checks in test_AddJob().Günther Deschner2013-05-201-0/+2
| | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* torture: Don't leak file resource handle in spoolss test.Andreas Schneider2013-02-221-0/+1
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* torture: Fix array access in spoolss test.Andreas Schneider2013-02-221-2/+2
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4-torture: add some basic tests for PlayGDIScriptOnPrinterIC.Günther Deschner2013-01-241-1/+110
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Jan 24 19:20:52 CET 2013 on sn-devel-104
* spoolss: make spoolss deal with ndr64 StartDocPrinter by using proper ↵Günther Deschner2013-01-241-2/+6
| | | | | | | | | container object. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* spoolss: make spoolss deal with ndr64 SetForm by using proper container object.Günther Deschner2013-01-171-3/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* spoolss: make spoolss deal with ndr64 AddForm by using proper container object.Günther Deschner2013-01-171-4/+7
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.Günther Deschner2013-01-171-6/+6
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* spoolss: Make OpenPrinterEx work with NDR64 by using UserInfo Container.Günther Deschner2013-01-161-18/+17
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* torture: Fix torture_rpc_spoolss_printer_teardown_common().Andreas Schneider2012-12-121-3/+1
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* s3-torture: Use static printer for smbd spooler testDavid Disseldorp2012-06-261-1/+9
| | | | | Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Tue Jun 26 18:04:43 CEST 2012 on sn-devel-104
* torture: add test for smbd print job spoolingDavid Disseldorp2012-06-261-0/+73
| | | | | | Clients can print by performing file IO on a printer share, rather than issuing spoolss RPCs. This commit attempts to reproduce bug 8719.
* s4:torture:rpc:spoolss: also initialize driverName before checking it in ↵Michael Adam2012-04-251-0/+1
| | | | | | test_PrinterData_DsSpooler() Signed-off-by: Andreas Schneider <asn@samba.org>
* torture: add spoolss overlapping driver deletion testsDavid Disseldorp2012-01-201-1/+118
| | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Fri Jan 20 18:20:14 CET 2012 on sn-devel-104
* torture: confirm printer driver file removalDavid Disseldorp2012-01-201-1/+81
| | | | Signed-off-by: Andreas Schneider <asn@samba.org>
* torture: add spoolss del printer driver testDavid Disseldorp2012-01-201-0/+63
| | | | | | | Test handling of DeletePrinterDriverEx when the DPD_DELETE_ALL_FILES flag is set. Signed-off-by: Andreas Schneider <asn@samba.org>
* s4-smbtorture: restructure documentname handling in spoolss test a bit.Günther Deschner2011-04-201-3/+4
| | | | Guenther
* s4-smbtorture: add torture test to check proper add and delete driver ↵Günther Deschner2011-02-081-0/+77
| | | | | | | | operations. Thanks to Bjoern Baumbach <bb@sernet.de> for pushing us to test and verify this. Guenther
* s4-smbtorture: also run the driver timestamp spoolss test against samba.Günther Deschner2011-02-081-4/+0
| | | | Guenther
* s4-smbtorture: make sure there is always driverextra data in spoolss devmode ↵Günther Deschner2011-01-211-2/+10
| | | | | | size tests. Guenther
* s4-smbtorture: add tests for the size member of spoolss devicemodes.Günther Deschner2011-01-211-1/+5
| | | | Guenther
* s4-smbtorture: prepare devicemode test for expected result tests.Günther Deschner2011-01-211-9/+15
| | | | Guenther
* s4-smbtorture: add some paranoia checks for 0 sized devmodes.Günther Deschner2011-01-211-0/+15
| | | | Guenther
* s4-smbtorture: check driver_version equality as well.Günther Deschner2011-01-041-0/+2
| | | | | | | Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Tue Jan 4 11:22:09 CET 2011 on sn-devel-104
* s4-smbtorture: always setup full driver level 8 in test_add_driver_arg().Günther Deschner2011-01-041-6/+13
| | | | Guenther
* s4-smbtorture: in test_GetDriverInfo_winreg() always test level 6 for samba3 asGünther Deschner2011-01-041-7/+2
| | | | | | well. Guenther
* s4-smbtorture: setup help and dependent files in spoolss driver unc path tests.Günther Deschner2011-01-041-0/+8
| | | | Guenther
* s4-smbtorture: fix DriverDate and DriverVersion comparison checks against w2k3.Günther Deschner2011-01-041-0/+2
| | | | Guenther
* s4-smbtorture: add more tests for driver_dates.Günther Deschner2011-01-041-0/+39
| | | | Guenther
* s4-smbtorture: always skip addprinter{ex} level 1 tests for now.Günther Deschner2010-12-221-4/+6
| | | | Guenther
* s4-smbtorture: fix expected driver date REG_SZ string.Günther Deschner2010-12-221-0/+5
| | | | | | | This resolves the "WARNING!: ../torture/rpc/spoolss.c:4688: str was 01/01/1601, expected 01/01/1970: "DriverDate" - driver_date mismatch" warnings. Guenther