utime and backing up files

Jeremy Allison jallison at whistle.com
Wed Oct 15 21:36:00 GMT 1997


Jim Morris wrote:

> Yes - I ran into the same problem several years back with a Samba
> share used by multiple users to store PVCS files, as well as just
> straight copies of source code.  If one user overwrote a file
> belonging to another, the timestamp got set to the current Samba
> server time, and NOT the actual file timestamp.
>
> Because of this, at the time Andrew Tridgell implemented a fix that
> has been working perfectly for me for the last two years, but which to
> my knowledge has never been documented.
>
> To enable the fix, you need to add "-DUTIME_WORKAROUND=1" to the
> compiler options in the Samba makefile, and then rebuilt Samba from
> the source - i.e. do a "make" and "make install".  To have the change
> actually take effect, you will need to have all your affected users
> log out of the server, and then back in - to ensure that they reload
> smbd from the new binary.

Well this fix is not documented as it would completely break
the new share mode code in Samba 1.9.17 - I really should remove
the code in the #ifdef as it is *very* wrong. Andrew & I have
discussed a fix - he has done some preliminary work with
the new become_root() calls in Samba 1.9.17p3, I have to do
the easy part now :-).

Essentially we'll probably add a runtime option that allows
Samba administrators who wish it to enable Samba to break
strict UNIX semantics by allowing users who can write to
a file to be able to change its timestamp (which is DOS
semantics - as there are no inodes in DOS). As this would
strictly not be POSIX complient we'll leave it turned off
by default but selectable for people who understand what
it will allow.

It'll probably only make it into the Samba 1.9.18 series
(coming soon, oplock support ! :-).

Hope this helps,

	Jeremy Allison,
	Samba Team.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba mailing list