The Samba-Bugzilla – Attachment 4401 Details for
Bug 6538
Fail to back out lockingX calls on error.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Metze's patch, back ported to 3.3
0001-s3-smbd-cancel-all-locks-that-are-made-before-the-f.patch (text/plain), 1.22 KB, created by
Jeremy Allison
on 2009-07-07 15:37:08 UTC
(
hide
)
Description:
Metze's patch, back ported to 3.3
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-07-07 15:37:08 UTC
Size:
1.22 KB
patch
obsolete
>From fcd2aa703e578b4ea3ebc9d3ee8fd4624f737b40 Mon Sep 17 00:00:00 2001 >From: Stefan Metzmacher <metze@samba.org> >Date: Tue, 7 Jul 2009 13:33:05 -0700 >Subject: [PATCH] s3:smbd: cancel all locks that are made before the first failure > >We never reached the cleanup code and directly returned the error. > >metze >--- > source/smbd/reply.c | 13 +++++++------ > 1 files changed, 7 insertions(+), 6 deletions(-) > >diff --git a/source/smbd/reply.c b/source/smbd/reply.c >index 46653cd..7c26c08 100644 >--- a/source/smbd/reply.c >+++ b/source/smbd/reply.c >@@ -7027,18 +7027,19 @@ void reply_lockingX(struct smb_request *req) > } > > if (NT_STATUS_V(status)) { >- END_PROFILE(SMBlockingX); >- reply_nterror(req, status); >- return; >+ break; > } > } > > /* If any of the above locks failed, then we must unlock > all of the previous locks (X/Open spec). */ > >- if (!(locktype & LOCKING_ANDX_CANCEL_LOCK) && >- (i != num_locks) && >- (num_locks != 0)) { >+ if (num_locks != 0 && !NT_STATUS_IS_OK(status)) { >+ >+ if (locktype & LOCKING_ANDX_CANCEL_LOCK) { >+ i = -1; /* we want to skip the for loop */ >+ } >+ > /* > * 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 >-- >1.5.4.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 6538
:
4400
| 4401 |
4408