From 4fe127dbe88af47178a0dad46e42aa6400ade67e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 25 Sep 2001 05:20:43 +0000 Subject: added a little smbtorture test for dumping the unicode table of a server. This is just a framework right now - I want this to eventually replace the win32 test code from monyo The interesting this about this test is that it shows up a really horrible performance bug in our stat cache code. I'll see if I can fix it. (This used to be commit eb668b54af4925194c07b217724657f406ec00d0) --- source3/torture/utable.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 source3/torture/utable.c (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c new file mode 100644 index 0000000000..c710815d9c --- /dev/null +++ b/source3/torture/utable.c @@ -0,0 +1,82 @@ +/* + Unix SMB/Netbios implementation. + Version 3.0 + SMB torture tester - unicode table dumper + Copyright (C) Andrew Tridgell 2001 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#define NO_SYSLOG + +#include "includes.h" + +BOOL torture_utable(int dummy) +{ + static struct cli_state cli; + fstring fname, alt_name; + int fnum; + smb_ucs2_t c2; + int c, len; + int chars_allowed=0, alt_allowed=0; + + printf("starting utable\n"); + + if (!torture_open_connection(&cli)) { + return False; + } + + cli_mkdir(&cli, "\\utable"); + + for (c=1; c < 0x10000; c++) { + char *p; + + SSVAL(&c2, 0, c); + fstrcpy(fname, "\\utable\\x"); + p = fname+strlen(fname); + len = convert_string(CH_UCS2, CH_UNIX, + &c2, 2, + p, sizeof(fname)-strlen(fname)); + p[len] = 0; + fstrcat(fname,"_a_long_extension"); + + fnum = cli_open(&cli, fname, O_RDWR | O_CREAT | O_TRUNC, + DENY_NONE); + if (fnum == -1) continue; + + chars_allowed++; + + cli_qpathinfo_alt_name(&cli, fname, alt_name); + + if (strncmp(alt_name, "X_A_L", 5) != 0) { + alt_allowed++; + /* d_printf("fname=[%s] alt_name=[%s]\n", fname, alt_name); */ + } + + cli_close(&cli, fnum); + cli_unlink(&cli, fname); + + if (c % 100 == 0) { + printf("%d (%d/%d)\r", c, chars_allowed, alt_allowed); + } + } + printf("%d (%d/%d)\n", c, chars_allowed, alt_allowed); + + cli_rmdir(&cli, "\\utable"); + + d_printf("%d chars allowed %d alt chars allowed\n", chars_allowed, alt_allowed); + + return True; +} -- cgit From 58bc10518bad61e6c8dee38fda82eb8fb1de4bf6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Oct 2001 05:52:11 +0000 Subject: the CASETABLE torture target now generates the complete unicode equivalence table for a server. This was inspired by the chargen win32 code from monyo. This takes a *long* time to run against a Samba server due to the case insensitive comparisons in the filesystem. That makes it a N^2 operation, and N is 64k. It is linear on NT. (This used to be commit 441f9415b365787854fb0d3e04d1ea4938d7af73) --- source3/torture/utable.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index c710815d9c..ea36487f64 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -80,3 +80,77 @@ BOOL torture_utable(int dummy) return True; } + + +static char *form_name(int c) +{ + static fstring fname; + smb_ucs2_t c2; + char *p; + int len; + + fstrcpy(fname, "\\utable\\x"); + p = fname+strlen(fname); + SSVAL(&c2, 0, c); + + len = convert_string(CH_UCS2, CH_UNIX, + &c2, 2, + p, sizeof(fname)-strlen(fname)); + p[len] = 0; + fstrcat(fname,"_a_long_extension"); + return fname; +} + +BOOL torture_casetable(int dummy) +{ + static struct cli_state cli; + char *fname; + int fnum; + int c; + + printf("starting utable\n"); + + if (!torture_open_connection(&cli)) { + return False; + } + + cli_mkdir(&cli, "\\utable"); + cli_unlink(&cli, "\\utable\\*"); + + for (c=1; c < 0x10000; c++) { + fname = form_name(c); + fnum = cli_nt_create_full(&cli, fname, + GENERIC_ALL_ACCESS, + FILE_ATTRIBUTE_NORMAL, + FILE_SHARE_NONE, + FILE_CREATE, 0); + + if (fnum == -1 && + NT_STATUS_EQUAL(cli_nt_error(&cli),NT_STATUS_OBJECT_NAME_COLLISION)) { + /* found a character equivalence! */ + int c2; + + fnum = cli_nt_create_full(&cli, fname, + GENERIC_ALL_ACCESS, + FILE_ATTRIBUTE_NORMAL, + FILE_SHARE_NONE, + FILE_OPEN, 0); + if (fnum == -1 || + cli_read(&cli, fnum, (char *)&c2, 0, sizeof(c2)) != sizeof(c2)) { + continue; + } + + printf("%04x == %04x\n", c, c2); + cli_close(&cli, fnum); + continue; + } + + cli_write(&cli, fnum, 0, (char *)&c, 0, sizeof(c)); + cli_close(&cli, fnum); + } + + cli_unlink(&cli, "\\utable\\*"); + cli_rmdir(&cli, "\\utable"); + + return True; +} -- cgit From e8547256f3d3c0e51a7715894874de36475ec131 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 2 Oct 2001 13:26:38 +0000 Subject: better method of generating the case equivalence table interestingly, this shows that w2kp-jp and w2kp have the *same* case equivalence table, but it is not the same as the Samba one. (This used to be commit b97fbfcd7cfbafc40b4be558fb8d6e86ad656cb0) --- source3/torture/utable.c | 59 ++++++++++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 22 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index ea36487f64..daf9bd49d6 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -89,7 +89,7 @@ static char *form_name(int c) char *p; int len; - fstrcpy(fname, "\\utable\\x"); + fstrcpy(fname, "\\utable\\"); p = fname+strlen(fname); SSVAL(&c2, 0, c); @@ -97,7 +97,6 @@ static char *form_name(int c) &c2, 2, p, sizeof(fname)-strlen(fname)); p[len] = 0; - fstrcat(fname,"_a_long_extension"); return fname; } @@ -106,46 +105,62 @@ BOOL torture_casetable(int dummy) static struct cli_state cli; char *fname; int fnum; - int c; - - printf("starting utable\n"); + int c, i; +#define MAX_EQUIVALENCE 8 + smb_ucs2_t equiv[0x10000][MAX_EQUIVALENCE]; + printf("starting casetable\n"); if (!torture_open_connection(&cli)) { return False; } + memset(equiv, 0, sizeof(equiv)); + cli_mkdir(&cli, "\\utable"); cli_unlink(&cli, "\\utable\\*"); for (c=1; c < 0x10000; c++) { + size_t size; + + if (c == '.') continue; + fname = form_name(c); fnum = cli_nt_create_full(&cli, fname, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE, - FILE_CREATE, 0); + FILE_OPEN_IF, 0); - if (fnum == -1 && - NT_STATUS_EQUAL(cli_nt_error(&cli),NT_STATUS_OBJECT_NAME_COLLISION)) { + if (fnum == -1) continue; + + size = 0; + + if (!cli_qfileinfo(&cli, fnum, NULL, &size, + NULL, NULL, NULL, NULL, NULL)) continue; + + if (size > 0) { /* found a character equivalence! */ - int c2; - - fnum = cli_nt_create_full(&cli, fname, - GENERIC_ALL_ACCESS, - FILE_ATTRIBUTE_NORMAL, - FILE_SHARE_NONE, - FILE_OPEN, 0); - if (fnum == -1 || - cli_read(&cli, fnum, (char *)&c2, 0, sizeof(c2)) != sizeof(c2)) { - continue; + int c2[MAX_EQUIVALENCE]; + + if (size/sizeof(int) >= MAX_EQUIVALENCE) { + printf("too many chars match?? size=%d c=0x%04x\n", + size, c); + cli_close(&cli, fnum); + return False; } - printf("%04x == %04x\n", c, c2); - cli_close(&cli, fnum); - continue; + cli_read(&cli, fnum, (char *)c2, 0, size); + printf("%04x: ", c); + equiv[c][0] = c; + for (i=0; i Date: Wed, 3 Oct 2001 12:18:20 +0000 Subject: switched over to a new method of handling uppercase/lowercase mappings for unicode strings. The new method relies on 3 files that are mmap'd at startup to provide the mapping tables. The upcase.dat and lowcase.dat tables should be the same on all systems. The valid.dat table says what characters are valid in 8.3 names, and differs between systems. I'm committing the japanese valid.dat here, in future we need some way of automatically installing and choosing a appropriate table. This commit also adds my mini tdb based gettext replacement in intl/lang_tdb.c. I have not enabled this yet and have not removed the old gettext code as the new code is still being looked at by Monyo. Right now the code assumes that the upcase.dat, lowcase.dat and valid.dat files are installed in the Samba lib directory. That is not a good choice, but I'll leave them there until we work out the new install directory structure for Samba 3.0. simo - please look at the isvalid_w() function and think about using it in your new mangling code. That should be the final step to correctly passing the chargen test code from monyo. (This used to be commit 1c221994f118dd542a158b2db51e07d04d0e9314) --- source3/torture/utable.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index daf9bd49d6..fb262f91b5 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -29,8 +29,9 @@ BOOL torture_utable(int dummy) fstring fname, alt_name; int fnum; smb_ucs2_t c2; - int c, len; + int c, len, fd; int chars_allowed=0, alt_allowed=0; + uint8 valid[0x10000]; printf("starting utable\n"); @@ -38,7 +39,10 @@ BOOL torture_utable(int dummy) return False; } + memset(valid, 0, sizeof(valid)); + cli_mkdir(&cli, "\\utable"); + cli_unlink(&cli, "\\utable\\*"); for (c=1; c < 0x10000; c++) { char *p; @@ -62,6 +66,7 @@ BOOL torture_utable(int dummy) if (strncmp(alt_name, "X_A_L", 5) != 0) { alt_allowed++; + valid[c] = 1; /* d_printf("fname=[%s] alt_name=[%s]\n", fname, alt_name); */ } @@ -78,6 +83,15 @@ BOOL torture_utable(int dummy) d_printf("%d chars allowed %d alt chars allowed\n", chars_allowed, alt_allowed); + fd = open("valid.dat", O_WRONLY|O_CREAT|O_TRUNC, 0644); + if (fd == -1) { + d_printf("Failed to create valid.dat - %s", strerror(errno)); + return False; + } + write(fd, valid, 0x10000); + close(fd); + d_printf("wrote valid.dat\n"); + return True; } @@ -122,7 +136,9 @@ BOOL torture_casetable(int dummy) for (c=1; c < 0x10000; c++) { size_t size; - if (c == '.') continue; + if (c == '.' || c == '\\') continue; + + printf("%04x\n", c); fname = form_name(c); fnum = cli_nt_create_full(&cli, fname, -- cgit From 8cec5cf35f17568009c70d37bb8b2a1f360d3422 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Oct 2001 08:40:42 +0000 Subject: first step in converting the head branch to use lang_tdb.c instead of gettext for internationalisation support. There is more to do (This used to be commit ab7f67677a1ade4669e5c2750d0a38422ea616a9) --- source3/torture/utable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index fb262f91b5..a9f3afb3f2 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -67,7 +67,7 @@ BOOL torture_utable(int dummy) if (strncmp(alt_name, "X_A_L", 5) != 0) { alt_allowed++; valid[c] = 1; - /* d_printf("fname=[%s] alt_name=[%s]\n", fname, alt_name); */ + d_printf("fname=[%s] alt_name=[%s]\n", fname, alt_name); } cli_close(&cli, fnum); -- cgit From cd68afe31256ad60748b34f7318a180cfc2127cc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 30 Jan 2002 06:08:46 +0000 Subject: Removed version number from file header. Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa) --- source3/torture/utable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index a9f3afb3f2..2b5a912062 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 3.0 + Unix SMB/CIFS implementation. SMB torture tester - unicode table dumper Copyright (C) Andrew Tridgell 2001 -- cgit From fb3ff5fc4426ce343bcbdc0648cb112208571821 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 18 Apr 2003 03:35:39 +0000 Subject: fixing torture build by merging code from HEAD (This used to be commit 7798c7ee1a2fafa0a4879e550e16027f17ccbbcf) --- source3/torture/utable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index 2b5a912062..720614cea3 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -140,11 +140,11 @@ BOOL torture_casetable(int dummy) printf("%04x\n", c); fname = form_name(c); - fnum = cli_nt_create_full(&cli, fname, + fnum = cli_nt_create_full(&cli, fname, 0, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE, - FILE_OPEN_IF, 0); + FILE_OPEN_IF, 0, 0); if (fnum == -1) continue; -- cgit From 2206df6b30c4992daa17257287390421cfc0662d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 23 Apr 2003 08:12:34 +0000 Subject: Merge torture tests from HEAD - it looks like we had rather an incomplete merge last time. I hope this might fix a few failures on the build farm too. Andrew Bartlett (This used to be commit 0c837126923cc30fa60223a5a68d4f527971cc7b) --- source3/torture/utable.c | 49 +++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index 720614cea3..3ec5932b79 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -24,7 +24,7 @@ BOOL torture_utable(int dummy) { - static struct cli_state cli; + struct cli_state *cli; fstring fname, alt_name; int fnum; smb_ucs2_t c2; @@ -40,8 +40,8 @@ BOOL torture_utable(int dummy) memset(valid, 0, sizeof(valid)); - cli_mkdir(&cli, "\\utable"); - cli_unlink(&cli, "\\utable\\*"); + cli_mkdir(cli, "\\utable"); + cli_unlink(cli, "\\utable\\*"); for (c=1; c < 0x10000; c++) { char *p; @@ -55,13 +55,13 @@ BOOL torture_utable(int dummy) p[len] = 0; fstrcat(fname,"_a_long_extension"); - fnum = cli_open(&cli, fname, O_RDWR | O_CREAT | O_TRUNC, + fnum = cli_open(cli, fname, O_RDWR | O_CREAT | O_TRUNC, DENY_NONE); if (fnum == -1) continue; chars_allowed++; - cli_qpathinfo_alt_name(&cli, fname, alt_name); + cli_qpathinfo_alt_name(cli, fname, alt_name); if (strncmp(alt_name, "X_A_L", 5) != 0) { alt_allowed++; @@ -69,8 +69,8 @@ BOOL torture_utable(int dummy) d_printf("fname=[%s] alt_name=[%s]\n", fname, alt_name); } - cli_close(&cli, fnum); - cli_unlink(&cli, fname); + cli_close(cli, fnum); + cli_unlink(cli, fname); if (c % 100 == 0) { printf("%d (%d/%d)\r", c, chars_allowed, alt_allowed); @@ -78,7 +78,7 @@ BOOL torture_utable(int dummy) } printf("%d (%d/%d)\n", c, chars_allowed, alt_allowed); - cli_rmdir(&cli, "\\utable"); + cli_rmdir(cli, "\\utable"); d_printf("%d chars allowed %d alt chars allowed\n", chars_allowed, alt_allowed); @@ -115,7 +115,7 @@ static char *form_name(int c) BOOL torture_casetable(int dummy) { - static struct cli_state cli; + static struct cli_state *cli; char *fname; int fnum; int c, i; @@ -129,28 +129,35 @@ BOOL torture_casetable(int dummy) memset(equiv, 0, sizeof(equiv)); - cli_mkdir(&cli, "\\utable"); - cli_unlink(&cli, "\\utable\\*"); + cli_unlink(cli, "\\utable\\*"); + cli_rmdir(cli, "\\utable"); + if (!cli_mkdir(cli, "\\utable")) { + printf("Failed to create utable directory!\n"); + return False; + } for (c=1; c < 0x10000; c++) { size_t size; if (c == '.' || c == '\\') continue; - printf("%04x\n", c); + printf("%04x (%c)\n", c, isprint(c)?c:'.'); fname = form_name(c); - fnum = cli_nt_create_full(&cli, fname, 0, + fnum = cli_nt_create_full(cli, fname, 0, GENERIC_ALL_ACCESS, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_NONE, FILE_OPEN_IF, 0, 0); - if (fnum == -1) continue; + if (fnum == -1) { + printf("Failed to create file with char %04x\n", c); + continue; + } size = 0; - if (!cli_qfileinfo(&cli, fnum, NULL, &size, + if (!cli_qfileinfo(cli, fnum, NULL, &size, NULL, NULL, NULL, NULL, NULL)) continue; if (size > 0) { @@ -160,11 +167,11 @@ BOOL torture_casetable(int dummy) if (size/sizeof(int) >= MAX_EQUIVALENCE) { printf("too many chars match?? size=%d c=0x%04x\n", size, c); - cli_close(&cli, fnum); + cli_close(cli, fnum); return False; } - cli_read(&cli, fnum, (char *)c2, 0, size); + cli_read(cli, fnum, (char *)c2, 0, size); printf("%04x: ", c); equiv[c][0] = c; for (i=0; i Date: Thu, 6 Nov 2003 22:11:08 +0000 Subject: Final round of printf warnings fixes for the moment. (This used to be commit 0519a7022b4979c0e8ddd4907f4b858a59299c06) --- source3/torture/utable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index 3ec5932b79..5d819cc6af 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -165,8 +165,8 @@ BOOL torture_casetable(int dummy) int c2[MAX_EQUIVALENCE]; if (size/sizeof(int) >= MAX_EQUIVALENCE) { - printf("too many chars match?? size=%d c=0x%04x\n", - size, c); + printf("too many chars match?? size=%ld c=0x%04x\n", + (unsigned long)size, c); cli_close(cli, fnum); return False; } -- cgit From 82053806f5fa66cfd47288997df7351284f6e096 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Fri, 12 Mar 2004 12:57:39 +0000 Subject: Fix build after Jeremy -- yet another place where convert_string() wasn't updated (This used to be commit 9acd46ab462cb4aee9938658dda594ef8b8ddcbd) --- source3/torture/utable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index 5d819cc6af..ba803a0da4 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -51,7 +51,7 @@ BOOL torture_utable(int dummy) p = fname+strlen(fname); len = convert_string(CH_UCS2, CH_UNIX, &c2, 2, - p, sizeof(fname)-strlen(fname)); + p, sizeof(fname)-strlen(fname), True); p[len] = 0; fstrcat(fname,"_a_long_extension"); @@ -108,7 +108,7 @@ static char *form_name(int c) len = convert_string(CH_UCS2, CH_UNIX, &c2, 2, - p, sizeof(fname)-strlen(fname)); + p, sizeof(fname)-strlen(fname), True); p[len] = 0; return fname; } -- cgit From b3e57cb3ffb6eeb3edb1a7b02be35f70e1e7dfcf Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 22 Mar 2005 21:17:01 +0000 Subject: r5968: derrell's large file fix for libsmbclient (BUG 2505) (This used to be commit 85be4c5df398faa6c5bfacd1f9d2f12c39d411e1) --- source3/torture/utable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index ba803a0da4..c9b30f06e1 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -137,7 +137,7 @@ BOOL torture_casetable(int dummy) } for (c=1; c < 0x10000; c++) { - size_t size; + SMB_OFF_T size; if (c == '.' || c == '\\') continue; -- cgit From ab398643a4e44211696ef5ce72b62ab7ecee7bc9 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 19 Jul 2005 02:37:04 +0000 Subject: r8572: Remove crufty #define NO_SYSLOG as it's not used at all anymore. (This used to be commit 985dbb47d925e79c1195ca219f7ab5d6648b22b8) --- source3/torture/utable.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index c9b30f06e1..1d06194e46 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -18,8 +18,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#define NO_SYSLOG - #include "includes.h" BOOL torture_utable(int dummy) -- cgit From 5fbe298b5ad781670715c63e248131498d73e7c6 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Mon, 31 Jul 2006 09:41:25 +0000 Subject: r17338: Add support for multiple shares test inspired by Samba 4 torture's --unclist option. Triggered by -b sharelist_file option. Based on Peter Samogyi's work. I'm not sure what concept for fstring replacement is currently in place though (talloc-ed strings? or it was for pstring only?) (This used to be commit c9f8fafad698c5bc75df86ee8b611104d3fb65bc) --- source3/torture/utable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index 1d06194e46..8279f0b17d 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -32,7 +32,7 @@ BOOL torture_utable(int dummy) printf("starting utable\n"); - if (!torture_open_connection(&cli)) { + if (!torture_open_connection(&cli, 0)) { return False; } @@ -121,7 +121,7 @@ BOOL torture_casetable(int dummy) smb_ucs2_t equiv[0x10000][MAX_EQUIVALENCE]; printf("starting casetable\n"); - if (!torture_open_connection(&cli)) { + if (!torture_open_connection(&cli, 0)) { return False; } -- cgit From 3645d6f1b2a745e2596a54c9f60efe2c753f2db3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 21 Sep 2006 20:53:56 +0000 Subject: r18796: Fix the build. Sorry. Jeremy. (This used to be commit 8b9e5f28c2b8530bee46aefadf97414b85ab5bc8) --- source3/torture/utable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index 8279f0b17d..e5126da91d 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -47,7 +47,7 @@ BOOL torture_utable(int dummy) SSVAL(&c2, 0, c); fstrcpy(fname, "\\utable\\x"); p = fname+strlen(fname); - len = convert_string(CH_UCS2, CH_UNIX, + len = convert_string(CH_UTF16LE, CH_UNIX, &c2, 2, p, sizeof(fname)-strlen(fname), True); p[len] = 0; @@ -104,7 +104,7 @@ static char *form_name(int c) p = fname+strlen(fname); SSVAL(&c2, 0, c); - len = convert_string(CH_UCS2, CH_UNIX, + len = convert_string(CH_UTF16LE, CH_UNIX, &c2, 2, p, sizeof(fname)-strlen(fname), True); p[len] = 0; -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/torture/utable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index e5126da91d..c999e12a21 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -5,7 +5,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 5e54558c6dea67b56bbfaba5698f3a434d3dffb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:52:41 +0000 Subject: r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07) --- source3/torture/utable.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index c999e12a21..0fa48ab45e 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -14,8 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" -- cgit From 30191d1a5704ad2b158386b511558972d539ce47 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Oct 2007 17:40:25 -0700 Subject: RIP BOOL. Convert BOOL -> bool. I found a few interesting bugs in various places whilst doing this (places that assumed BOOL == int). I also need to fix the Samba4 pidl generation (next checkin). Jeremy. (This used to be commit f35a266b3cbb3e5fa6a86be60f34fe340a3ca71f) --- source3/torture/utable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/torture/utable.c') diff --git a/source3/torture/utable.c b/source3/torture/utable.c index 0fa48ab45e..7032cea99b 100644 --- a/source3/torture/utable.c +++ b/source3/torture/utable.c @@ -19,7 +19,7 @@ #include "includes.h" -BOOL torture_utable(int dummy) +bool torture_utable(int dummy) { struct cli_state *cli; fstring fname, alt_name; @@ -110,7 +110,7 @@ static char *form_name(int c) return fname; } -BOOL torture_casetable(int dummy) +bool torture_casetable(int dummy) { static struct cli_state *cli; char *fname; -- cgit