The Samba-Bugzilla – Attachment 8675 Details for
Bug 9733
smbcontrol close-share is not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Modified git-am fix for 3.6.x
0001-Fix-bug-9733-smbcontrol-close-share-is-not-working.patch (text/plain), 1.79 KB, created by
Jeremy Allison
on 2013-03-22 16:24:36 UTC
(
hide
)
Description:
Modified git-am fix for 3.6.x
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2013-03-22 16:24:36 UTC
Size:
1.79 KB
patch
obsolete
>From 287d7180b471521aef527c2ebf292fa198a1a816 Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Thu, 21 Mar 2013 13:59:20 -0700 >Subject: [PATCH] Fix bug #9733 - smbcontrol close-share is not working. > >As part of forcibly disconnecting a client from a share, >smbd must atomically call reload_services() to ensure that >the entry in the ServicePtrs[] array corresponding to >that share is removed if the share was removed from >the smb.conf or registry entries. > >Otherwise the ServicePtrs[] array entry for the share >remains active and the client races to auto-reconnect to >the share before a second message to reload the smb.conf >file can be sent. > >This has to be done as part of the close-share message >processing, as removing the share from the smb.conf file >first, then telling the smbd to reload followed by the >forcible disconnect message doesn't work as in this >sequence of events when the reload message is received >the client is still connected to the share, so the >ServicePtrs[] entry is still left active. > >The forcible-disconnect + service reload has to be done >together as an atomic operation in order for this to work. > >Signed-off-by: Jeremy Allison <jra@samba.org> >--- > source3/smbd/conn.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/source3/smbd/conn.c b/source3/smbd/conn.c >index 8a96e88..05e692f 100644 >--- a/source3/smbd/conn.c >+++ b/source3/smbd/conn.c >@@ -481,7 +481,7 @@ void msg_force_tdis(struct messaging_context *msg, > if (strcmp(sharename, "*") == 0) { > DEBUG(1,("Forcing close of all shares\n")); > conn_close_all(sconn); >- return; >+ goto done; > } > > if (sconn->using_smb2) { >@@ -512,4 +512,9 @@ void msg_force_tdis(struct messaging_context *msg, > } > } > } >+ >+ done: >+ >+ change_to_root_user(); >+ reload_services(msg, -1, true); > } >-- >1.8.1.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
Flags:
ddiss
:
review+
Actions:
View
Attachments on
bug 9733
:
8671
|
8672
| 8675