summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-12-20 16:02:02 +0100
committerGünther Deschner <gd@samba.org>2010-12-22 13:33:17 +0100
commit340d2df123813196247d3b1aff38048cfe93c1ec (patch)
tree2892676fba96246f7455eafad13e56669e1c62ff /source4
parent6857bbc8997b2afb89a83f072c090129533b17c8 (diff)
downloadsamba-340d2df123813196247d3b1aff38048cfe93c1ec.tar.gz
samba-340d2df123813196247d3b1aff38048cfe93c1ec.tar.bz2
samba-340d2df123813196247d3b1aff38048cfe93c1ec.zip
s4-smbtorture: interesting, DriverDate and DriverVersion are different in w2k3 and w2k8r2.
While in w2k8 they are REG_SZ date or numerical strings, they are 8 byte REG_BINARY blobs in w2k3. Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/spoolss.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 630694d01a..d7d1df1187 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -4369,6 +4369,23 @@ do {\
talloc_asprintf(tctx, "%s - %s mismatch", #wname, #iname));\
} while(0);
+#define test_binary(wname, iname) \
+do {\
+ enum winreg_Type w_type;\
+ uint32_t w_size;\
+ uint32_t w_length;\
+ uint8_t *w_data;\
+ torture_assert(tctx,\
+ test_winreg_QueryValue(tctx, winreg_handle, &key_handle, wname,\
+ &w_type, &w_size, &w_length, &w_data),\
+ "failed to query winreg");\
+ torture_assert_int_equal(tctx, w_type, REG_BINARY, "unexpected type");\
+ torture_assert_int_equal(tctx, w_size, iname.length, "unexpected length");\
+ torture_assert_mem_equal(tctx, w_data, iname.data, w_size, \
+ "binary unequal");\
+} while(0);
+
+
#define test_dm(wname, iname) \
do {\
DATA_BLOB blob;\
@@ -4717,8 +4734,14 @@ static bool test_GetDriverInfo_winreg(struct torture_context *tctx,
test_sz("Data File", data_file);
test_sz("Datatype", info.info6.default_datatype);
test_sz("Driver", driver_path);
- test_sz("DriverDate", driver_date);
- test_sz("DriverVersion", driver_version);
+ if (torture_setting_bool(tctx, "w2k3", false)) {
+ DATA_BLOB blob = data_blob_talloc_zero(tctx, 8);
+ test_binary("DriverDate", blob);
+ test_binary("DriverVersion", blob);
+ } else {
+ test_sz("DriverDate", driver_date);
+ test_sz("DriverVersion", driver_version);
+ }
test_sz("HardwareID", info.info6.hardware_id);
test_sz("Help File", help_file);
test_sz("Manufacturer", info.info6.manufacturer_name);