]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: checks wrong AAPL config state and so always uses readdirattr
authorRalph Boehme <slow@samba.org>
Thu, 26 Jan 2017 10:49:55 +0000 (11:49 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 28 Jan 2017 00:49:09 +0000 (01:49 +0100)
readdirattr should only be enabled if the client enables it via AAPL
negotitiation, not for all clients when vfs_fruit is loaded.

Unfortunately the check in fruit_readdir_attr() is

  if (!config->use_aapl) {
    return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
  }

This uses the wrong config state "use_aapl" which is always true by
default (config option "fruit:aapl").

We must use "nego_aapl" instead which is only true if the client
really negotiated this feature.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12541

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jan 28 01:49:11 CET 2017 on sn-devel-144

source3/modules/vfs_fruit.c

index 9e8a78c81df0e5d38e80e92624af00f1cba7b5a8..3599dcb663705f80dc770a6a101edf18687277af 100644 (file)
@@ -3539,7 +3539,7 @@ static NTSTATUS fruit_readdir_attr(struct vfs_handle_struct *handle,
                                struct fruit_config_data,
                                return NT_STATUS_UNSUCCESSFUL);
 
-       if (!config->use_aapl) {
+       if (!config->nego_aapl) {
                return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
        }