s4-smbtorture: fix RPC-SPOOLSS test after PrinterData changes.
authorGünther Deschner <gd@samba.org>
Mon, 16 Mar 2009 15:01:10 +0000 (16:01 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 17 Mar 2009 10:14:54 +0000 (11:14 +0100)
Guenther

source4/torture/rpc/spoolss.c
source4/torture/rpc/spoolss_win.c

index 9e02c90396908abfe746b24486cf1b9146564a65..c16def09d2026e6cd0089c7c6f6bf7779567bdc3 100644 (file)
@@ -1337,7 +1337,7 @@ static bool test_GetPrinterData(struct torture_context *tctx,
        NTSTATUS status;
        struct spoolss_GetPrinterData r;
        uint32_t needed;
-       enum spoolss_PrinterDataType type;
+       enum winreg_Type type;
        union spoolss_PrinterData data;
 
        r.in.handle = handle;
@@ -1372,7 +1372,7 @@ static bool test_GetPrinterDataEx(struct torture_context *tctx,
 {
        NTSTATUS status;
        struct spoolss_GetPrinterDataEx r;
-       uint32_t type;
+       enum winreg_Type type;
        uint32_t needed;
 
        r.in.handle = handle;
@@ -1419,16 +1419,15 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip
        do {
                uint32_t value_size = 0;
                uint32_t data_size = 0;
-               uint32_t printerdata_type = 0;
-               DATA_BLOB data = data_blob(NULL,0);
+               enum winreg_Type type = 0;
 
                r.in.value_offered = value_size;
                r.out.value_needed = &value_size;
                r.in.data_offered = data_size;
                r.out.data_needed = &data_size;
 
-               r.out.printerdata_type = &printerdata_type;
-               r.out.buffer = &data;
+               r.out.type = &type;
+               r.out.data = talloc_zero_array(tctx, uint8_t, 0);
 
                torture_comment(tctx, "Testing EnumPrinterData\n");
 
@@ -1437,7 +1436,9 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip
                torture_assert_ntstatus_ok(tctx, status, "EnumPrinterData failed");
 
                r.in.value_offered = value_size;
+               r.out.value_name = talloc_zero_array(tctx, const char, value_size);
                r.in.data_offered = data_size;
+               r.out.data = talloc_zero_array(tctx, uint8_t, data_size);
 
                status = dcerpc_spoolss_EnumPrinterData(p, tctx, &r);
 
@@ -1517,7 +1518,7 @@ static bool test_SetPrinterData(struct torture_context *tctx,
        
        r.in.handle = handle;
        r.in.value_name = value_name;
-       r.in.type = SPOOLSS_PRINTER_DATA_TYPE_STRING;
+       r.in.type = REG_SZ;
        r.in.data.string = "dog";
 
        torture_comment(tctx, "Testing SetPrinterData\n");
index 1f22c398424c133bfbc9c621d9a081f66b8a619b..b7ee2386daef65186f7752746f703da1b2449335 100644 (file)
@@ -156,7 +156,7 @@ static bool test_GetPrinterData(struct torture_context *tctx,
        NTSTATUS status;
        struct spoolss_GetPrinterData gpd;
        uint32_t needed;
-       enum spoolss_PrinterDataType type;
+       enum winreg_Type type;
        union spoolss_PrinterData data;
 
        torture_comment(tctx, "Testing GetPrinterData(%s).\n", value_name);