summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorBjörn Baumbach <bb@sernet.de>2011-11-16 16:21:13 +0100
committerStefan Metzmacher <metze@samba.org>2011-11-16 19:02:12 +0100
commit773abaa2ef9521250cc51657c2ce15ce99850890 (patch)
tree87c3296b448600014cae11fa44496a8515efa5fa /source3/torture
parent9430fbf9225c60976c27cf3e3f7d1fdae88ebfb0 (diff)
downloadsamba-773abaa2ef9521250cc51657c2ce15ce99850890.tar.gz
samba-773abaa2ef9521250cc51657c2ce15ce99850890.tar.bz2
samba-773abaa2ef9521250cc51657c2ce15ce99850890.zip
s3-torture: remove all cli_nt_error() calls in torture
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/torture.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 7b3c6a4191..20ee6bc746 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -1553,8 +1553,7 @@ static bool tcon_devtest(struct cli_state *cli,
myshare, devtype);
ret = False;
} else {
- if (NT_STATUS_EQUAL(cli_nt_error(cli),
- expected_error)) {
+ if (NT_STATUS_EQUAL(status, expected_error)) {
ret = True;
} else {
printf("Returned unexpected error\n");
@@ -4348,17 +4347,19 @@ static bool run_deletetest(int dummy)
}
/* Now try open for delete access. */
- if (NT_STATUS_IS_OK(cli_ntcreate(cli1, fname, 0, FILE_READ_ATTRIBUTES|DELETE_ACCESS,
- 0, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- FILE_OVERWRITE_IF, 0, 0, &fnum1))) {
+ status = cli_ntcreate(cli1, fname, 0,
+ FILE_READ_ATTRIBUTES|DELETE_ACCESS,
+ 0,
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
+ FILE_OVERWRITE_IF, 0, 0, &fnum1);
+ if (NT_STATUS_IS_OK(status)) {
printf("[11] open of %s succeeded should have been denied with ACCESS_DENIED!\n", fname);
cli_close(cli1, fnum1);
goto fail;
correct = False;
} else {
- NTSTATUS nterr = cli_nt_error(cli1);
- if (!NT_STATUS_EQUAL(nterr,NT_STATUS_ACCESS_DENIED)) {
- printf("[11] open of %s should have been denied with ACCESS_DENIED! Got error %s\n", fname, nt_errstr(nterr));
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
+ printf("[11] open of %s should have been denied with ACCESS_DENIED! Got error %s\n", fname, nt_errstr(status));
goto fail;
correct = False;
} else {
@@ -7596,10 +7597,8 @@ static bool run_streamerror(int dummy)
return false;
}
- cli_qpathinfo1(cli, streamname, &change_time, &access_time, &write_time,
- &size, &mode);
- status = cli_nt_error(cli);
-
+ status = cli_qpathinfo1(cli, streamname, &change_time, &access_time,
+ &write_time, &size, &mode);
if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
printf("pathinfo returned %s, expected "
"NT_STATUS_OBJECT_NAME_NOT_FOUND\n",