A small problem between Samba 3.5.8+ and libceph, the user-space Ceph client
realrichardsharpe at gmail.com
Tue Jun 28 10:02:04 MDT 2011
libceph does not like paths that look like .//some-file.txt.
Specifically, the // causes problems.
I have tracked down what in Samba is doing that, and it is here. The
asprintf is inserting a slash without regard for whether there will be
one, two or three there afterwards.
--- ../../../SOURCES/samba/source3/smbd/dir.c 2011-06-27
+++ smbd/dir.c 2011-06-28 07:58:23.123927000 -0700
@@ -662,6 +662,13 @@
+ /* Get rid of any trailing / in the path name */
+ int path_len = strlen(dptr->path);
+ if (dptr->path[path_len - 1] == '/')
+ dptr->path[path_len - 1] = 0;
pathreal = talloc_asprintf(ctx,
@@ -669,6 +676,8 @@
+ DEBUG(10, ("pathreal = %s\n", pathreal));
/* Create an smb_filename with stream_name == NULL. */
smb_fname_base.base_name = pathreal;
However, I wonder if this is the correct way to solve this problem.
More information about the samba-technical