Bug 14731 - Fix returned attributes on fake quota file handle and avoid hitting the VFS
Summary: Fix returned attributes on fake quota file handle and avoid hitting the VFS
Status: ASSIGNED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: 4.14.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-07 17:15 UTC by Ralph Böhme
Modified: 2021-06-14 07:33 UTC (History)
2 users (show)

See Also:


Attachments
Patch for 4.14 cherry-picked from master (10.02 KB, patch)
2021-06-10 12:40 UTC, Ralph Böhme
jra: review+
Details
Patch for 4.13 backported from master (8.60 KB, patch)
2021-06-10 12:43 UTC, Ralph Böhme
no flags Details
Re-upload with my RB+ added for 4.13. (8.65 KB, patch)
2021-06-11 00:33 UTC, Jeremy Allison
slow: review-
Details
Patch for 4.13 backported from master (8.70 KB, patch)
2021-06-11 13:19 UTC, Ralph Böhme
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2021-06-07 17:15:18 UTC
When processing an SMB2 CREATE requests on the quote fake file "$Extend/$Quota" we end up calling into the VFS with SMB_VFS_GET_DOSATTRIBUTES via fdos_mode().

Typically the VFS will have no idea what about this special quota related NTFS file and specifically vfs_gpfs will log an error message:

  vfs_gpfs_get_dos_attributes: Getting winattrs failed for $Extend/$Quota

We must avoid hitting the VFS and prime the correct DOS attributes in fdos_mode(). While at it, fix the returned attributes (DOS attributes and timestamps) while at it.

Have patch, need bugnumber.
Comment 1 Samba QA Contact 2021-06-09 20:39:04 UTC
This bug was referenced in samba master:

1e338d51602a7dca6108e5e8704f5cdde4740713
51b0fd0c566ff6bf112ab9752d9b105a6bb786a8
e093eaed1046638193d973c39fa9df74e41148d3
52a421111218d94d2e5cb131648bcdf5411d910b
Comment 2 Ralph Böhme 2021-06-10 12:40:25 UTC
Created attachment 16647 [details]
Patch for 4.14 cherry-picked from master
Comment 3 Ralph Böhme 2021-06-10 12:43:09 UTC
Created attachment 16648 [details]
Patch for 4.13 backported from master

Patch 2/3 is new/different compared to what's in master. In master we're changing fdos_mode() function, checking fsp->fake_handle. In 4.13 we're still using path based dos_mode(), so the check has to be done differently.

After reviewing, please remember to download the patch and add your reviewed-by to 2/3.

Thanks!
Comment 4 Jeremy Allison 2021-06-11 00:33:57 UTC
Created attachment 16649 [details]
Re-upload with my RB+ added for 4.13.

LGTM. RB+.
Comment 5 Ralph Böhme 2021-06-11 13:18:19 UTC
Comment on attachment 16649 [details]
Re-upload with my RB+ added for 4.13.

Drat, patch 2/3 is missing bug URL.
Comment 6 Ralph Böhme 2021-06-11 13:19:00 UTC
Created attachment 16650 [details]
Patch for 4.13 backported from master
Comment 7 Ralph Böhme 2021-06-11 13:19:57 UTC
Reassigning to Karolin for inclusion in 4.13 and 4.14..
Comment 8 Karolin Seeger 2021-06-14 07:33:59 UTC
(In reply to Ralph Böhme from comment #7)
Pushed to autobuild-v4-{14,13}-test.