Bug 10639 - close() overwrites timestamp set by utimes()
Summary: close() overwrites timestamp set by utimes()
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 4.1.7
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
Depends on:
Reported: 2014-05-28 07:54 UTC by Ross Lagerwall
Modified: 2014-05-28 07:54 UTC (History)
0 users

See Also:

test program (952 bytes, text/x-csrc)
2014-05-28 07:54 UTC, Ross Lagerwall
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Lagerwall 2014-05-28 07:54:31 UTC
Created attachment 9988 [details]
test program

From a gvfs bug [1], if the following operations occur, the close() updates the mtime set by utimes (not the atime).

This causes problems with our fuse layer because some programs (like cp --preserve=timestamp) set the mtime before the final close, which causes timestamps not to be preserved.

This works as expected with normal POSIX operations and with the cifs kernel module. It also looks a bit like bug 6520.

I have attached a test program to demonstrate the issue.

Thanks for looking at this!