From cb1121ec3268fecb7fa0f5fbb6d2dbffaea991b3 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 2 Dec 2016 11:12:18 +0100 Subject: [PATCH] vfs_fruit: correct fruit_stat_meta_stream() implementation BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni --- source3/modules/vfs_fruit.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 6c391a1d244..67c974e7a32 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -3122,6 +3122,21 @@ static int fruit_stat_base(vfs_handle_struct *handle, return rc; } +static int fruit_stat_meta_stream(vfs_handle_struct *handle, + struct smb_filename *smb_fname, + bool follow_links) +{ + int ret; + + if (follow_links) { + ret = SMB_VFS_NEXT_STAT(handle, smb_fname); + } else { + ret = SMB_VFS_NEXT_LSTAT(handle, smb_fname); + } + + return ret; +} + static int fruit_stat_meta_netatalk(vfs_handle_struct *handle, struct smb_filename *smb_fname, bool follow_links) @@ -3159,6 +3174,9 @@ static int fruit_stat_meta(vfs_handle_struct *handle, switch (config->meta) { case FRUIT_META_STREAM: + ret = fruit_stat_meta_stream(handle, smb_fname, follow_links); + break; + case FRUIT_META_NETATALK: ret = fruit_stat_meta_netatalk(handle, smb_fname, follow_links); break;