Bug 15940 - vfs_recycle does not update mtime
Summary: vfs_recycle does not update mtime
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: VFS Modules (show other bugs)
Version: 4.21.0
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Jule Anger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-10-30 13:31 UTC by Pavel Filipenský
Modified: 2025-11-07 13:24 UTC (History)
1 user (show)

See Also:


Attachments
4.23 patch (10.67 KB, patch)
2025-11-04 12:22 UTC, Pavel Filipenský
asn: review+
Details
4.22 patch (10.67 KB, patch)
2025-11-04 12:23 UTC, Pavel Filipenský
asn: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Filipenský 2025-10-30 13:31:14 UTC
Since samba-4.22 vfs_recycle fails to update ctime/mtime if keeptree is set:

recycle:keeptree = Yes
recycle:touch = Yes

Fix is in progress: https://gitlab.com/samba-team/samba/-/merge_requests/4284
Comment 1 Pavel Filipenský 2025-10-30 19:03:38 UTC
Commit "7839fa Remove non_widelink_open()"

has changed fd_openat() - it is no longer calling non_widelink_open() and did this:


+       if (ISDOT(name_in)) {
+               /*
+                * filename_convert_dirfsp does not like ".", use ""
+                */
+               name_in += 1;
        }


It checks that the input "smb_fname->base_name" is not ".".
Actually if "smb_fname->base_name" is e.g. ".trash/./filename", the filename_convert_dirfsp() fails as well, because one of the component is ".".
Comment 2 Samba QA Contact 2025-11-04 11:39:03 UTC
This bug was referenced in samba master:

498984cf346630c17169dbdb13a232854309f6a8
5124acec34c20391cdfeb9d9005365047b7d7eee
9bbdfee7f2fdeee3cf530becb2a6f06345627b23
Comment 3 Pavel Filipenský 2025-11-04 12:22:49 UTC
Created attachment 18765 [details]
4.23 patch
Comment 4 Pavel Filipenský 2025-11-04 12:23:19 UTC
Created attachment 18766 [details]
4.22 patch
Comment 5 Pavel Filipenský 2025-11-04 12:27:29 UTC
Jule please apply 4.23 and 4.22 patches.
Comment 6 Jule Anger 2025-11-05 09:05:42 UTC
Pushed to autobuild-v4-{23,22}-test.
Comment 7 Samba QA Contact 2025-11-05 10:05:04 UTC
This bug was referenced in samba v4-22-test:

56ff3d96aa3786ead388541a669d863b24b38c0e
cd92005e35caa5f6fbedfaa1b90ad4ef87e0c5ff
f318a44c526beb8ba412fa569140953e9be7e303
Comment 8 Samba QA Contact 2025-11-05 14:29:03 UTC
This bug was referenced in samba v4-23-test:

633a74d3d6035a426564dade56b36c6f3ee2f5b6
ad4bbed0563fe27a9b95ae0c460d4e771745bfbd
74001ee99f00c3de9a90111b3c70a8808dfbfb83
Comment 9 Jule Anger 2025-11-06 12:37:15 UTC
Closing out bug report.

Thanks!
Comment 10 Samba QA Contact 2025-11-07 13:24:32 UTC
This bug was referenced in samba v4-23-stable (Release samba-4.23.3):

633a74d3d6035a426564dade56b36c6f3ee2f5b6
ad4bbed0563fe27a9b95ae0c460d4e771745bfbd
74001ee99f00c3de9a90111b3c70a8808dfbfb83