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: RESOLVED FIXED
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-09-07 07:13 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.
Comment 9 Karolin Seeger 2021-07-19 06:23:55 UTC
Pushed to the test branches and included in the last releases.
Closing out bug report.

Thanks!
Comment 10 Karolin Seeger 2021-07-19 06:28:54 UTC
(In reply to Karolin Seeger from comment #9)
Please ignore, wrong bug report -> re-opening
Comment 11 Samba QA Contact 2021-07-19 07:10:21 UTC
This bug was referenced in samba v4-13-test:

7ecf16506616c7f3071c8c2206cfda17b7743351
a3dea8a0d088c7624c1a81a81873c96c068bcdbd
97c6d6fee8a133c2f647f9c588f863ab9c4e15c9
Comment 12 Karolin Seeger 2021-07-20 07:06:04 UTC
Pushed to v4-14-test.
Closing out bug report.

Thanks!
Comment 13 Samba QA Contact 2021-08-17 10:25:13 UTC
This bug was referenced in samba v4-14-test:

8abd1abca64bd9034482498484310692a411b9dd
7e1d4a4b1385b9bc75ce61531c8df77584bb9ead
b53968656eee6c57e281ee32bff1d4643b4292f0
46995a8b14675f30536a65ceeaf687fa7cbedd9e
Comment 14 Samba QA Contact 2021-08-24 13:26:20 UTC
This bug was referenced in samba v4-14-stable (Release samba-4.14.7):

8abd1abca64bd9034482498484310692a411b9dd
7e1d4a4b1385b9bc75ce61531c8df77584bb9ead
b53968656eee6c57e281ee32bff1d4643b4292f0
46995a8b14675f30536a65ceeaf687fa7cbedd9e
Comment 15 Samba QA Contact 2021-09-07 07:13:37 UTC
This bug was referenced in samba v4-13-stable (Release samba-4.13.11):

7ecf16506616c7f3071c8c2206cfda17b7743351
a3dea8a0d088c7624c1a81a81873c96c068bcdbd
97c6d6fee8a133c2f647f9c588f863ab9c4e15c9