mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
r11902: added smb2_logoff() testing
(This used to be commit ff50377822fa48eab7f66275098782241ca50f40)
This commit is contained in:
parent
a399cd3cea
commit
2ede0b162c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user