s3-torture: use nt_errstr() for cli_unlink() error handling
authorStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 15:56:19 +0000 (17:56 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 7 Jul 2011 17:16:28 +0000 (19:16 +0200)
Use nt_errstr() instead of cli_errstr() for error handling on
cli_unlink() calls.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/torture/torture.c

index 2243fe6c0b07ea56ea378e04413f20422555d8a7..ab42c26b418e3a6190eaab3b7a6a50155e123a42 100644 (file)
@@ -2787,7 +2787,9 @@ static bool run_unlinktest(int dummy)
                return False;
        }
 
-       if (NT_STATUS_IS_OK(cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN))) {
+       status = cli_unlink(cli, fname,
+                           FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
+       if (NT_STATUS_IS_OK(status)) {
                printf("error: server allowed unlink on an open file\n");
                correct = False;
        } else {