[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Wed Mar 17 08:57:14 MDT 2010
The branch, master has been updated
via 4ca2cc3... s4-smbtorture: workaround broken REG_MULTI_SZ from winreg in s3 during SetPrinterDataEx SPOOLSS test.
via 481402b... s4-smbtorture: workaround the fact that you cannot fully rename a printer in samba.
via c05a061... s4-smbtorture: only use "friendly" data in extended SetPrinterDataEx test.
from d41b8c3... s4-smbtorture: skip security descriptor tests against Samba in RPC-WINREG.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 4ca2cc348e3412fd1851cd8512a10d0d0b1acf99
Author: Günther Deschner <gd at samba.org>
Date: Wed Mar 17 15:55:23 2010 +0100
s4-smbtorture: workaround broken REG_MULTI_SZ from winreg in s3
during SetPrinterDataEx SPOOLSS test.
Guenther
commit 481402bae557b174b38a965d209d417728c7562f
Author: Günther Deschner <gd at samba.org>
Date: Wed Mar 17 15:45:54 2010 +0100
s4-smbtorture: workaround the fact that you cannot fully rename a printer in samba.
Guenther
commit c05a06187d6a9b2f065dfc65112ab5188d2f11b7
Author: Günther Deschner <gd at samba.org>
Date: Wed Mar 17 15:32:42 2010 +0100
s4-smbtorture: only use "friendly" data in extended SetPrinterDataEx test.
Passes against windows but not against samba yet :-(
Guenther
-----------------------------------------------------------------------
Summary of changes:
source4/torture/rpc/spoolss.c | 37 +++++++++++++++++++++++++++++++++----
1 files changed, 33 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 1f143a3..db7d5ab 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -3691,6 +3691,7 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx,
};
enum winreg_Type types[] = {
REG_SZ,
+ REG_MULTI_SZ,
REG_DWORD,
REG_BINARY
};
@@ -3714,12 +3715,27 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx,
uint32_t ecount;
struct spoolss_PrinterEnumValues *einfo;
+ if (types[t] == REG_DWORD) {
+ s = 0xffff;
+ }
+
+ if (torture_setting_bool(tctx, "samba3", false)) {
+ if ((types[t] == REG_MULTI_SZ) && s == 0) {
+ torture_warning(tctx, "samba3 does not handle 4 byte emtpy REG_MULTI_SZ buffers");
+ continue;
+ }
+ }
+
switch (types[t]) {
case REG_BINARY:
- case REG_DWORD:
data = blob;
offered = blob.length;
break;
+ case REG_DWORD:
+ data = data_blob_talloc(tctx, NULL, 4);
+ SIVAL(data.data, 0, 0x12345678);
+ offered = 4;
+ break;
case REG_SZ:
torture_assert(tctx,
reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
@@ -3727,6 +3743,14 @@ static bool test_SetPrinterDataEx_matrix(struct torture_context *tctx,
offered = data.length;
/*strlen_m_term(data.string)*2;*/
break;
+ case REG_MULTI_SZ:
+ torture_assert(tctx,
+ reg_string_to_val(tctx, lp_iconv_convenience(tctx->lp_ctx),
+ "REG_SZ", string, &type, &data), "");
+ torture_assert(tctx, data_blob_realloc(tctx, &data, data.length + 2), "");
+ memset(&data.data[data.length - 2], '\0', 2);
+ offered = data.length;
+ break;
default:
torture_fail(tctx, talloc_asprintf(tctx, "type %d untested\n", types[t]));
}
@@ -4247,9 +4271,14 @@ static bool test_printer_rename(struct torture_context *tctx,
torture_assert_str_equal(tctx, printer_name, printer_name_new,
"new printer name was not set");
- torture_assert(tctx,
- test_OpenPrinter_badname(tctx, b, printer_name_orig),
- "still can open printer with oldname");
+ /* samba currently cannot fully rename printers */
+ if (!torture_setting_bool(tctx, "samba3", false)) {
+ torture_assert(tctx,
+ test_OpenPrinter_badname(tctx, b, printer_name_orig),
+ "still can open printer with oldname after rename");
+ } else {
+ torture_warning(tctx, "*not* checking for open with oldname after rename for samba3");
+ }
torture_assert(tctx,
call_OpenPrinterEx(tctx, p, printer_name_new, NULL, &new_handle),
--
Samba Shared Repository
More information about the samba-cvs
mailing list