Bug 12541 - vfs_fruit checks wrong AAPL config state and so always uses readdirattr
Summary: vfs_fruit checks wrong AAPL config state and so always uses readdirattr
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks: 12604
  Show dependency treegraph
 
Reported: 2017-01-26 10:49 UTC by Ralph Böhme
Modified: 2017-02-28 06:59 UTC (History)
2 users (show)

See Also:


Attachments
Patch for 4.4, 4.5 and 4.6 cherry-picked from master (1.59 KB, patch)
2017-01-31 06:38 UTC, Ralph Böhme
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2017-01-26 10:49:32 UTC
readdirattr should only be enabled if the client enables it via AAPL negotitiation, not for all clients when vfs_fruit is loaded.

This happens because in fruit_readdir_attr() the check

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

uses the wrong config state "use_aapl" which is alway true by default. Instead we should use:

  if (!config->nego_aapl) {
    return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
  }
Comment 1 Ralph Böhme 2017-01-31 06:38:23 UTC
Created attachment 12877 [details]
Patch for 4.4, 4.5 and 4.6 cherry-picked from master
Comment 2 Jeremy Allison 2017-01-31 19:37:51 UTC
Comment on attachment 12877 [details]
Patch for 4.4, 4.5 and 4.6 cherry-picked from master

LGTM.
Comment 3 Jeremy Allison 2017-01-31 19:38:16 UTC
Reassigning to Karolin for inclusion in 4.6.next, 4.5.next, 4.4.next.
Comment 4 Karolin Seeger 2017-02-01 11:53:25 UTC
(In reply to Jeremy Allison from comment #3)
Pushed to autobuild-v4-{6,5,4}-test.
Comment 5 Karolin Seeger 2017-02-13 15:44:30 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to all branches.
Closing out bug report.

Thanks!