diff options
author | Jeremy Allison <jra@samba.org> | 2009-12-04 14:04:08 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2009-12-04 14:04:08 -0800 |
commit | 32915ceefc718621e2e9b17fee97da82744ab67a (patch) | |
tree | 1cc86482f9a9e0210e060b8c6343e3706e59fa67 /source3/locking | |
parent | 1d3942c534791e7767b64be383e6e035b164c506 (diff) | |
download | samba-32915ceefc718621e2e9b17fee97da82744ab67a.tar.gz |
Make Samba3 pass the RAW-LOCK test as Windows.
Implement the win7 NT_STATUS_INVALID_LOCK_RANGE.
Make smbd behave as Windows does in canceling locks.
Jeremy.
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/brlock.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index b021293c7b8..22c6c9e5b33 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -333,6 +333,11 @@ NTSTATUS brl_lock_windows_default(struct byte_range_lock *br_lck, SMB_ASSERT(plock->lock_type != UNLOCK_LOCK); for (i=0; i < br_lck->num_locks; i++) { + if (locks[i].start + locks[i].size < locks[i].start) { + /* 64-bit wrap. Error. */ + return NT_STATUS_INVALID_LOCK_RANGE; + } + /* Do any Windows or POSIX locks conflict ? */ if (brl_conflict(&locks[i], plock)) { /* Remember who blocked us. */ |