[PATCH] vfs_fruit checks wrong AAPL config state and so always uses readdirattr
Jeremy Allison
jra at samba.org
Fri Jan 27 20:59:15 UTC 2017
On Thu, Jan 26, 2017 at 12:40:26PM +0100, Ralph Böhme wrote:
> Hi!
>
> Attached is a simple fix for this bug:
> <https://bugzilla.samba.org/show_bug.cgi?id=12541>
>
> Kudos to Shilpa Krishnareddy who spotted this!
>
> Please review & push if happy. Thanks!
LGTM. Obvious fix ! Pushed.
Thanks,
Jeremy.
> From 5f78c4cd7d959ad9208cefd15641d89efd1513b8 Mon Sep 17 00:00:00 2001
> From: Ralph Boehme <slow at samba.org>
> Date: Thu, 26 Jan 2017 11:49:55 +0100
> Subject: [PATCH] vfs_fruit: checks wrong AAPL config state and so always uses
> readdirattr
>
> 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 at samba.org>
> ---
> source3/modules/vfs_fruit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
> index c46fdbf..028ea0d 100644
> --- a/source3/modules/vfs_fruit.c
> +++ b/source3/modules/vfs_fruit.c
> @@ -4992,7 +4992,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);
> }
>
> --
> 2.7.4
>
More information about the samba-technical
mailing list