volume, strerror(errno)));
goto done;
}
+
+ /*
+ * The shadow_copy2 module will fail to export subdirectories
+ * of a gluster volume unless we specify the mount point,
+ * because the detection fails if the file system is not
+ * locally mounted:
+ * https://bugzilla.samba.org/show_bug.cgi?id=13091
+ */
+ lp_do_parameter(SNUM(handle->conn), "shadow:mountpoint", "/");
+
done:
if (ret < 0) {
if (fs)
return -1;
}
-static char *vfs_gluster_realpath(struct vfs_handle_struct *handle,
- const char *path)
+static struct smb_filename *vfs_gluster_realpath(struct vfs_handle_struct *handle,
+ TALLOC_CTX *ctx,
+ const struct smb_filename *smb_fname)
{
char *result = NULL;
+ struct smb_filename *result_fname = NULL;
char *resolved_path = SMB_MALLOC_ARRAY(char, PATH_MAX+1);
if (resolved_path == NULL) {
return NULL;
}
- result = glfs_realpath(handle->data, path, resolved_path);
- if (result == NULL) {
- SAFE_FREE(resolved_path);
+ result = glfs_realpath(handle->data,
+ smb_fname->base_name,
+ resolved_path);
+ if (result != NULL) {
+ result_fname = synthetic_smb_fname(ctx, result, NULL, NULL, 0);
}
- return result;
+ SAFE_FREE(resolved_path);
+ return result_fname;
}
static bool vfs_gluster_lock(struct vfs_handle_struct *handle,
}
static const char *vfs_gluster_connectpath(struct vfs_handle_struct *handle,
- const char *filename)
+ const struct smb_filename *smb_fname)
{
return handle->conn->connectpath;
}
.realpath_fn = vfs_gluster_realpath,
.chflags_fn = vfs_gluster_chflags,
.file_id_create_fn = NULL,
- .copy_chunk_send_fn = NULL,
- .copy_chunk_recv_fn = NULL,
.streaminfo_fn = NULL,
.get_real_filename_fn = vfs_gluster_get_real_filename,
.connectpath_fn = vfs_gluster_connectpath,
.brl_lock_windows_fn = NULL,
.brl_unlock_windows_fn = NULL,
.brl_cancel_windows_fn = NULL,
- .strict_lock_fn = NULL,
- .strict_unlock_fn = NULL,
+ .strict_lock_check_fn = NULL,
.translate_name_fn = NULL,
.fsctl_fn = NULL,