s4-torture: add ndr test for spoolss_GetCorePrinterDrivers.
authorGünther Deschner <gd@samba.org>
Tue, 22 Jan 2013 09:17:27 +0000 (10:17 +0100)
committerDavid Disseldorp <ddiss@samba.org>
Mon, 20 May 2013 16:50:00 +0000 (18:50 +0200)
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
librpc/idl/spoolss.idl
source4/torture/ndr/spoolss.c

index fae811f1d221c7cedbd34f68e172cfc325cabd1b..f0ff2ff53f9feb97daf0e7896646014062f7e9e0 100644 (file)
@@ -3280,7 +3280,7 @@ cpp_quote("#define spoolss_security_descriptor security_descriptor")
                [charset(UTF8)] uint8 formname[520];
        } spoolss_CorePrinterDriver;
 
-       WERROR spoolss_GetCorePrinterDrivers(
+       [public] WERROR spoolss_GetCorePrinterDrivers(
                [in,unique] [string,charset(UTF16)] uint16 *servername,
                [in,ref] [string,charset(UTF16)] uint16 *architecture,
                [in] uint32 core_driver_size,
index 52a5b03b2bcc01daf2afe74f63fd777579456b33..08d3d383c71be7db173211e7fc13f26a21a241f9 100644 (file)
@@ -1699,6 +1699,47 @@ static const uint8_t setprinter_64_req_data[] = {
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
+static const uint8_t getcoreprinterdrivers_64_req_data[] = {
+       0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x5c, 0x00,
+       0x31, 0x00, 0x39, 0x00, 0x32, 0x00, 0x2e, 0x00, 0x31, 0x00, 0x36, 0x00,
+       0x38, 0x00, 0x2e, 0x00, 0x33, 0x00, 0x2e, 0x00, 0x34, 0x00, 0x38, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00,
+       0x00, 0x00, 0x00, 0x00, 0x57, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x64, 0x00,
+       0x6f, 0x00, 0x77, 0x00, 0x73, 0x00, 0x20, 0x00, 0x78, 0x00, 0x36, 0x00,
+       0x34, 0x00, 0x00, 0x00, 0x9d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x9d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x44, 0x00,
+       0x32, 0x00, 0x30, 0x00, 0x45, 0x00, 0x41, 0x00, 0x33, 0x00, 0x37, 0x00,
+       0x32, 0x00, 0x2d, 0x00, 0x44, 0x00, 0x44, 0x00, 0x33, 0x00, 0x35, 0x00,
+       0x2d, 0x00, 0x34, 0x00, 0x39, 0x00, 0x35, 0x00, 0x30, 0x00, 0x2d, 0x00,
+       0x39, 0x00, 0x45, 0x00, 0x44, 0x00, 0x38, 0x00, 0x2d, 0x00, 0x41, 0x00,
+       0x36, 0x00, 0x33, 0x00, 0x33, 0x00, 0x35, 0x00, 0x41, 0x00, 0x46, 0x00,
+       0x45, 0x00, 0x37, 0x00, 0x39, 0x00, 0x46, 0x00, 0x30, 0x00, 0x7d, 0x00,
+       0x00, 0x00, 0x7b, 0x00, 0x44, 0x00, 0x32, 0x00, 0x30, 0x00, 0x45, 0x00,
+       0x41, 0x00, 0x33, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x44, 0x00,
+       0x44, 0x00, 0x33, 0x00, 0x35, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x39, 0x00,
+       0x35, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x39, 0x00, 0x45, 0x00, 0x44, 0x00,
+       0x38, 0x00, 0x2d, 0x00, 0x41, 0x00, 0x36, 0x00, 0x33, 0x00, 0x33, 0x00,
+       0x35, 0x00, 0x41, 0x00, 0x46, 0x00, 0x45, 0x00, 0x37, 0x00, 0x39, 0x00,
+       0x46, 0x00, 0x31, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x44, 0x00,
+       0x32, 0x00, 0x30, 0x00, 0x45, 0x00, 0x41, 0x00, 0x33, 0x00, 0x37, 0x00,
+       0x32, 0x00, 0x2d, 0x00, 0x44, 0x00, 0x44, 0x00, 0x33, 0x00, 0x35, 0x00,
+       0x2d, 0x00, 0x34, 0x00, 0x39, 0x00, 0x35, 0x00, 0x30, 0x00, 0x2d, 0x00,
+       0x39, 0x00, 0x45, 0x00, 0x44, 0x00, 0x38, 0x00, 0x2d, 0x00, 0x41, 0x00,
+       0x36, 0x00, 0x33, 0x00, 0x33, 0x00, 0x35, 0x00, 0x41, 0x00, 0x46, 0x00,
+       0x45, 0x00, 0x37, 0x00, 0x39, 0x00, 0x46, 0x00, 0x32, 0x00, 0x7d, 0x00,
+       0x00, 0x00, 0x7b, 0x00, 0x44, 0x00, 0x32, 0x00, 0x30, 0x00, 0x45, 0x00,
+       0x41, 0x00, 0x33, 0x00, 0x37, 0x00, 0x32, 0x00, 0x2d, 0x00, 0x44, 0x00,
+       0x44, 0x00, 0x33, 0x00, 0x35, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x39, 0x00,
+       0x35, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x39, 0x00, 0x45, 0x00, 0x44, 0x00,
+       0x38, 0x00, 0x2d, 0x00, 0x41, 0x00, 0x36, 0x00, 0x33, 0x00, 0x33, 0x00,
+       0x35, 0x00, 0x41, 0x00, 0x46, 0x00, 0x45, 0x00, 0x37, 0x00, 0x39, 0x00,
+       0x46, 0x00, 0x33, 0x00, 0x7d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+       0x04, 0x00, 0x00, 0x00
+};
+
 struct torture_suite *ndr_spoolss_suite(TALLOC_CTX *ctx)
 {
        struct torture_suite *suite = torture_suite_create(ctx, "spoolss");
@@ -1758,5 +1799,7 @@ struct torture_suite *ndr_spoolss_suite(TALLOC_CTX *ctx)
 
        torture_suite_add_ndr_pull_fn_test_flags(suite, spoolss_SetPrinter, setprinter_64_req_data, NDR_IN, LIBNDR_FLAG_NDR64, NULL);
 
+       torture_suite_add_ndr_pull_fn_test_flags(suite, spoolss_GetCorePrinterDrivers, getcoreprinterdrivers_64_req_data, NDR_IN, LIBNDR_FLAG_NDR64, NULL);
+
        return suite;
 }