summaryrefslogtreecommitdiff
path: root/source3/smbd/process.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2015-06-10 17:07:15 +0200
committerKarolin Seeger <kseeger@samba.org>2015-07-19 22:23:18 +0200
commitd7d60d837e236f2dfee873158e5df6640e17136d (patch)
tree593cf544fdb4152edbbe08ae40effb94a982e3e1 /source3/smbd/process.c
parent7127c60daabfdb54434db0ef030f763ca650b2b4 (diff)
downloadsamba-d7d60d837e236f2dfee873158e5df6640e17136d.tar.gz
s3-smbd: reset protocol in smbXsrv_connection_init_tables failure paths.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11373 Guenther Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Guenther Deschner <gd@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Sun Jul 19 22:23:18 CEST 2015 on sn-devel-104
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r--source3/smbd/process.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 9d845782ffe..4a27f2cebe4 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -3292,36 +3292,41 @@ NTSTATUS smbXsrv_connection_init_tables(struct smbXsrv_connection *conn,
{
NTSTATUS status;
- set_Protocol(protocol);
conn->protocol = protocol;
if (protocol >= PROTOCOL_SMB2_02) {
status = smb2srv_session_table_init(conn);
if (!NT_STATUS_IS_OK(status)) {
+ conn->protocol = PROTOCOL_NONE;
return status;
}
status = smb2srv_open_table_init(conn);
if (!NT_STATUS_IS_OK(status)) {
+ conn->protocol = PROTOCOL_NONE;
return status;
}
} else {
status = smb1srv_session_table_init(conn);
if (!NT_STATUS_IS_OK(status)) {
+ conn->protocol = PROTOCOL_NONE;
return status;
}
status = smb1srv_tcon_table_init(conn);
if (!NT_STATUS_IS_OK(status)) {
+ conn->protocol = PROTOCOL_NONE;
return status;
}
status = smb1srv_open_table_init(conn);
if (!NT_STATUS_IS_OK(status)) {
+ conn->protocol = PROTOCOL_NONE;
return status;
}
}
+ set_Protocol(protocol);
return NT_STATUS_OK;
}