MS Excel/NT/Samba timestamp - serious problem, bug?
Todd Pfaff
pfaff at edge.cis.mcmaster.ca
Tue Jan 25 04:12:53 GMT 2000
Jeremy,
Do you think that this timestamp issue could be the cause of the problems
I recently reported with MS Office applications on NT workstations when
sharing office documents amongst a group of users on a samba-2.0.6 share?
(ie. various problems with documents being unreadable/unwriteable by users
in a group even though the unix permissions and share permissions should
allow all the users to read and write)?
I haven't gone to any effort to make sure all the nt workstations are time
synched with the samba server. Maybe this is a necessity. What is the
easiest way to accomplish this? Is it as simple as setting 'time server =
yes', giving all nt users the right to set the time, and putting a 'net
time' command in the nt logon batch file?
I haven't found any other solution to my problems, so I guess I'll try the
patch.
On Tue, 25 Jan 2000, Jeremy Allison wrote:
> Glen Gunsalus wrote:
> >
> > A rather distressing timestamp issue (to multiple users here). Anyone
> > seen similar behavior or have a suggestion/solution?
> >
> > Problem:
> >
> > Opening and closing an excel file (no changes/keystrokes to file) on
> > the Samba server causes the file to be saved with time stamp of
> > closing. (There is no autosave set on Excel - also see other info below)
>
> Can you try the following patch to 2.0.6 (this will be in
> 2.0.7) and report if it fixes your problem.
>
> Thanks,
>
> Jeremy Allison,
> Samba Team.
>
> -------------------cut here---------------------------------
> --- /home/jeremy/tmp/samba-2.0.6/source/smbd/trans2.c Wed Nov 10 18:36:11 1999
> +++ smbd/trans2.c Tue Dec 21 11:10:31 1999
> @@ -1694,14 +1694,25 @@
>
> case SMB_SET_FILE_BASIC_INFO:
> {
> + /* Patch to do this correctly from Paul Eggert <eggert at twinsun.com>. */
> + time_t write_time;
> + time_t changed_time;
> +
> /* Ignore create time at offset pdata. */
>
> /* access time */
> tvs.actime = interpret_long_date(pdata+8);
>
> - /* write time + changed time, combined. */
> - tvs.modtime=MIN(interpret_long_date(pdata+16),
> - interpret_long_date(pdata+24));
> + write_time = interpret_long_date(pdata+16);
> + changed_time = interpret_long_date(pdata+24);
> +
> + tvs.modtime = MIN(write_time, changed_time);
> +
> + /* Prefer a defined time to an undefined one. */
> + if (tvs.modtime == (time_t)0 || tvs.modtime == (time_t)-1)
> + tvs.modtime = (write_time == (time_t)0 || write_time == (time_t)-1
> + ? changed_time
> + : write_time);
>
> #if 0 /* Needs more testing... */
> /* Test from Luke to prevent Win95 from
> -------------------cut here---------------------------------
>
> --
> --------------------------------------------------------
> Buying an operating system without source is like buying
> a self-assembly Space Shuttle with no instructions.
> --------------------------------------------------------
>
--
Todd Pfaff \ Email: pfaff at mcmaster.ca
Computing and Information Services \ Voice: (905) 525-9140 x22920
ABB 132 \ FAX: (905) 528-3773
McMaster University \
Hamilton, Ontario, Canada L8S 4M1 \
More information about the samba
mailing list