vfs_fruit: correct fruit_stat_meta_stream() implementation
authorRalph Boehme <slow@samba.org>
Fri, 2 Dec 2016 10:12:18 +0000 (11:12 +0100)
committerUri Simchoni <uri@samba.org>
Wed, 1 Mar 2017 23:32:21 +0000 (00:32 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
source3/modules/vfs_fruit.c

index 6c391a1d244766538b928bb6fa69ffcc4eff3615..67c974e7a322eae759025699e33d5dbe5939f8b9 100644 (file)
@@ -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;