diff options
author | Jeremy Allison <jra@samba.org> | 2001-08-26 19:39:29 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-08-26 19:39:29 +0000 |
commit | 6624b6ac0b33e7a6c5f9ef28e16584f4e847c888 (patch) | |
tree | cb8f89316ede3ba7d28c870654629cb0b534f9d5 | |
parent | 92b057bfe7569a86b0629f365e28367b8f3c4039 (diff) | |
download | samba-6624b6ac0b33e7a6c5f9ef28e16584f4e847c888.tar.gz samba-6624b6ac0b33e7a6c5f9ef28e16584f4e847c888.tar.xz samba-6624b6ac0b33e7a6c5f9ef28e16584f4e847c888.zip |
Ignore locks of length zero as they mean different things in Win32
and POSIX.
Jeremy.
-rw-r--r-- | source/locking/posix.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/locking/posix.c b/source/locking/posix.c index f4071ff96ad..6a621200ca0 100644 --- a/source/locking/posix.c +++ b/source/locking/posix.c @@ -582,6 +582,17 @@ static BOOL posix_lock_in_range(SMB_OFF_T *offset_out, SMB_OFF_T *count_out, #endif /* !LARGE_SMB_OFF_T || HAVE_BROKEN_FCNTL64_LOCKS */ /* + * POSIX locks of length zero mean lock to end-of-file. + * Win32 locks of length zero are point probes. Ignore + * any Win32 locks of length zero. JRA. + */ + + if (count == (SMB_OFF_T)0) { + DEBUG(10,("posix_lock_in_range: count = 0, ignoring.\n")); + return False; + } + + /* * If the given offset was > max_positive_lock_offset then we cannot map this at all * ignore this lock. */ |