The branch, master has been updated via a6d07a8 Re-enable base.tcondev test for S3, now we pass it correctly. via e59a950 Fix bug #8005 - smbtorture4 BASE-TCONDEV fails when tested on Samba from 431853c Merge new lorikeet heimdal, revision 85ed7247f515770c73b1f1ced1739f6ce19d75d2
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit a6d07a8e69600853756f7a091456ba2489e53cbf Author: Jeremy Allison <j...@samba.org> Date: Mon Mar 14 16:05:55 2011 -0700 Re-enable base.tcondev test for S3, now we pass it correctly. Autobuild-User: Jeremy Allison <j...@samba.org> Autobuild-Date: Tue Mar 15 00:59:37 CET 2011 on sn-devel-104 commit e59a950c049679f0394ea41b463dbb9837eb5e63 Author: Jeremy Allison <j...@samba.org> Date: Mon Mar 14 16:12:31 2011 -0700 Fix bug #8005 - smbtorture4 BASE-TCONDEV fails when tested on Samba When pulling non-aligned ucs2 strings, we neglected to add in the pad byte to the buffer length we've eaten. This caused the device string in TCONX (which seems to be one of the few places that uses non-aligned ucs2 strings) to be incorrectly read. Volker please check. Jeremy. ----------------------------------------------------------------------- Summary of changes: source3/lib/charcnv.c | 8 ++++++-- source3/selftest/skip | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 6f1ced6..5b2149b 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -1225,6 +1225,7 @@ bool push_utf8_talloc(TALLOC_CTX *ctx, char **dest, const char *src, size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_len, size_t src_len, int flags) { size_t ret; + size_t ucs2_align_len = 0; if (dest_len == (size_t)-1) { /* No longer allow dest_len of -1. */ @@ -1242,6 +1243,7 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_ src = (const void *)((const char *)src + 1); if (src_len != (size_t)-1) src_len--; + ucs2_align_len = 1; } if (flags & STR_TERMINATE) { @@ -1277,7 +1279,7 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_ dest[0] = 0; } - return src_len; + return src_len + ucs2_align_len; } /** @@ -1303,6 +1305,7 @@ size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx, { char *dest; size_t dest_len; + size_t ucs2_align_len = 0; *ppdest = NULL; @@ -1321,6 +1324,7 @@ size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx, src = (const void *)((const char *)src + 1); if (src_len != (size_t)-1) src_len--; + ucs2_align_len = 1; } if (flags & STR_TERMINATE) { @@ -1386,7 +1390,7 @@ size_t pull_ucs2_base_talloc(TALLOC_CTX *ctx, } *ppdest = dest; - return src_len; + return src_len + ucs2_align_len; } size_t pull_ucs2_fstring(char *dest, const void *src) diff --git a/source3/selftest/skip b/source3/selftest/skip index 61fa03a..02166a1 100644 --- a/source3/selftest/skip +++ b/source3/selftest/skip @@ -14,7 +14,6 @@ samba3.smbtorture_s3.*.utable samba3.smbtorture_s3.*.pipe_number samba3.smbtorture_s3.*.CHAIN1 samba3.*base.charset -samba3.*base.tcondev samba3.*raw.acls samba3.*raw.composite samba3.*raw.context -- Samba Shared Repository