Samba 4.17.0rc3 opens via vfs_glusterfs fail
Andrew Walker
awalker at ixsystems.com
Mon Aug 29 19:36:21 UTC 2022
```
[2022/08/27 14:48:25.748586, 0]
../../source3/smbd/files.c:1187(synthetic_pathref)
synthetic_pathref: opening [.] failed
```
Seeing this on trying to connect to share. Looks like we're trying to
glfs_open() <connectpath>/. with flags (O_RDONLY | O_NOFOLLOW |
O_NONBLOCK), and it fails with EISDIR.
Following patch fixes the issue (i.e. on EISDIR reattempting open via
glfs_opendir()).
Has anyone else seen this issue?
```
diff --git a/source3/modules/vfs_glusterfs.c
b/source3/modules/vfs_glusterfs.c
index dd05da0f9bb..22762a8703f 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -822,6 +822,11 @@ static int vfs_gluster_openat(struct vfs_handle_struct
*handle,
how->flags);
}
+ if ((glfd == NULL) && (errno = EISDIR) &&
+ (how->flags == O_NONBLOCK | O_NOFOLLOW)) {
+ glfd = glfs_opendir(handle->data, smb_fname->base_name);
+ }
+
if (became_root) {
unbecome_root();
}
```
More information about the samba-technical
mailing list