/src/samba/lib/param/param_table.c
Line | Count | Source |
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 | | #include "includes.h" |
31 | | #include "lib/param/param.h" |
32 | | #include "lib/param/loadparm.h" |
33 | | #include "lib/param/param_global.h" |
34 | | #include "libcli/auth/ntlm_check.h" |
35 | | #include "libcli/smb/smb_constants.h" |
36 | | #include "libds/common/roles.h" |
37 | | #include "libds/common/flags.h" |
38 | | #include "source4/lib/tls/tls.h" |
39 | | #include "auth/credentials/credentials.h" |
40 | | #include "source3/librpc/gen_ndr/ads.h" |
41 | | |
42 | | #ifndef N_ |
43 | | #define N_(x) x |
44 | | #endif |
45 | | |
46 | | static const struct enum_list enum_protocol[] = { |
47 | | {PROTOCOL_DEFAULT, "default"}, /* the caller decides what this means */ |
48 | | {PROTOCOL_SMB2_10, "SMB2"}, /* for now keep PROTOCOL_SMB2_10 */ |
49 | | {PROTOCOL_SMB3_11, "SMB3"}, /* for now keep PROTOCOL_SMB3_11 */ |
50 | | {PROTOCOL_SMB3_11, "SMB3_11"}, |
51 | | {PROTOCOL_SMB3_02, "SMB3_02"}, |
52 | | {PROTOCOL_SMB3_00, "SMB3_00"}, |
53 | | {PROTOCOL_SMB2_10, "SMB2_10"}, |
54 | | {PROTOCOL_SMB2_02, "SMB2_02"}, |
55 | | {PROTOCOL_NT1, "NT1"}, |
56 | | {PROTOCOL_LANMAN2, "LANMAN2"}, |
57 | | {PROTOCOL_LANMAN1, "LANMAN1"}, |
58 | | {PROTOCOL_CORE, "CORE"}, |
59 | | {PROTOCOL_COREPLUS, "COREPLUS"}, |
60 | | {PROTOCOL_COREPLUS, "CORE+"}, |
61 | | {-1, NULL} |
62 | | }; |
63 | | |
64 | | const char* lpcfg_get_smb_protocol(int type) |
65 | 0 | { |
66 | 0 | int i; |
67 | 0 | for (i = 1; enum_protocol[i].value != -1; i++) { |
68 | 0 | if (enum_protocol[i].value == type) { |
69 | 0 | return enum_protocol[i].name; |
70 | 0 | } |
71 | 0 | } |
72 | 0 | return NULL; |
73 | 0 | } |
74 | | |
75 | | static const struct enum_list enum_security[] = { |
76 | | {SEC_AUTO, "AUTO"}, |
77 | | {SEC_USER, "USER"}, |
78 | | {SEC_DOMAIN, "DOMAIN"}, |
79 | | {SEC_ADS, "ADS"}, |
80 | | {-1, NULL} |
81 | | }; |
82 | | |
83 | | static const struct enum_list enum_bool_auto[] = { |
84 | | {false, "No"}, |
85 | | {false, "False"}, |
86 | | {false, "0"}, |
87 | | {true, "Yes"}, |
88 | | {true, "True"}, |
89 | | {true, "1"}, |
90 | | {Auto, "Auto"}, |
91 | | {-1, NULL} |
92 | | }; |
93 | | |
94 | | static const struct enum_list enum_bool_auto_default[] = { |
95 | | {false, "No"}, |
96 | | {false, "False"}, |
97 | | {false, "0"}, |
98 | | {true, "Yes"}, |
99 | | {true, "True"}, |
100 | | {true, "1"}, |
101 | | {Auto, "Auto"}, |
102 | | {LP_ENUM_Default, "default"}, |
103 | | {-1, NULL} |
104 | | }; |
105 | | |
106 | | static const struct enum_list enum_csc_policy[] = { |
107 | | {CSC_POLICY_MANUAL, "manual"}, |
108 | | {CSC_POLICY_DOCUMENTS, "documents"}, |
109 | | {CSC_POLICY_PROGRAMS, "programs"}, |
110 | | {CSC_POLICY_DISABLE, "disable"}, |
111 | | {-1, NULL} |
112 | | }; |
113 | | |
114 | | /* Server role options */ |
115 | | static const struct enum_list enum_server_role[] = { |
116 | | {ROLE_AUTO, "auto"}, |
117 | | {ROLE_STANDALONE, "standalone server"}, |
118 | | {ROLE_STANDALONE, "standalone"}, |
119 | | {ROLE_DOMAIN_MEMBER, "member server"}, |
120 | | {ROLE_DOMAIN_MEMBER, "member"}, |
121 | | {ROLE_DOMAIN_PDC, "classic primary domain controller"}, |
122 | | {ROLE_DOMAIN_BDC, "classic backup domain controller"}, |
123 | | {ROLE_ACTIVE_DIRECTORY_DC, "active directory domain controller"}, |
124 | | {ROLE_ACTIVE_DIRECTORY_DC, "domain controller"}, |
125 | | {ROLE_ACTIVE_DIRECTORY_DC, "dc"}, |
126 | | {ROLE_IPA_DC, "IPA primary domain controller"}, |
127 | | {-1, NULL} |
128 | | }; |
129 | | |
130 | | /* SMB signing types. */ |
131 | | static const struct enum_list enum_smb_signing_vals[] = { |
132 | | {SMB_SIGNING_DEFAULT, "default"}, |
133 | | {SMB_SIGNING_OFF, "No"}, |
134 | | {SMB_SIGNING_OFF, "False"}, |
135 | | {SMB_SIGNING_OFF, "0"}, |
136 | | {SMB_SIGNING_OFF, "Off"}, |
137 | | {SMB_SIGNING_OFF, "disabled"}, |
138 | | {SMB_SIGNING_IF_REQUIRED, "if_required"}, |
139 | | {SMB_SIGNING_IF_REQUIRED, "Yes"}, |
140 | | {SMB_SIGNING_IF_REQUIRED, "True"}, |
141 | | {SMB_SIGNING_IF_REQUIRED, "1"}, |
142 | | {SMB_SIGNING_IF_REQUIRED, "On"}, |
143 | | {SMB_SIGNING_IF_REQUIRED, "enabled"}, |
144 | | {SMB_SIGNING_IF_REQUIRED, "auto"}, |
145 | | {SMB_SIGNING_DESIRED, "desired"}, |
146 | | {SMB_SIGNING_REQUIRED, "required"}, |
147 | | {SMB_SIGNING_REQUIRED, "mandatory"}, |
148 | | {SMB_SIGNING_REQUIRED, "force"}, |
149 | | {SMB_SIGNING_REQUIRED, "forced"}, |
150 | | {SMB_SIGNING_REQUIRED, "enforced"}, |
151 | | {-1, NULL} |
152 | | }; |
153 | | |
154 | | static const struct enum_list enum_smb_encryption_vals[] = { |
155 | | {SMB_ENCRYPTION_DEFAULT, "default"}, |
156 | | {SMB_ENCRYPTION_OFF, "No"}, |
157 | | {SMB_ENCRYPTION_OFF, "False"}, |
158 | | {SMB_ENCRYPTION_OFF, "0"}, |
159 | | {SMB_ENCRYPTION_OFF, "Off"}, |
160 | | {SMB_ENCRYPTION_OFF, "disabled"}, |
161 | | {SMB_ENCRYPTION_IF_REQUIRED, "if_required"}, |
162 | | {SMB_ENCRYPTION_IF_REQUIRED, "Yes"}, |
163 | | {SMB_ENCRYPTION_IF_REQUIRED, "True"}, |
164 | | {SMB_ENCRYPTION_IF_REQUIRED, "1"}, |
165 | | {SMB_ENCRYPTION_IF_REQUIRED, "On"}, |
166 | | {SMB_ENCRYPTION_IF_REQUIRED, "enabled"}, |
167 | | {SMB_ENCRYPTION_IF_REQUIRED, "auto"}, |
168 | | {SMB_ENCRYPTION_DESIRED, "desired"}, |
169 | | {SMB_ENCRYPTION_REQUIRED, "required"}, |
170 | | {SMB_ENCRYPTION_REQUIRED, "mandatory"}, |
171 | | {SMB_ENCRYPTION_REQUIRED, "force"}, |
172 | | {SMB_ENCRYPTION_REQUIRED, "forced"}, |
173 | | {SMB_ENCRYPTION_REQUIRED, "enforced"}, |
174 | | {-1, NULL} |
175 | | }; |
176 | | |
177 | | static const struct enum_list enum_use_kerberos_vals[] = { |
178 | | {CRED_USE_KERBEROS_DESIRED, "desired"}, |
179 | | {CRED_USE_KERBEROS_DESIRED, "auto"}, |
180 | | {CRED_USE_KERBEROS_REQUIRED, "yes"}, |
181 | | {CRED_USE_KERBEROS_REQUIRED, "required"}, |
182 | | {CRED_USE_KERBEROS_DISABLED, "no"}, |
183 | | {CRED_USE_KERBEROS_DISABLED, "disabled"}, |
184 | | {CRED_USE_KERBEROS_DISABLED, "off"}, |
185 | | {-1, NULL} |
186 | | }; |
187 | | |
188 | | static const struct enum_list enum_client_protection_vals[] = { |
189 | | {CRED_CLIENT_PROTECTION_DEFAULT, "default"}, |
190 | | {CRED_CLIENT_PROTECTION_PLAIN, "plain"}, |
191 | | {CRED_CLIENT_PROTECTION_SIGN, "sign"}, |
192 | | {CRED_CLIENT_PROTECTION_ENCRYPT, "encrypt"}, |
193 | | {-1, NULL} |
194 | | }; |
195 | | |
196 | | static const struct enum_list enum_mdns_name_values[] = { |
197 | | {MDNS_NAME_NETBIOS, "netbios"}, |
198 | | {MDNS_NAME_MDNS, "mdns"}, |
199 | | {-1, NULL} |
200 | | }; |
201 | | |
202 | | static const struct enum_list enum_tls_verify_peer_vals[] = { |
203 | | {TLS_VERIFY_PEER_NO_CHECK, |
204 | | TLS_VERIFY_PEER_NO_CHECK_STRING}, |
205 | | {TLS_VERIFY_PEER_CA_ONLY, |
206 | | TLS_VERIFY_PEER_CA_ONLY_STRING}, |
207 | | {TLS_VERIFY_PEER_CA_AND_NAME_IF_AVAILABLE, |
208 | | TLS_VERIFY_PEER_CA_AND_NAME_IF_AVAILABLE_STRING}, |
209 | | {TLS_VERIFY_PEER_CA_AND_NAME, |
210 | | TLS_VERIFY_PEER_CA_AND_NAME_STRING}, |
211 | | {TLS_VERIFY_PEER_AS_STRICT_AS_POSSIBLE, |
212 | | TLS_VERIFY_PEER_AS_STRICT_AS_POSSIBLE_STRING}, |
213 | | {-1, NULL} |
214 | | }; |
215 | | |
216 | | /* DNS update options. */ |
217 | | static const struct enum_list enum_dns_update_settings[] = { |
218 | | {DNS_UPDATE_OFF, "disabled"}, |
219 | | {DNS_UPDATE_OFF, "No"}, |
220 | | {DNS_UPDATE_OFF, "False"}, |
221 | | {DNS_UPDATE_OFF, "0"}, |
222 | | {DNS_UPDATE_OFF, "Off"}, |
223 | | {DNS_UPDATE_ON, "nonsecure and secure"}, |
224 | | {DNS_UPDATE_ON, "nonsecure"}, |
225 | | {DNS_UPDATE_SIGNED, "secure only"}, |
226 | | {DNS_UPDATE_SIGNED, "secure"}, |
227 | | {DNS_UPDATE_SIGNED, "signed"}, |
228 | | {-1, NULL} |
229 | | }; |
230 | | |
231 | | /* |
232 | | Do you want session setups at user level security with a invalid |
233 | | password to be rejected or allowed in as guest? WinNT rejects them |
234 | | but it can be a pain as it means "net view" needs to use a password |
235 | | |
236 | | You have 3 choices in the setting of map_to_guest: |
237 | | |
238 | | "Never" means session setups with an invalid password |
239 | | are rejected. This is the default. |
240 | | |
241 | | "Bad User" means session setups with an invalid password |
242 | | are rejected, unless the username does not exist, in which case it |
243 | | is treated as a guest login |
244 | | |
245 | | "Bad Password" means session setups with an invalid password |
246 | | are treated as a guest login |
247 | | |
248 | | Note that map_to_guest only has an effect in user or server |
249 | | level security. |
250 | | */ |
251 | | |
252 | | static const struct enum_list enum_map_to_guest[] = { |
253 | | {NEVER_MAP_TO_GUEST, "Never"}, |
254 | | {MAP_TO_GUEST_ON_BAD_USER, "Bad User"}, |
255 | | {MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"}, |
256 | | {MAP_TO_GUEST_ON_BAD_UID, "Bad Uid"}, |
257 | | {-1, NULL} |
258 | | }; |
259 | | |
260 | | /* Config backend options */ |
261 | | |
262 | | static const struct enum_list enum_config_backend[] = { |
263 | | {CONFIG_BACKEND_FILE, "file"}, |
264 | | {CONFIG_BACKEND_REGISTRY, "registry"}, |
265 | | {-1, NULL} |
266 | | }; |
267 | | |
268 | | static const struct enum_list enum_smbd_profiling_level[] = { |
269 | | {0, "off"}, {1, "count"}, {2, "on"}, {-1, NULL} |
270 | | }; |
271 | | |
272 | | |
273 | | /* ADS kerberos ticket verification options */ |
274 | | |
275 | | static const struct enum_list enum_kerberos_method[] = { |
276 | | {KERBEROS_VERIFY_SECRETS, "default"}, |
277 | | {KERBEROS_VERIFY_SECRETS, "secrets only"}, |
278 | | {KERBEROS_VERIFY_SECRETS, "secretsonly"}, |
279 | | {KERBEROS_VERIFY_SYSTEM_KEYTAB, "system keytab"}, |
280 | | {KERBEROS_VERIFY_SYSTEM_KEYTAB, "systemkeytab"}, |
281 | | {KERBEROS_VERIFY_DEDICATED_KEYTAB, "dedicated keytab"}, |
282 | | {KERBEROS_VERIFY_DEDICATED_KEYTAB, "dedicatedkeytab"}, |
283 | | {KERBEROS_VERIFY_SECRETS_AND_KEYTAB, "secrets and keytab"}, |
284 | | {KERBEROS_VERIFY_SECRETS_AND_KEYTAB, "secretsandkeytab"}, |
285 | | {-1, NULL} |
286 | | }; |
287 | | |
288 | | /* Kerberos encryption types selection options */ |
289 | | |
290 | | static const struct enum_list enum_kerberos_encryption_types_vals[] = { |
291 | | {KERBEROS_ETYPES_ALL, "all"}, |
292 | | {KERBEROS_ETYPES_STRONG, "strong"}, |
293 | | {KERBEROS_ETYPES_LEGACY, "legacy"}, |
294 | | {-1, NULL} |
295 | | }; |
296 | | |
297 | | /* KDC Windows KB5014754 certificate binding enforcement modes */ |
298 | | |
299 | | static const struct enum_list enum_strong_cert_binding_enforcement_vals[] = { |
300 | | {KDC_CERT_BINDING_NONE, "none"}, |
301 | | {KDC_CERT_BINDING_COMPAT, "compatibility"}, |
302 | | {KDC_CERT_BINDING_FULL, "full"}, |
303 | | {-1, NULL} |
304 | | }; |
305 | | |
306 | | static const struct enum_list enum_printing[] = { |
307 | | {PRINT_SYSV, "sysv"}, |
308 | | {PRINT_AIX, "aix"}, |
309 | | {PRINT_HPUX, "hpux"}, |
310 | | {PRINT_BSD, "bsd"}, |
311 | | {PRINT_QNX, "qnx"}, |
312 | | {PRINT_PLP, "plp"}, |
313 | | {PRINT_LPRNG, "lprng"}, |
314 | | #ifdef HAVE_CUPS |
315 | | {PRINT_CUPS, "cups"}, |
316 | | #endif |
317 | | #ifdef HAVE_IPRINT |
318 | | {PRINT_IPRINT, "iprint"}, |
319 | | #endif |
320 | | {PRINT_LPRNT, "nt"}, |
321 | | {PRINT_LPROS2, "os2"}, |
322 | | #if defined(DEVELOPER) || defined(ENABLE_SELFTEST) |
323 | | {PRINT_TEST, "test"}, |
324 | | {PRINT_VLP, "vlp"}, |
325 | | #endif /* DEVELOPER */ |
326 | | {-1, NULL} |
327 | | }; |
328 | | |
329 | | static const struct enum_list enum_ldap_sasl_wrapping[] = { |
330 | | {0, "plain"}, |
331 | | {ADS_AUTH_SASL_SIGN, "sign"}, |
332 | | {ADS_AUTH_SASL_SEAL, "seal"}, |
333 | | {ADS_AUTH_SASL_STARTTLS, "starttls"}, |
334 | | {ADS_AUTH_SASL_LDAPS, "ldaps"}, |
335 | | {-1, NULL} |
336 | | }; |
337 | | |
338 | | static const struct enum_list enum_ldap_server_require_strong_auth_vals[] = { |
339 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_NO, "No" }, |
340 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_NO, "False" }, |
341 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_NO, "0" }, |
342 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_ALLOW_SASL_OVER_TLS, |
343 | | "allow_sasl_over_tls" }, |
344 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_ALLOW_SASL_WITHOUT_TLS_CB, |
345 | | "allow_sasl_without_tls_channel_bindings" }, |
346 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_YES, "Yes" }, |
347 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_YES, "True" }, |
348 | | { LDAP_SERVER_REQUIRE_STRONG_AUTH_YES, "1" }, |
349 | | {-1, NULL} |
350 | | }; |
351 | | |
352 | | static const struct enum_list enum_ldap_ssl[] = { |
353 | | {LDAP_SSL_OFF, "no"}, |
354 | | {LDAP_SSL_OFF, "off"}, |
355 | | {LDAP_SSL_START_TLS, "start tls"}, |
356 | | {LDAP_SSL_START_TLS, "start_tls"}, |
357 | | {-1, NULL} |
358 | | }; |
359 | | |
360 | | /* LDAP Dereferencing Alias types */ |
361 | | #define SAMBA_LDAP_DEREF_NEVER 0 |
362 | | #define SAMBA_LDAP_DEREF_SEARCHING 1 |
363 | | #define SAMBA_LDAP_DEREF_FINDING 2 |
364 | | #define SAMBA_LDAP_DEREF_ALWAYS 3 |
365 | | |
366 | | static const struct enum_list enum_ldap_deref[] = { |
367 | | {SAMBA_LDAP_DEREF_NEVER, "never"}, |
368 | | {SAMBA_LDAP_DEREF_SEARCHING, "searching"}, |
369 | | {SAMBA_LDAP_DEREF_FINDING, "finding"}, |
370 | | {SAMBA_LDAP_DEREF_ALWAYS, "always"}, |
371 | | {-1, "auto"}, |
372 | | {-1, NULL}, |
373 | | }; |
374 | | |
375 | | static const struct enum_list enum_ldap_passwd_sync[] = { |
376 | | {LDAP_PASSWD_SYNC_OFF, "no"}, |
377 | | {LDAP_PASSWD_SYNC_OFF, "off"}, |
378 | | {LDAP_PASSWD_SYNC_ON, "yes"}, |
379 | | {LDAP_PASSWD_SYNC_ON, "on"}, |
380 | | {LDAP_PASSWD_SYNC_ONLY, "only"}, |
381 | | {-1, NULL} |
382 | | }; |
383 | | |
384 | | static const struct enum_list enum_map_readonly[] = { |
385 | | {MAP_READONLY_NO, "no"}, |
386 | | {MAP_READONLY_NO, "false"}, |
387 | | {MAP_READONLY_NO, "0"}, |
388 | | {MAP_READONLY_YES, "yes"}, |
389 | | {MAP_READONLY_YES, "true"}, |
390 | | {MAP_READONLY_YES, "1"}, |
391 | | {MAP_READONLY_PERMISSIONS, "permissions"}, |
392 | | {MAP_READONLY_PERMISSIONS, "perms"}, |
393 | | {-1, NULL} |
394 | | }; |
395 | | |
396 | | static const struct enum_list enum_case[] = { |
397 | | {CASE_LOWER, "lower"}, |
398 | | {CASE_UPPER, "upper"}, |
399 | | {-1, NULL} |
400 | | }; |
401 | | |
402 | | static const struct enum_list enum_inherit_owner_vals[] = { |
403 | | {INHERIT_OWNER_NO, "no"}, |
404 | | {INHERIT_OWNER_WINDOWS_AND_UNIX, "windows and unix"}, |
405 | | {INHERIT_OWNER_WINDOWS_AND_UNIX, "yes"}, |
406 | | {INHERIT_OWNER_UNIX_ONLY, "unix only"}, |
407 | | {-1, NULL}}; |
408 | | |
409 | | static const struct enum_list enum_mangled_names[] = { |
410 | | {MANGLED_NAMES_NO, "no"}, |
411 | | {MANGLED_NAMES_NO, "false"}, |
412 | | {MANGLED_NAMES_NO, "0"}, |
413 | | {MANGLED_NAMES_ILLEGAL, "illegal"}, |
414 | | {MANGLED_NAMES_YES, "yes"}, |
415 | | {MANGLED_NAMES_YES, "true"}, |
416 | | {MANGLED_NAMES_YES, "1"}, |
417 | | {-1, NULL} |
418 | | }; |
419 | | |
420 | | static const struct enum_list enum_ntlm_auth[] = { |
421 | | {NTLM_AUTH_DISABLED, "disabled"}, |
422 | | {NTLM_AUTH_NTLMV2_ONLY, "ntlmv2-only"}, |
423 | | {NTLM_AUTH_NTLMV2_ONLY, "no"}, |
424 | | {NTLM_AUTH_NTLMV2_ONLY, "false"}, |
425 | | {NTLM_AUTH_NTLMV2_ONLY, "0"}, |
426 | | {NTLM_AUTH_ON, "ntlmv1-permitted"}, |
427 | | {NTLM_AUTH_ON, "yes"}, |
428 | | {NTLM_AUTH_ON, "true"}, |
429 | | {NTLM_AUTH_ON, "1"}, |
430 | | {NTLM_AUTH_MSCHAPv2_NTLMV2_ONLY, "mschapv2-and-ntlmv2-only"}, |
431 | | {-1, NULL} |
432 | | }; |
433 | | |
434 | | static const struct enum_list enum_nt_hash_store[] = { |
435 | | {NT_HASH_STORE_AUTO, "auto"}, |
436 | | {NT_HASH_STORE_NEVER, "never"}, |
437 | | {NT_HASH_STORE_ALWAYS, "always"}, |
438 | | {-1, NULL}, |
439 | | }; |
440 | | |
441 | | |
442 | | static const struct enum_list enum_spotlight_backend[] = { |
443 | | {SPOTLIGHT_BACKEND_NOINDEX, "noindex"}, |
444 | | {SPOTLIGHT_BACKEND_TRACKER, "tracker"}, |
445 | | {SPOTLIGHT_BACKEND_ES, "elasticsearch"}, |
446 | | {-1, NULL} |
447 | | }; |
448 | | |
449 | | static const struct enum_list enum_debug_syslog_format[] = { |
450 | | {DEBUG_SYSLOG_FORMAT_NO, "No"}, |
451 | | {DEBUG_SYSLOG_FORMAT_NO, "False"}, |
452 | | {DEBUG_SYSLOG_FORMAT_NO, "0"}, |
453 | | {DEBUG_SYSLOG_FORMAT_IN_LOGS, "in_logs"}, |
454 | | {DEBUG_SYSLOG_FORMAT_IN_LOGS, "Yes"}, |
455 | | {DEBUG_SYSLOG_FORMAT_IN_LOGS, "True"}, |
456 | | {DEBUG_SYSLOG_FORMAT_IN_LOGS, "1"}, |
457 | | {DEBUG_SYSLOG_FORMAT_ALWAYS, "always"}, |
458 | | {-1, NULL} |
459 | | }; |
460 | | |
461 | | static const struct enum_list enum_ad_functional_level[] = { |
462 | | {DS_DOMAIN_FUNCTION_2008_R2, "2008_R2"}, |
463 | | {DS_DOMAIN_FUNCTION_2012, "2012"}, |
464 | | {DS_DOMAIN_FUNCTION_2012_R2, "2012_R2"}, |
465 | | {DS_DOMAIN_FUNCTION_2016, "2016"}, |
466 | | {-1, NULL} |
467 | | }; |
468 | | |
469 | | static const struct enum_list enum_acl_claims_evaluation[] = { |
470 | | {ACL_CLAIMS_EVALUATION_AD_DC_ONLY, "AD DC only"}, |
471 | | {ACL_CLAIMS_EVALUATION_NEVER, "never"}, |
472 | | {-1, NULL} |
473 | | }; |
474 | | |
475 | | static const struct enum_list enum_client_netlogon_ping_protocol[] = { |
476 | | {CLIENT_NETLOGON_PING_CLDAP, "cldap"}, |
477 | | {CLIENT_NETLOGON_PING_LDAP, "ldap"}, |
478 | | {CLIENT_NETLOGON_PING_LDAPS, "ldaps"}, |
479 | | {CLIENT_NETLOGON_PING_STARTTLS, "starttls"}, |
480 | | {-1, NULL} |
481 | | }; |
482 | | |
483 | | /* Note: We do not initialise the defaults union - it is not allowed in ANSI C |
484 | | * |
485 | | * NOTE: Handling of duplicated (synonym) parameters: |
486 | | * Parameters that are synonymous are stored in the same variable. |
487 | | * All but the default spelling carry the flag FLAG_SYNONYM. |
488 | | */ |
489 | | |
490 | | #define GLOBAL_VAR(name) offsetof(struct loadparm_global, name) |
491 | | #define LOCAL_VAR(name) offsetof(struct loadparm_service, name) |
492 | | |
493 | | #include "lib/param/param_table_gen.c" |
494 | | |
495 | | int num_parameters(void) |
496 | 0 | { |
497 | 0 | return ARRAY_SIZE(parm_table); |
498 | 0 | } |