r11904: added smb2_tdis() testing
authorAndrew Tridgell <tridge@samba.org>
Fri, 25 Nov 2005 11:12:08 +0000 (11:12 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:46:46 +0000 (13:46 -0500)
source/torture/smb2/connect.c

index 080bb5a1c58e1e64eff1f3519f03083dccc4e911..a1215e3ae71d62ea492b24d87fcc16cdef55c3e9 100644 (file)
@@ -195,7 +195,19 @@ BOOL torture_smb2_connect(void)
        torture_smb2_close(tree, h1);
        torture_smb2_close(tree, h2);
 
-       status = smb2_logoff(tree);
+       status = smb2_tdis(tree);
+       if (!NT_STATUS_IS_OK(status)) {
+               printf("tdis failed - %s\n", nt_errstr(status));
+               return False;
+       }
+
+       status = smb2_tdis(tree);
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_NETWORK_NAME_DELETED)) {
+               printf("tdis should have disabled session - %s\n", nt_errstr(status));
+               return False;
+       }
+
+       status = smb2_logoff(tree);
        if (!NT_STATUS_IS_OK(status)) {
                printf("Logoff failed - %s\n", nt_errstr(status));
                return False;