byte range locking

Andrew Tridgell tridge at linuxcare.com
Thu Jan 13 01:09:27 GMT 2000


> Yes it does (as far as I know). In what way does it fail ?

it fails with the following:

1) uid = 1, open file read only, that user doesn't have perm to open read-write
2) uid = 2, open file read-write, that user does have write access

the uid multiplexing code can't cope with this. I don't think there is
any way to make it cope without introducing a race (you would have to
do the opens as root which leads to much worse races!). This situation
can happen with packages like winframe.

> (look at the uid_cache code). I *really* don't like the idea of
> introducing races here. This will silently corrupt Word files.

there is no race from the SMB clients view! You can't end up with any
data corruption. There is a race from the posix locks view, but I
believe that is unavoidable if we want full SMB lock semantics.

in reality any mapping of SMB locks to posix locks can never be relied
on. There are just too many fundamental differences.

Cheers, Tridge


More information about the samba-technical mailing list