DBase File locking issues (PR#20441)

Jeremy Allison jallison at cthulhu.engr.sgi.com
Mon Sep 20 18:50:32 GMT 1999

tridge at linuxcare.com wrote:
> > >   locking not supported? returning True
> >
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > This above is old crufty code that is no longer needed; it was
> > used for systems that didn't have fcntl locks. We now check
> > for these at compile time and refuse to run. I'm removing
> > this asap.
> be careful. This code was for systems that support locks on some
> filesystems but not others. For example, many Linux systems don't
> support fcntl locks at all on NFS fileystems. If you compile on ext2
> then run Samba on NFS removing that code will cause Samba to fail
> completely. That is quite a common setup.

Hmmmm. The problem is that this code masks real problems with
locking. I can see your point though, but then allowing locking
to just completely fail on a filesystem is risking file corruption.
I suppose it's one of these things that has been there a while,
and we need to make a decision on backwards compatibility or

> At the very least we would need to add docs advising users to use
> "locking = no" on filesystems that don't support fcntl locks, but I'd
> prefer to automate that with a runtime test.

That's going to be hard to do as we don't know if the
filesystem Samba is being configured on is NFS or not.


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

More information about the samba mailing list