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,
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 <http://www.gnu.org/licenses/>.
*/
-#define NO_SYSLOG
-
#include "includes.h"
-BOOL torture_utable(int dummy)
+bool torture_utable(int dummy)
{
struct cli_state *cli;
fstring fname, alt_name;
printf("starting utable\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
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));
+ p, sizeof(fname)-strlen(fname), True);
p[len] = 0;
fstrcat(fname,"_a_long_extension");
d_printf("Failed to create valid.dat - %s", strerror(errno));
return False;
}
- write(fd, valid, 0x10000);
+ if (write(fd, valid, 0x10000) != 0x10000) {
+ d_printf("Failed to create valid.dat - %s", strerror(errno));
+ close(fd);
+ return false;
+ }
close(fd);
d_printf("wrote valid.dat\n");
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));
+ p, sizeof(fname)-strlen(fname), True);
p[len] = 0;
return fname;
}
-BOOL torture_casetable(int dummy)
+bool torture_casetable(int dummy)
{
static struct cli_state *cli;
char *fname;
smb_ucs2_t equiv[0x10000][MAX_EQUIVALENCE];
printf("starting casetable\n");
- if (!torture_open_connection(&cli)) {
+ if (!torture_open_connection(&cli, 0)) {
return False;
}
}
for (c=1; c < 0x10000; c++) {
- size_t size;
+ SMB_OFF_T size;
if (c == '.' || c == '\\') continue;