From fee56ea90040a020cfe1938a3678effa00b772d4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 4 Jul 2005 05:05:28 +0000 Subject: r8117: fixed a bunch more dos error code handing. The biggest change was fixing the RAW-CONTEXT test. It was forcing capabilities to zero in an attempt to not negotiated extended security, but as a side effect it was forcing negotiation of dos error codes. This confused the hell out of the test code! Also fixed a bunch of places incorrectly using NT_STATUS_V() instead of NT_STATUS_EQUAL() and several places that had the wrong dos status codes (This used to be commit 0b22744f40804a0d6dc94bfc40ec09306f584f7e) --- source4/torture/raw/context.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source4/torture/raw/context.c') diff --git a/source4/torture/raw/context.c b/source4/torture/raw/context.c index 830814f69c..5a5c78b5f2 100644 --- a/source4/torture/raw/context.c +++ b/source4/torture/raw/context.c @@ -31,7 +31,7 @@ if (!NT_STATUS_EQUAL(status, correct)) { \ printf("(%s) Incorrect status %s - should be %s\n", \ __location__, nt_errstr(status), nt_errstr(correct)); \ - ret = False; \ + ret = False; exit(1); \ goto done; \ }} while (0) @@ -129,21 +129,21 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) session3->vuid = session->vuid; setup.in.sesskey = cli->transport->negotiate.sesskey; - setup.in.capabilities = 0; /* force a non extended security login (should fail) */ + setup.in.capabilities &= ~CAP_EXTENDED_SECURITY; /* force a non extended security login (should fail) */ setup.in.workgroup = lp_workgroup(); setup.in.credentials = cmdline_credentials; status = smb_composite_sesssetup(session3, &setup); - CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED); + CHECK_STATUS(status, NT_STATUS_LOGON_FAILURE); printf("create a fouth anonymous security context on the same transport, without extended security\n"); session4 = smbcli_session_init(cli->transport, mem_ctx, False); session4->vuid = session->vuid; setup.in.sesskey = cli->transport->negotiate.sesskey; - setup.in.capabilities = 0; /* force a non extended security login (should fail) */ + setup.in.capabilities &= ~CAP_EXTENDED_SECURITY; /* force a non extended security login (should fail) */ setup.in.workgroup = lp_workgroup(); anon_creds = cli_credentials_init(mem_ctx); @@ -202,7 +202,7 @@ static BOOL test_session(struct smbcli_state *cli, TALLOC_CTX *mem_ctx) printf("the new vuid should not now be accessible\n"); status = smb_raw_write(tree, &wr); - CHECK_STATUS(status, NT_STATUS_DOS(ERRSRV, ERRbaduid)); + CHECK_STATUS(status, NT_STATUS_INVALID_HANDLE); printf("second logoff for the new vuid should fail\n"); status = smb_raw_ulogoff(session); -- cgit