svn commit: samba r11736 - in branches/SAMBA_4_0/source/torture/smb2: .

tridge at samba.org tridge at samba.org
Wed Nov 16 04:35:50 GMT 2005


Author: tridge
Date: 2005-11-16 04:35:49 +0000 (Wed, 16 Nov 2005)
New Revision: 11736

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11736

Log:

display EAs and streams in smb2 torture tests


Modified:
   branches/SAMBA_4_0/source/torture/smb2/util.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/smb2/util.c
===================================================================
--- branches/SAMBA_4_0/source/torture/smb2/util.c	2005-11-16 04:35:10 UTC (rev 11735)
+++ branches/SAMBA_4_0/source/torture/smb2/util.c	2005-11-16 04:35:49 UTC (rev 11736)
@@ -60,6 +60,34 @@
 	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);	
 }
 



More information about the samba-cvs mailing list