summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-25 11:05:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:46 -0500
commit2ede0b162caf1dc77092f9003ce6765b869432e1 (patch)
tree9847ebf8c4ee2cbd505efb2fe16d19570e81a8fb /source4/torture
parenta399cd3cea5efb644785ca63052ff18b765d5888 (diff)
downloadsamba-2ede0b162caf1dc77092f9003ce6765b869432e1.tar.gz
samba-2ede0b162caf1dc77092f9003ce6765b869432e1.tar.bz2
samba-2ede0b162caf1dc77092f9003ce6765b869432e1.zip
r11902: added smb2_logoff() testing
(This used to be commit ff50377822fa48eab7f66275098782241ca50f40)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/smb2/connect.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source4/torture/smb2/connect.c b/source4/torture/smb2/connect.c
index 2307d8fffb..080bb5a1c5 100644
--- a/source4/torture/smb2/connect.c
+++ b/source4/torture/smb2/connect.c
@@ -182,6 +182,7 @@ BOOL torture_smb2_connect(void)
TALLOC_CTX *mem_ctx = talloc_new(NULL);
struct smb2_tree *tree;
struct smb2_handle h1, h2;
+ NTSTATUS status;
if (!torture_smb2_connection(mem_ctx, &tree)) {
return False;
@@ -194,6 +195,18 @@ BOOL torture_smb2_connect(void)
torture_smb2_close(tree, h1);
torture_smb2_close(tree, h2);
+ status = smb2_logoff(tree);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("Logoff failed - %s\n", nt_errstr(status));
+ return False;
+ }
+
+ status = smb2_logoff(tree);
+ if (!NT_STATUS_EQUAL(status, NT_STATUS_USER_SESSION_DELETED)) {
+ printf("Logoff should have disabled session - %s\n", nt_errstr(status));
+ return False;
+ }
+
talloc_free(mem_ctx);
return True;