RE : Vim detects a file on a VMS Samba share has changed when it has not

2005-04-04 Thread COLLOT Jean-Yves
It is true that the VMS modification is changed when the file is opened in
read/write mode, even if the file is not actually written. In fact, the
modification date is changed when the file is closed.

In order to fix that, in version 2.2.8, Samba keeps track if the file is
really changed (i.e. written) or not. When the close request is received,
and if the file was not really written, then the modification date is forced
to the old modification date (the one the file had when opened).
Note that the number of revisions field is not reset, so we have a file
with a higher number of revisions, but the same modification date. I guess
it would be better if the number of revisions was reset too. I'll make that
change when I have time.

Now, what happens with VIM? For the moment, I really don't know, because I
can't reproduce the problem, probably because I don't have the same
environment. 
What I can see when I try to use vim/cream on my systems is:
1. Just after the beginning of the edit, the number of revisions in
increased by 2 with vim alone, and by 3 with cream over vim.
2. The number of revisions does not change after that
3. The modification date is correctly reset (i.e. it does not change)
whatever the file owner is.

If I compare with what happens in Ben Armstrong's environment, I can see the
following differences:
1. The number of revisions is increased by 4 as soon as the editing begins
2. The number of revisions seems to be increased continuously
3. When the editor is not the owner of the file, the modification date is
not correctly reset.

I think that differences 1 and 2 are caused by the fact we don't have the
exact same version of vim, and/or we do not have the exact same cream
configuration. I suggest to Ben to try with vim alone (i.e. without the
cream layer) to see what happens (check that the behaviour is the same as
mine).

I don't understand difference 3. It could be some privilege or file
protection issue. However, I try with users without any privileges, and my
file protection, as far as I know, are the same as Ben's, and I can't get
the same results. Could you give me all the details about the file
protections and the characteristics of your users?

If we can't find the reason, I plan to give to Ben a modified module that
will do more logging about the modification time reset processing.

JY


PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html


Re: RE : Vim detects a file on a VMS Samba share has changed when it has not

2005-04-04 Thread BG - Ben Armstrong
On Mon, 2005-04-04 at 12:02 +0200, COLLOT Jean-Yves wrote:
 I think that differences 1 and 2 are caused by the fact we don't have the
 exact same version of vim, and/or we do not have the exact same cream
 configuration. I suggest to Ben to try with vim alone (i.e. without the
 cream layer) to see what happens (check that the behaviour is the same as
 mine).

I tried with Vim alone.  The bug is not reproducible.

 I don't understand difference 3. It could be some privilege or file
 protection issue. However, I try with users without any privileges, and my
 file protection, as far as I know, are the same as Ben's, and I can't get
 the same results. Could you give me all the details about the file
 protections and the characteristics of your users?

Users are all unprivileged and belong to the [dv,*] group.  Nightly, a
generic dymax user (also unprivileged) handles batch processing of our
task files.  Thus, on a typical morning when I'm deciding what to do
for the day, my task file initially is owned by [dv,dymax].  Several
seconds after I start editing this file with Cream, the warning message
is triggered.  If I write the file, it becomes owned by [dv,bg] (my vms
uid) and no further warnings appear.  If I subsequently edit this file
now owned by [dv,bg] the warning no longer appears.  Also, if, before I
start editing, I change the ownership alone (e.g. by set file/own=bg
from a privileged account) and edit it (i.e. without first changing the
file type from Variable to Stream) the warning no longer appears.  So
far as I can see, ownership is definitely a factor.

 If we can't find the reason, I plan to give to Ben a modified module that
 will do more logging about the modification time reset processing.

That would be helpful, thanks.  I'll have to wait for Rod to finish his
vacation before installing it, though.  He's coming back a week from
tomorrow.  So, if I have time, I'll see what else I can do to try to
isolate the problem and/or make it reproducible for you this week.

Thanks,
Ben

PLEASE READ THIS IMPORTANT ETIQUETTE MESSAGE BEFORE POSTING:

http://www.catb.org/~esr/faqs/smart-questions.html