summaryrefslogtreecommitdiff
path: root/source/smbd/blocking.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-01-14 01:41:04 +0000
committerJeremy Allison <jra@samba.org>2000-01-14 01:41:04 +0000
commit38dffd360dc2e44bfc9e751f017e24f81ff0f2fa (patch)
treef29c9edb3d18eb8d569500710127df300f4768b8 /source/smbd/blocking.c
parentf8bebf91abcaa5bda3ec8701f9242f220da8943a (diff)
downloadsamba-38dffd360dc2e44bfc9e751f017e24f81ff0f2fa.tar.gz
Added "inherit permissions" patch.
Fixed locking bug found by Andrew. Jeremy.
Diffstat (limited to 'source/smbd/blocking.c')
-rw-r--r--source/smbd/blocking.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c
index 5e7d4a0c879..292eb2455eb 100644
--- a/source/smbd/blocking.c
+++ b/source/smbd/blocking.c
@@ -208,7 +208,13 @@ static void reply_lockingX_error(blocking_lock_record *blr, int eclass, int32 ec
* of smb_lkrng structs.
*/
- for(i = blr->lock_num; i >= 0; i--) {
+ /*
+ * Ensure we don't do a remove on the lock that just failed,
+ * as under POSIX rules, if we have a lock already there, we
+ * will delete it (and we shouldn't) .....
+ */
+
+ for(i = blr->lock_num - 1; i >= 0; i--) {
int dummy1;
uint32 dummy2;
BOOL err;