From 23af0743267d250a90af77c3bbce4d5fd0cdcc00 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Sep 2001 04:23:48 +0000 Subject: fixed ctemp in server and client. It turns out that ctemp on NT is completely broken, and it's pointless to emulate their brokenness completely in this case, but at least this makes us use approximately the same packet format. The spec is complelet wrong in this case (This used to be commit 2d507ec669def6d49304559e53d6c14af9b290a9) --- source3/torture/torture.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'source3/torture/torture.c') diff --git a/source3/torture/torture.c b/source3/torture/torture.c index fb581baa5e..33260dcc54 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -2639,6 +2639,7 @@ static BOOL run_opentest(int dummy) char buf[20]; size_t fsize; BOOL correct = True; + char *tmp_path; printf("starting open test\n"); @@ -2774,16 +2775,17 @@ static BOOL run_opentest(int dummy) printf("testing ctemp\n"); - { - char *tmp_path; - fnum1 = cli_ctemp(&cli1, "\\", &tmp_path); - if (fnum1 == -1) { - printf("ctemp failed (%s)\n", cli_errstr(&cli1)); - return False; - } - printf("ctemp gave path %s\n", tmp_path); - cli_close(&cli1, fnum1); - cli_unlink(&cli1, tmp_path); + fnum1 = cli_ctemp(&cli1, "\\", &tmp_path); + if (fnum1 == -1) { + printf("ctemp failed (%s)\n", cli_errstr(&cli1)); + return False; + } + printf("ctemp gave path %s\n", tmp_path); + if (!cli_close(&cli1, fnum1)) { + printf("close of temp failed (%s)\n", cli_errstr(&cli1)); + } + if (!cli_unlink(&cli1, tmp_path)) { + printf("unlink of temp failed (%s)\n", cli_errstr(&cli1)); } if (!torture_close_connection(&cli1)) { -- cgit