From 58a874111b0534ecda3f5036b188ff4bd046ad2b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 29 Jun 2015 09:46:57 +0200 Subject: [PATCH] s4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED when a dcerpc connection is not connected We still also allow NT_STATUS_INVALID_HANDLE and NT_STATUS_IO_DEVICE_ERROR for now. Signed-off-by: Stefan Metzmacher Reviewed-by: Guenther Deschner --- source4/torture/rpc/samba3rpc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c index ff1a53ca314..6f5477ff08e 100644 --- a/source4/torture/rpc/samba3rpc.c +++ b/source4/torture/rpc/samba3rpc.c @@ -192,13 +192,19 @@ bool torture_bind_authcontext(struct torture_context *torture) if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_HANDLE)) { torture_comment(torture, "dcerpc_lsa_OpenPolicy2 with wrong vuid gave %s, " - "expected NT_STATUS_IO_DEVICE_ERROR\n", + "expected NT_STATUS_CONNECTION_DISCONNECTED\n", nt_errstr(status)); - status = NT_STATUS_IO_DEVICE_ERROR; + status = NT_STATUS_CONNECTION_DISCONNECTED; + } + if (NT_STATUS_EQUAL(status, NT_STATUS_IO_DEVICE_ERROR)) { + torture_comment(torture, "dcerpc_lsa_OpenPolicy2 with wrong vuid gave %s, " + "expected NT_STATUS_CONNECTION_DISCONNECTED\n", + nt_errstr(status)); + status = NT_STATUS_CONNECTION_DISCONNECTED; } - torture_assert_ntstatus_equal(torture, status, NT_STATUS_IO_DEVICE_ERROR, - "lsa io device error"); + torture_assert_ntstatus_equal(torture, status, NT_STATUS_CONNECTION_DISCONNECTED, + "lsa connection disconnected"); smb1cli_session_set_id(tmp->smbXcli, tmp_vuid); cli->tree->session = tmp; -- 2.11.4.GIT