[SCM] Samba Shared Repository - branch v4-5-test updated
Karolin Seeger
kseeger at samba.org
Mon Mar 13 16:09:03 UTC 2017
The branch, v4-5-test has been updated
via 73f6042 smbd: Do an early exit on negprot failure
from 520e1a5 VERSION: Bump version up to 4.5.7...
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test
- Log -----------------------------------------------------------------
commit 73f604291034d0efb6807b2974e5dfe38ca973d4
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-5-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-5-test): Mon Mar 13 17:08:45 CET 2017 on sn-devel-144
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/negprot.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
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