]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: fix fruit_ntimes() for the fruit:metadata!=netatalk case
authorRalph Boehme <slow@samba.org>
Fri, 2 Dec 2016 14:57:22 +0000 (15:57 +0100)
committerUri Simchoni <uri@samba.org>
Wed, 1 Mar 2017 23:32:21 +0000 (00:32 +0100)
The following code must only be executed for the fruit:metadata=netatalk
case. Otherwise no change in behaviour.

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 6f5ca7ea8fd0af0e9039629a9059eb8b69123285..f80e5d0a85e350b1ff3dd67bf4a2e2a74a9a6efe 100644 (file)
@@ -4209,9 +4209,15 @@ static int fruit_ntimes(vfs_handle_struct *handle,
 {
        int rc = 0;
        struct adouble *ad = NULL;
+       struct fruit_config_data *config = NULL;
 
-       if (null_timespec(ft->create_time)) {
-               goto exit;
+       SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data,
+                               return -1);
+
+       if ((config->meta != FRUIT_META_NETATALK) ||
+           null_timespec(ft->create_time))
+       {
+               return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
        }
 
        DEBUG(10,("set btime for %s to %s\n", smb_fname_str_dbg(smb_fname),