summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-11-16 04:35:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:46:19 -0500
commitbaa3cba4c461fe62abe7bb65dc3fdbdc5007ef5f (patch)
tree6f5ec3b859ef9dadf25298eb0d04771f47edff3a
parentab0d0f0623eed2990924580d73c05d6f0b6c8178 (diff)
downloadsamba-baa3cba4c461fe62abe7bb65dc3fdbdc5007ef5f.tar.gz
samba-baa3cba4c461fe62abe7bb65dc3fdbdc5007ef5f.tar.bz2
samba-baa3cba4c461fe62abe7bb65dc3fdbdc5007ef5f.zip
r11736: display EAs and streams in smb2 torture tests
(This used to be commit 2baea9a5ec0a805b90c8b48454e395ce40a35a74)
-rw-r--r--source4/torture/smb2/util.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 7c4c99e777..73217152ee 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -60,6 +60,34 @@ void torture_smb2_all_info(struct smb2_tree *tree, struct smb2_handle handle)
d_printf("\tunknown6: 0x%llx\n", io.all_info.unknown6);
d_printf("\tfname: '%s'\n", io.all_info.fname);
+ /* the EAs, if any */
+ status = smb2_getinfo_level(tree, tmp_ctx, handle,
+ SMB2_GETINFO_FILE_ALL_EAS, &io);
+ if (NT_STATUS_IS_OK(status)) {
+ int i;
+ for (i=0;i<io.all_eas.num_eas;i++) {
+ d_printf("\tEA[%d] flags=%d len=%d '%s'\n", i,
+ io.all_eas.eas[i].flags,
+ (int)io.all_eas.eas[i].value.length,
+ io.all_eas.eas[i].name.s);
+ }
+ }
+
+ /* streams, if available */
+ status = smb2_getinfo_level(tree, tmp_ctx, handle,
+ SMB2_GETINFO_FILE_STREAM_INFO, &io);
+ if (NT_STATUS_IS_OK(status)) {
+ int i;
+ for (i=0;i<io.stream_info.num_streams;i++) {
+ d_printf("\tstream %d:\n", i);
+ d_printf("\t\tsize %ld\n",
+ (long)io.stream_info.streams[i].size);
+ d_printf("\t\talloc size %ld\n",
+ (long)io.stream_info.streams[i].alloc_size);
+ d_printf("\t\tname %s\n", io.stream_info.streams[i].stream_name.s);
+ }
+ }
+
talloc_free(tmp_ctx);
}