John Malmberg wrote: > Unfortunately this is the wrong thing to do when their are multiple > users accessing the file. If one of them modifies the file on purpose, > that modification date gets lost.
Yes, that is true. > Either pure RMS or ACP calls need to be used, or an extension is needed > for the C RTL. The extension would be to allow XABs to be added on to a > file open request. I do not understand what you mean by this. Currently, the Samba routine that restores the modification date after a Read/write open and no changes of the file uses an ACP call, but it's probably not your point. In my understanding, the problem happens when : - Samba opens a file in read/write mode - Somebody else (let's name him X) opens the file in read/write mode too. Note that X is not another Samba, because the Samba locks would prevent that. - X modifies the file and closes it : the modif date is changed, for a good reason, - Samba then closes the file, with no changes done, and restores the original modif date, and that's bad. The best idea I have is to check, just before restoring the date, that the modif date is still identical to the one we got at open time, but even this is not 100% sure. You have probably a better idea, so please tell me. PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING: http://www.catb.org/~esr/faqs/smart-questions.html