[SCM] Samba Shared Repository - branch v4-4-test updated
Karolin Seeger
kseeger at samba.org
Mon Mar 13 12:04:06 UTC 2017
The branch, v4-4-test has been updated
via 9359b07 smbd: Do an early exit on negprot failure
via b86d92b vfs_fruit: enabling AAPL extensions must be a global switch
from 083ff22 s3: smbd: Restart reading the incoming SMB2 fd when the send queue is drained.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-4-test
- Log -----------------------------------------------------------------
commit 9359b078b369738022a122ce3815b8a6e4806954
Author: Volker Lendecke <vl at samba.org>
Date: Tue Feb 28 15:03:45 2017 +0000
smbd: Do an early exit on negprot failure
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12610
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Ralph Böhme <slow at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
(cherry picked from commit cf9acf9a3da932fca115967eb3d9d9ed48fcbbfc)
Autobuild-User(v4-4-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-4-test): Mon Mar 13 13:03:15 CET 2017 on sn-devel-144
commit b86d92b9399b9d2156228831a7dbd1091028a6d1
Author: Ralph Boehme <slow at samba.org>
Date: Tue Feb 28 09:39:37 2017 +0100
vfs_fruit: enabling AAPL extensions must be a global switch
Apple's SMB2 AAPL extension is enabled once per SMB2
connection. Unfortunately the (per se correct) fix for bug #12541
results in vfs_fruit checking a per tcon config state variable to
determine whether AAPL has been negotiated. This variable will be false
for all but the first tcon. We must make it a global variable.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12604
Signed-off-by: Ralph Boehme <slow at samba.org>
Reviewed-by: Uri Simchoni <uri at samba.org>
Autobuild-User(master): Uri Simchoni <uri at samba.org>
Autobuild-Date(master): Thu Mar 2 04:34:10 CET 2017 on sn-devel-144
(cherry picked from commit 41204a4972ea62b7b656ad81e24bd052990f7e87)
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_fruit.c | 12 ++++++++----
source3/smbd/negprot.c | 23 ++++++++++++++++-------
2 files changed, 24 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 10334ff..6ef27da 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -94,6 +94,11 @@
static int vfs_fruit_debug_level = DBGC_VFS;
+static struct global_fruit_config {
+ bool nego_aapl; /* client negotiated AAPL */
+
+} global_fruit_config;
+
#undef DBGC_CLASS
#define DBGC_CLASS vfs_fruit_debug_level
@@ -126,7 +131,6 @@ struct fruit_config_data {
enum fruit_locking locking;
enum fruit_encoding encoding;
bool use_aapl; /* config from smb.conf */
- bool nego_aapl; /* client negotiated AAPL */
bool use_copyfile;
bool readdir_attr_enabled;
bool unix_info_enabled;
@@ -1935,7 +1939,7 @@ static NTSTATUS check_aapl(vfs_handle_struct *handle,
SMB2_CREATE_TAG_AAPL,
blob);
if (NT_STATUS_IS_OK(status)) {
- config->nego_aapl = true;
+ global_fruit_config.nego_aapl = true;
}
return status;
@@ -3422,7 +3426,7 @@ static NTSTATUS fruit_create_file(vfs_handle_struct *handle,
fsp = *result;
- if (config->nego_aapl) {
+ if (global_fruit_config.nego_aapl) {
if (config->copyfile_enabled) {
/*
* Set a flag in the fsp. Gets used in
@@ -3499,7 +3503,7 @@ static NTSTATUS fruit_readdir_attr(struct vfs_handle_struct *handle,
struct fruit_config_data,
return NT_STATUS_UNSUCCESSFUL);
- if (!config->nego_aapl) {
+ if (!global_fruit_config.nego_aapl) {
return SMB_VFS_NEXT_READDIR_ATTR(handle, fname, mem_ctx, pattr_data);
}
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 793306a..176dbd7 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -723,17 +723,26 @@ void reply_negprot(struct smb_request *req)
break;
}
- if(choice != -1) {
- fstrcpy(remote_proto,supported_protocols[protocol].short_name);
- reload_services(sconn, conn_snum_used, true);
- supported_protocols[protocol].proto_reply_fn(req, choice);
- DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
- } else {
- DEBUG(0,("No protocol supported !\n"));
+ if (choice == -1) {
+ bool ok;
+
+ DBG_NOTICE("No protocol supported !\n");
reply_outbuf(req, 1, 0);
SSVAL(req->outbuf, smb_vwv0, choice);
+
+ ok = srv_send_smb(xconn, (char *)req->outbuf,
+ false, 0, false, NULL);
+ if (!ok) {
+ DBG_NOTICE("srv_send_smb failed\n");
+ }
+ exit_server_cleanly("no protocol supported\n");
}
+ fstrcpy(remote_proto,supported_protocols[protocol].short_name);
+ reload_services(sconn, conn_snum_used, true);
+ supported_protocols[protocol].proto_reply_fn(req, choice);
+ DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
+
DEBUG( 5, ( "negprot index=%d\n", choice ) );
/* We always have xconn->smb1.signing_state also for >= SMB2_02 */
--
Samba Shared Repository
More information about the samba-cvs
mailing list