With GlusterFS as the backend(using vfs_glusterfs) file system, file/directory creation under root of the share no longer works and returns error. `smbclient` returns NT_STATUS_INVALID_PARAMETER as follows: # smbclient \\\\<IP>\\<share> -U user%passwd Try "help" to get a list of possible commands. smb: \> mkdir testdir NT_STATUS_INVALID_PARAMETER making remote directory \testdir Additional info: This happened when GlusterFS introduced a missing emptiness check[1] on incoming path recently while doing a getxattr as part of get_real_filename() from Samba. Even though parent_dirname() inside check_parent_exists() correctly fills '.' into dirpath it failed to update dirpath while returning from check_parent_exists() when file/directory name does not contain a '/' see https://lists.samba.org/archive/samba-technical/2018-August/129733.html for discussions. [1] http://git.gluster.org/cgit/glusterfs.git/commit/?id=febee007bb1a99d65300630c2a98cbb642b1c8dc
Created attachment 14441 [details] "comprehensive" fix for master. Complete fix - note I'm not proposing this at present as it's too big a change for this specific bug, but I think it's ultimately the correct change we might go with later so I want to record it here so I don't lose it. A different smaller fix was proposed to samba-technical which I'll back-port once it goes in.
Created attachment 14442 [details] git-am fix for 4.9.next, 4.8.next, 4.7.next.
Comment on attachment 14442 [details] git-am fix for 4.9.next, 4.8.next, 4.7.next. Cherry-picked from master.
Re-assigning to Karolin for inclusion in 4.9.next, 4.8.next, 4.7.next. (Karolin please ignore the "comprehensive" attachment and just push the git-am fixes, that's only a place for me to record the extra patch).
(In reply to Jeremy Allison from comment #4) Pushed to autobuild-v4-9-test and autobuild-v4-8-test, but the patch does not apply on current v4-7-test branch. Re-assigning to Jeremy.
Karolin, can you check again on the 4.7.x branch. In my v4-7-test branch I did a git update --rebase and got to: b9b4e96dc4ae0d445f73eaf8d48579bba0c29cfe commit b9b4e96dc4ae0d445f73eaf8d48579bba0c29cfe (origin/v4-7-test) Author: Karolin Seeger <kseeger@samba.org> Date: Mon Aug 27 09:51:59 2018 +0200 VERSION: Bump version up to 4.7.9... and re-enable GIT_SNAPSHOT. Signed-off-by: Karolin Seeger <kseeger@samba.org> and then git a git-am of attachment 14442 [details]: git am /tmp/0001-s3-smbd-Ensure-get_real_filename-copes-with-empty-pa.patch and it applied cleanly, leaving me with: commit f234bf25a8bec7c7793716b8c1910e0ec83531e8 (HEAD -> v4-7-test) Author: Jeremy Allison <jra@samba.org> Date: Tue Aug 21 12:05:34 2018 -0700 s3: smbd: Ensure get_real_filename() copes with empty pathnames. Needed for vfs_glusterfs, as Gluster requires "." not '\0'. Based on a fix from Anoop C S <anoopcs@redhat.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13585 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ira Cooper <ira@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Aug 22 21:50:41 CEST 2018 on sn-devel-144 (cherry picked from commit 9c71f61ed8a31d287d343d4f2e68cb40c57a2b89) commit b9b4e96dc4ae0d445f73eaf8d48579bba0c29cfe (origin/v4-7-test) Author: Karolin Seeger <kseeger@samba.org> Date: Mon Aug 27 09:51:59 2018 +0200 VERSION: Bump version up to 4.7.9... and re-enable GIT_SNAPSHOT. Signed-off-by: Karolin Seeger <kseeger@samba.org>
(In reply to Jeremy Allison from comment #6) Oh, sorry, you are right. Pushed to autobuild-v4-7-test.
Pushed to all branches. Closing out bug report. Thanks!