diff options
author | Jeremy Allison <jra@samba.org> | 2000-01-14 01:41:04 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-01-14 01:41:04 +0000 |
commit | 3a6c2069d77176bfa2b379ef711034396c477791 (patch) | |
tree | 87597146847db54925106d9e40b90b31ad86c852 /source3/smbd/blocking.c | |
parent | 2afd5d5eb5c176f09a9f4f00ea3b517e89ef0ddf (diff) | |
download | samba-3a6c2069d77176bfa2b379ef711034396c477791.tar.gz samba-3a6c2069d77176bfa2b379ef711034396c477791.tar.bz2 samba-3a6c2069d77176bfa2b379ef711034396c477791.zip |
Added "inherit permissions" patch.
Fixed locking bug found by Andrew.
Jeremy.
(This used to be commit 38dffd360dc2e44bfc9e751f017e24f81ff0f2fa)
Diffstat (limited to 'source3/smbd/blocking.c')
-rw-r--r-- | source3/smbd/blocking.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index 5e7d4a0c87..292eb2455e 100644 --- a/source3/smbd/blocking.c +++ b/source3/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; |