svn commit: samba r18012 - in branches/SAMBA_3_0: examples/libsmbclient source/libsmb

derrell at samba.org derrell at samba.org
Mon Sep 4 16:17:22 GMT 2006


"Stefan (metze) Metzmacher" <metze at samba.org> writes:

> derrell at samba.org schrieb:
>> Author: derrell
>> Date: 2006-09-03 01:37:26 +0000 (Sun, 03 Sep 2006)
>> New Revision: 18012
>> 
>> WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18012
>> 
>> Log:
>> Should fix bug 4018.
>> 
>> NetApp filers expect paths in Open AndX Request to have a leading slash.
>> Windows clients send the leading slash, so we should too.
>
> Hi Derrell,
>
> a torture test for this would be nice:-)

I've never written a torture test before, and I don't know how to run the
torture tests.  (Maybe that's something for me to learn while at the
conference.)  Does this (untested) patch do something close to what it's
supposed to?

Index: torture/raw/open.c
===================================================================
--- torture/raw/open.c	(revision 17937)
+++ torture/raw/open.c	(working copy)
@@ -351,6 +351,21 @@
 	CHECK_VAL(io.openx.out.size, 1024*1024);
 	CHECK_ALL_INFO(io.openx.in.size, size);
 	smbcli_close(cli->tree, fnum);
+
+	/*
+         * Ensure that opening the file without the leading slash works.
+         * NetApp filers are known to fail on this.
+         */
+	io.openx.in.open_func = OPENX_OPEN_FUNC_OPEN;
+	io.openx.in.fname = fname + 1;
+	status = smb_raw_open(cli->tree, mem_ctx, &io);
+	CHECK_STATUS(status, NT_STATUS_OK);
+	fnum = io.openx.out.file.fnum;
+	smbcli_close(cli->tree, fnum);
+
+        /* Reset io.openx.in.fname back to its proper value */
+        io.openx.in.fname = fname;
+
 	smbcli_unlink(cli->tree, fname);
 
 	/* check the fields when the file already existed */


More information about the samba-cvs mailing list