summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-25 05:26:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:42 -0500
commit5fc1b68683886a8646b59bd8f01e8bdfb6bf7bbc (patch)
tree0585848852292b920c6804ae2a09cef23e80dd8b
parentced449b016631347d308643ea1de47a260f4671a (diff)
downloadsamba-5fc1b68683886a8646b59bd8f01e8bdfb6bf7bbc.tar.gz
samba-5fc1b68683886a8646b59bd8f01e8bdfb6bf7bbc.tar.bz2
samba-5fc1b68683886a8646b59bd8f01e8bdfb6bf7bbc.zip
r11890: added tests for the last few fields in SMB2 find requests
(This used to be commit 77d1938e96e02fc93c411197869cc6a1fc4451d1)
-rw-r--r--source4/torture/smb2/find.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/torture/smb2/find.c b/source4/torture/smb2/find.c
index 7ead3e34aa..4a5cd44033 100644
--- a/source4/torture/smb2/find.c
+++ b/source4/torture/smb2/find.c
@@ -91,12 +91,21 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
struct smb2_find f;
BOOL ret = True;
union smb_fileinfo io;
+ const char *alt_name;
status = smb2_create_complex_file(tree, FNAME, &handle);
if (!NT_STATUS_IS_OK(status)) {
return False;
}
+ io.generic.level = RAW_FILEINFO_ALT_NAME_INFORMATION;
+ io.generic.in.handle = handle;
+ status = smb2_getinfo_file(tree, tree, &io);
+ if (!NT_STATUS_IS_OK(status)) {
+ return False;
+ }
+ alt_name = talloc_strdup(tree, io.alt_name_info.out.fname.s);
+
io.generic.level = RAW_FILEINFO_SMB2_ALL_INFORMATION;
io.generic.in.handle = handle;
status = smb2_getinfo_file(tree, tree, &io);
@@ -151,6 +160,7 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
CHECK_VALUE(FULL_DIRECTORY_INFO, full_directory_info, size);
CHECK_VALUE(FULL_DIRECTORY_INFO, full_directory_info, alloc_size);
CHECK_VALUE(FULL_DIRECTORY_INFO, full_directory_info, attrib);
+ CHECK_VALUE(FULL_DIRECTORY_INFO, full_directory_info, ea_size);
CHECK_CONST_STRING(FULL_DIRECTORY_INFO, full_directory_info, name, FNAME);
CHECK_VALUE(BOTH_DIRECTORY_INFO, both_directory_info, create_time);
@@ -160,6 +170,8 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
CHECK_VALUE(BOTH_DIRECTORY_INFO, both_directory_info, size);
CHECK_VALUE(BOTH_DIRECTORY_INFO, both_directory_info, alloc_size);
CHECK_VALUE(BOTH_DIRECTORY_INFO, both_directory_info, attrib);
+ CHECK_VALUE(BOTH_DIRECTORY_INFO, both_directory_info, ea_size);
+ CHECK_CONST_STRING(BOTH_DIRECTORY_INFO, both_directory_info, short_name, alt_name);
CHECK_CONST_STRING(BOTH_DIRECTORY_INFO, both_directory_info, name, FNAME);
CHECK_VALUE(ID_FULL_DIRECTORY_INFO, id_full_directory_info, create_time);
@@ -169,6 +181,8 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
CHECK_VALUE(ID_FULL_DIRECTORY_INFO, id_full_directory_info, size);
CHECK_VALUE(ID_FULL_DIRECTORY_INFO, id_full_directory_info, alloc_size);
CHECK_VALUE(ID_FULL_DIRECTORY_INFO, id_full_directory_info, attrib);
+ CHECK_VALUE(ID_FULL_DIRECTORY_INFO, id_full_directory_info, ea_size);
+ CHECK_VALUE(ID_FULL_DIRECTORY_INFO, id_full_directory_info, file_id);
CHECK_CONST_STRING(ID_FULL_DIRECTORY_INFO, id_full_directory_info, name, FNAME);
CHECK_VALUE(ID_BOTH_DIRECTORY_INFO, id_both_directory_info, create_time);
@@ -178,6 +192,8 @@ static BOOL torture_smb2_find_levels(struct smb2_tree *tree)
CHECK_VALUE(ID_BOTH_DIRECTORY_INFO, id_both_directory_info, size);
CHECK_VALUE(ID_BOTH_DIRECTORY_INFO, id_both_directory_info, alloc_size);
CHECK_VALUE(ID_BOTH_DIRECTORY_INFO, id_both_directory_info, attrib);
+ CHECK_VALUE(ID_BOTH_DIRECTORY_INFO, id_both_directory_info, ea_size);
+ CHECK_VALUE(ID_BOTH_DIRECTORY_INFO, id_both_directory_info, file_id);
CHECK_CONST_STRING(ID_BOTH_DIRECTORY_INFO, id_both_directory_info, name, FNAME);