lib/param: add support for "SMB2_24" in smb.conf options
[mat/samba.git] / lib / param / param_enums.c
1 /*
2    Unix SMB/CIFS implementation.
3    Parameter loading functions
4    Copyright (C) Karl Auer 1993-1998
5
6    Largely re-written by Andrew Tridgell, September 1994
7
8    Copyright (C) Simo Sorce 2001
9    Copyright (C) Alexander Bokovoy 2002
10    Copyright (C) Stefan (metze) Metzmacher 2002
11    Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003
12    Copyright (C) Michael Adam 2008
13    Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
14    Copyright (C) Andrew Bartlett 2011
15
16    This program is free software; you can redistribute it and/or modify
17    it under the terms of the GNU General Public License as published by
18    the Free Software Foundation; either version 3 of the License, or
19    (at your option) any later version.
20
21    This program is distributed in the hope that it will be useful,
22    but WITHOUT ANY WARRANTY; without even the implied warranty of
23    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24    GNU General Public License for more details.
25
26    You should have received a copy of the GNU General Public License
27    along with this program.  If not, see <http://www.gnu.org/licenses/>.
28 */
29
30 static const struct enum_list enum_protocol[] = {
31         {PROTOCOL_SMB2_02, "SMB2"}, /* for now keep PROTOCOL_SMB2_02 */
32         {PROTOCOL_SMB2_24, "SMB2_24"},
33         {PROTOCOL_SMB2_22, "SMB2_22"},
34         {PROTOCOL_SMB2_10, "SMB2_10"},
35         {PROTOCOL_SMB2_02, "SMB2_02"},
36         {PROTOCOL_NT1, "NT1"},
37         {PROTOCOL_LANMAN2, "LANMAN2"},
38         {PROTOCOL_LANMAN1, "LANMAN1"},
39         {PROTOCOL_CORE, "CORE"},
40         {PROTOCOL_COREPLUS, "COREPLUS"},
41         {PROTOCOL_COREPLUS, "CORE+"},
42         {-1, NULL}
43 };
44
45 static const struct enum_list enum_security[] = {
46         {SEC_AUTO, "AUTO"},
47         {SEC_SHARE, "SHARE"},
48         {SEC_USER, "USER"},
49         {SEC_SERVER, "SERVER"},
50         {SEC_DOMAIN, "DOMAIN"},
51 #if (defined(HAVE_ADS) || _SAMBA_BUILD_ >= 4)
52         {SEC_ADS, "ADS"},
53 #endif
54         {-1, NULL}
55 };
56
57 static const struct enum_list enum_bool_auto[] = {
58         {false, "No"},
59         {false, "False"},
60         {false, "0"},
61         {true, "Yes"},
62         {true, "True"},
63         {true, "1"},
64         {Auto, "Auto"},
65         {-1, NULL}
66 };
67
68 static const struct enum_list enum_csc_policy[] = {
69         {CSC_POLICY_MANUAL, "manual"},
70         {CSC_POLICY_DOCUMENTS, "documents"},
71         {CSC_POLICY_PROGRAMS, "programs"},
72         {CSC_POLICY_DISABLE, "disable"},
73         {-1, NULL}
74 };
75
76 /* Server role options */
77 static const struct enum_list enum_server_role[] = {
78         {ROLE_AUTO, "auto"},
79         {ROLE_STANDALONE, "standalone"},
80         {ROLE_DOMAIN_MEMBER, "member server"},
81         {ROLE_DOMAIN_MEMBER, "member"},
82         /* note that currently
83            ROLE_DOMAIN_CONTROLLER == ROLE_DOMAIN_BDC */
84         {ROLE_DOMAIN_CONTROLLER, "domain controller"},
85         {ROLE_DOMAIN_CONTROLLER, "dc"},
86         {-1, NULL}
87 };
88
89 /* SMB signing types. */
90 static const struct enum_list enum_smb_signing_vals[] = {
91         {SMB_SIGNING_DEFAULT, "default"},
92         {SMB_SIGNING_OFF, "No"},
93         {SMB_SIGNING_OFF, "False"},
94         {SMB_SIGNING_OFF, "0"},
95         {SMB_SIGNING_OFF, "Off"},
96         {SMB_SIGNING_OFF, "disabled"},
97         {SMB_SIGNING_IF_REQUIRED, "if_required"},
98         {SMB_SIGNING_IF_REQUIRED, "Yes"},
99         {SMB_SIGNING_IF_REQUIRED, "True"},
100         {SMB_SIGNING_IF_REQUIRED, "1"},
101         {SMB_SIGNING_IF_REQUIRED, "On"},
102         {SMB_SIGNING_IF_REQUIRED, "enabled"},
103         {SMB_SIGNING_IF_REQUIRED, "auto"},
104         {SMB_SIGNING_REQUIRED, "required"},
105         {SMB_SIGNING_REQUIRED, "mandatory"},
106         {SMB_SIGNING_REQUIRED, "force"},
107         {SMB_SIGNING_REQUIRED, "forced"},
108         {SMB_SIGNING_REQUIRED, "enforced"},
109         {-1, NULL}
110 };
111
112 /* DNS update options. */
113 static const struct enum_list enum_dns_update_settings[] = {
114         {DNS_UPDATE_OFF, "False"},
115         {DNS_UPDATE_ON, "True"},
116         {DNS_UPDATE_SIGNED, "signed"},
117         {-1, NULL}
118 };