1 |
From c638ce839bb7ac754c1cbb61afcc700bac8788fc Mon Sep 17 00:00:00 2001 |
2 |
From: =?UTF-8?q?G=C3=BCnther=20Deschner?= <gd@samba.org> |
3 |
Date: Wed, 10 Jun 2015 17:07:15 +0200 |
4 |
Subject: [PATCH] s3-smbd: reset protocol in smbXsrv_connection_init_tables |
5 |
failure paths. |
6 |
|
7 |
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11373 |
8 |
|
9 |
Guenther |
10 |
|
11 |
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> |
12 |
Pair-Programmed-With: Michael Adam <obnox@samba.org> |
13 |
|
14 |
Signed-off-by: Guenther Deschner <gd@samba.org> |
15 |
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
16 |
Signed-off-by: Michael Adam <obnox@samba.org> |
17 |
Reviewed-by: Andreas Schneider <asn@samba.org> |
18 |
--- |
19 |
source3/smbd/process.c | 7 ++++++- |
20 |
1 file changed, 6 insertions(+), 1 deletion(-) |
21 |
|
22 |
diff --git a/source3/smbd/process.c b/source3/smbd/process.c |
23 |
index 958c82b..c83f3bc 100644 |
24 |
--- a/source3/smbd/process.c |
25 |
+++ b/source3/smbd/process.c |
26 |
@@ -3464,36 +3464,41 @@ NTSTATUS smbXsrv_connection_init_tables(struct smbXsrv_connection *conn, |
27 |
{ |
28 |
NTSTATUS status; |
29 |
|
30 |
- set_Protocol(protocol); |
31 |
conn->protocol = protocol; |
32 |
|
33 |
if (protocol >= PROTOCOL_SMB2_02) { |
34 |
status = smb2srv_session_table_init(conn); |
35 |
if (!NT_STATUS_IS_OK(status)) { |
36 |
+ conn->protocol = PROTOCOL_NONE; |
37 |
return status; |
38 |
} |
39 |
|
40 |
status = smb2srv_open_table_init(conn); |
41 |
if (!NT_STATUS_IS_OK(status)) { |
42 |
+ conn->protocol = PROTOCOL_NONE; |
43 |
return status; |
44 |
} |
45 |
} else { |
46 |
status = smb1srv_session_table_init(conn); |
47 |
if (!NT_STATUS_IS_OK(status)) { |
48 |
+ conn->protocol = PROTOCOL_NONE; |
49 |
return status; |
50 |
} |
51 |
|
52 |
status = smb1srv_tcon_table_init(conn); |
53 |
if (!NT_STATUS_IS_OK(status)) { |
54 |
+ conn->protocol = PROTOCOL_NONE; |
55 |
return status; |
56 |
} |
57 |
|
58 |
status = smb1srv_open_table_init(conn); |
59 |
if (!NT_STATUS_IS_OK(status)) { |
60 |
+ conn->protocol = PROTOCOL_NONE; |
61 |
return status; |
62 |
} |
63 |
} |
64 |
|
65 |
+ set_Protocol(protocol); |
66 |
return NT_STATUS_OK; |
67 |
} |
68 |
|
69 |
-- |
70 |
2.4.3 |
71 |
|