lib/util: Clean up includes for time.[ch]
[sfrench/samba-autobuild/.git] / lib / param / param_table.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 #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/smb/smb_constants.h"
35
36 #ifndef N_
37 #define N_(x) x
38 #endif
39
40 static const struct enum_list enum_protocol[] = {
41         {PROTOCOL_SMB2_10, "SMB2"}, /* for now keep PROTOCOL_SMB2_10 */
42         {PROTOCOL_SMB3_00, "SMB3"}, /* for now keep PROTOCOL_SMB3_00 */
43         {PROTOCOL_SMB3_02, "SMB3_02"},
44         {PROTOCOL_SMB3_00, "SMB3_00"},
45         {PROTOCOL_SMB2_24, "SMB2_24"},
46         {PROTOCOL_SMB2_22, "SMB2_22"},
47         {PROTOCOL_SMB2_10, "SMB2_10"},
48         {PROTOCOL_SMB2_02, "SMB2_02"},
49         {PROTOCOL_NT1, "NT1"},
50         {PROTOCOL_LANMAN2, "LANMAN2"},
51         {PROTOCOL_LANMAN1, "LANMAN1"},
52         {PROTOCOL_CORE, "CORE"},
53         {PROTOCOL_COREPLUS, "COREPLUS"},
54         {PROTOCOL_COREPLUS, "CORE+"},
55         {-1, NULL}
56 };
57
58 static const struct enum_list enum_security[] = {
59         {SEC_AUTO, "AUTO"},
60         {SEC_USER, "USER"},
61         {SEC_DOMAIN, "DOMAIN"},
62         {SEC_ADS, "ADS"},
63         {-1, NULL}
64 };
65
66 static const struct enum_list enum_bool_auto[] = {
67         {false, "No"},
68         {false, "False"},
69         {false, "0"},
70         {true, "Yes"},
71         {true, "True"},
72         {true, "1"},
73         {Auto, "Auto"},
74         {-1, NULL}
75 };
76
77 static const struct enum_list enum_csc_policy[] = {
78         {CSC_POLICY_MANUAL, "manual"},
79         {CSC_POLICY_DOCUMENTS, "documents"},
80         {CSC_POLICY_PROGRAMS, "programs"},
81         {CSC_POLICY_DISABLE, "disable"},
82         {-1, NULL}
83 };
84
85 /* Server role options */
86 static const struct enum_list enum_server_role[] = {
87         {ROLE_AUTO, "auto"},
88         {ROLE_STANDALONE, "standalone server"},
89         {ROLE_STANDALONE, "standalone"},
90         {ROLE_DOMAIN_MEMBER, "member server"},
91         {ROLE_DOMAIN_MEMBER, "member"},
92         {ROLE_DOMAIN_PDC, "classic primary domain controller"},
93         {ROLE_DOMAIN_BDC, "classic backup domain controller"},
94         {ROLE_ACTIVE_DIRECTORY_DC, "active directory domain controller"},
95         {ROLE_ACTIVE_DIRECTORY_DC, "domain controller"},
96         {ROLE_ACTIVE_DIRECTORY_DC, "dc"},
97         {-1, NULL}
98 };
99
100 /* SMB signing types. */
101 static const struct enum_list enum_smb_signing_vals[] = {
102         {SMB_SIGNING_DEFAULT, "default"},
103         {SMB_SIGNING_OFF, "No"},
104         {SMB_SIGNING_OFF, "False"},
105         {SMB_SIGNING_OFF, "0"},
106         {SMB_SIGNING_OFF, "Off"},
107         {SMB_SIGNING_OFF, "disabled"},
108         {SMB_SIGNING_IF_REQUIRED, "if_required"},
109         {SMB_SIGNING_IF_REQUIRED, "Yes"},
110         {SMB_SIGNING_IF_REQUIRED, "True"},
111         {SMB_SIGNING_IF_REQUIRED, "1"},
112         {SMB_SIGNING_IF_REQUIRED, "On"},
113         {SMB_SIGNING_IF_REQUIRED, "enabled"},
114         {SMB_SIGNING_IF_REQUIRED, "auto"},
115         {SMB_SIGNING_REQUIRED, "required"},
116         {SMB_SIGNING_REQUIRED, "mandatory"},
117         {SMB_SIGNING_REQUIRED, "force"},
118         {SMB_SIGNING_REQUIRED, "forced"},
119         {SMB_SIGNING_REQUIRED, "enforced"},
120         {-1, NULL}
121 };
122
123 /* DNS update options. */
124 static const struct enum_list enum_dns_update_settings[] = {
125         {DNS_UPDATE_OFF, "disabled"},
126         {DNS_UPDATE_OFF, "No"},
127         {DNS_UPDATE_OFF, "False"},
128         {DNS_UPDATE_OFF, "0"},
129         {DNS_UPDATE_OFF, "Off"},
130         {DNS_UPDATE_ON, "nonsecure and secure"},
131         {DNS_UPDATE_ON, "nonsecure"},
132         {DNS_UPDATE_SIGNED, "secure only"},
133         {DNS_UPDATE_SIGNED, "secure"},
134         {DNS_UPDATE_SIGNED, "signed"},
135         {-1, NULL}
136 };
137
138 /*
139    Do you want session setups at user level security with a invalid
140    password to be rejected or allowed in as guest? WinNT rejects them
141    but it can be a pain as it means "net view" needs to use a password
142
143    You have 3 choices in the setting of map_to_guest:
144
145    "Never" means session setups with an invalid password
146    are rejected. This is the default.
147
148    "Bad User" means session setups with an invalid password
149    are rejected, unless the username does not exist, in which case it
150    is treated as a guest login
151
152    "Bad Password" means session setups with an invalid password
153    are treated as a guest login
154
155    Note that map_to_guest only has an effect in user or server
156    level security.
157 */
158
159 static const struct enum_list enum_map_to_guest[] = {
160         {NEVER_MAP_TO_GUEST, "Never"},
161         {MAP_TO_GUEST_ON_BAD_USER, "Bad User"},
162         {MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"},
163         {MAP_TO_GUEST_ON_BAD_UID, "Bad Uid"},
164         {-1, NULL}
165 };
166
167 /* Config backend options */
168
169 static const struct enum_list enum_config_backend[] = {
170         {CONFIG_BACKEND_FILE, "file"},
171         {CONFIG_BACKEND_REGISTRY, "registry"},
172         {-1, NULL}
173 };
174
175
176 /* ADS kerberos ticket verification options */
177
178 static const struct enum_list enum_kerberos_method[] = {
179         {KERBEROS_VERIFY_SECRETS, "default"},
180         {KERBEROS_VERIFY_SECRETS, "secrets only"},
181         {KERBEROS_VERIFY_SYSTEM_KEYTAB, "system keytab"},
182         {KERBEROS_VERIFY_DEDICATED_KEYTAB, "dedicated keytab"},
183         {KERBEROS_VERIFY_SECRETS_AND_KEYTAB, "secrets and keytab"},
184         {-1, NULL}
185 };
186
187 static const struct enum_list enum_printing[] = {
188         {PRINT_SYSV, "sysv"},
189         {PRINT_AIX, "aix"},
190         {PRINT_HPUX, "hpux"},
191         {PRINT_BSD, "bsd"},
192         {PRINT_QNX, "qnx"},
193         {PRINT_PLP, "plp"},
194         {PRINT_LPRNG, "lprng"},
195 #ifdef HAVE_CUPS
196         {PRINT_CUPS, "cups"},
197 #endif
198 #ifdef HAVE_IPRINT
199         {PRINT_IPRINT, "iprint"},
200 #endif
201         {PRINT_LPRNT, "nt"},
202         {PRINT_LPROS2, "os2"},
203 #if defined(DEVELOPER) || defined(ENABLE_SELFTEST)
204         {PRINT_TEST, "test"},
205         {PRINT_VLP, "vlp"},
206 #endif /* DEVELOPER */
207         {-1, NULL}
208 };
209
210 static const struct enum_list enum_ldap_sasl_wrapping[] = {
211         {0, "plain"},
212         {ADS_AUTH_SASL_SIGN, "sign"},
213         {ADS_AUTH_SASL_SEAL, "seal"},
214         {-1, NULL}
215 };
216
217 static const struct enum_list enum_ldap_ssl[] = {
218         {LDAP_SSL_OFF, "no"},
219         {LDAP_SSL_OFF, "off"},
220         {LDAP_SSL_START_TLS, "start tls"},
221         {LDAP_SSL_START_TLS, "start_tls"},
222         {-1, NULL}
223 };
224
225 /* LDAP Dereferencing Alias types */
226 #define SAMBA_LDAP_DEREF_NEVER          0
227 #define SAMBA_LDAP_DEREF_SEARCHING      1
228 #define SAMBA_LDAP_DEREF_FINDING        2
229 #define SAMBA_LDAP_DEREF_ALWAYS         3
230
231 static const struct enum_list enum_ldap_deref[] = {
232         {SAMBA_LDAP_DEREF_NEVER, "never"},
233         {SAMBA_LDAP_DEREF_SEARCHING, "searching"},
234         {SAMBA_LDAP_DEREF_FINDING, "finding"},
235         {SAMBA_LDAP_DEREF_ALWAYS, "always"},
236         {-1, "auto"}
237 };
238
239 static const struct enum_list enum_ldap_passwd_sync[] = {
240         {LDAP_PASSWD_SYNC_OFF, "no"},
241         {LDAP_PASSWD_SYNC_OFF, "off"},
242         {LDAP_PASSWD_SYNC_ON, "yes"},
243         {LDAP_PASSWD_SYNC_ON, "on"},
244         {LDAP_PASSWD_SYNC_ONLY, "only"},
245         {-1, NULL}
246 };
247
248 static const struct enum_list enum_map_readonly[] = {
249         {MAP_READONLY_NO, "no"},
250         {MAP_READONLY_NO, "false"},
251         {MAP_READONLY_NO, "0"},
252         {MAP_READONLY_YES, "yes"},
253         {MAP_READONLY_YES, "true"},
254         {MAP_READONLY_YES, "1"},
255         {MAP_READONLY_PERMISSIONS, "permissions"},
256         {MAP_READONLY_PERMISSIONS, "perms"},
257         {-1, NULL}
258 };
259
260 static const struct enum_list enum_case[] = {
261         {CASE_LOWER, "lower"},
262         {CASE_UPPER, "upper"},
263         {-1, NULL}
264 };
265
266
267 /* Note: We do not initialise the defaults union - it is not allowed in ANSI C
268  *
269  * The FLAG_HIDE is explicit. Parameters set this way do NOT appear in any edit
270  * screen in SWAT. This is used to exclude parameters as well as to squash all
271  * parameters that have been duplicated by pseudonyms.
272  *
273  * NOTE: To display a parameter in BASIC view set FLAG_BASIC
274  *       Any parameter that does NOT have FLAG_ADVANCED will not disply at all
275  *       Set FLAG_SHARE and FLAG_PRINT to specifically display parameters in
276  *        respective views.
277  *
278  * NOTE2: Handling of duplicated (synonym) parameters:
279  *      Only the first occurance of a parameter should be enabled by FLAG_BASIC
280  *      and/or FLAG_ADVANCED. All duplicates following the first mention should be
281  *      set to FLAG_HIDE. ie: Make you must place the parameter that has the preferred
282  *      name first, and all synonyms must follow it with the FLAG_HIDE attribute.
283  */
284
285 #define GLOBAL_VAR(name) offsetof(struct loadparm_global, name)
286 #define LOCAL_VAR(name) offsetof(struct loadparm_service, name)
287
288
289 struct parm_struct parm_table[] = {
290         {N_("Base Options"), P_SEP, P_SEPARATOR},
291
292         {
293                 .label          = "dos charset",
294                 .type           = P_STRING,
295                 .p_class        = P_GLOBAL,
296                 .offset         = GLOBAL_VAR(dos_charset),
297                 .special        = handle_dos_charset,
298                 .enum_list      = NULL,
299                 .flags          = FLAG_ADVANCED
300         },
301         {
302                 .label          = "unix charset",
303                 .type           = P_STRING,
304                 .p_class        = P_GLOBAL,
305                 .offset         = GLOBAL_VAR(unix_charset),
306                 .special        = handle_charset,
307                 .enum_list      = NULL,
308                 .flags          = FLAG_ADVANCED
309         },
310         {
311                 .label          = "comment",
312                 .type           = P_STRING,
313                 .p_class        = P_LOCAL,
314                 .offset         = LOCAL_VAR(comment),
315                 .special        = NULL,
316                 .enum_list      = NULL,
317                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT
318         },
319         {
320                 .label          = "path",
321                 .type           = P_STRING,
322                 .p_class        = P_LOCAL,
323                 .offset         = LOCAL_VAR(path),
324                 .special        = NULL,
325                 .enum_list      = NULL,
326                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
327         },
328         {
329                 .label          = "directory",
330                 .type           = P_STRING,
331                 .p_class        = P_LOCAL,
332                 .offset         = LOCAL_VAR(path),
333                 .special        = NULL,
334                 .enum_list      = NULL,
335                 .flags          = FLAG_HIDE,
336         },
337         {
338                 .label          = "workgroup",
339                 .type           = P_USTRING,
340                 .p_class        = P_GLOBAL,
341                 .offset         = GLOBAL_VAR(workgroup),
342                 .special        = NULL,
343                 .enum_list      = NULL,
344                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
345         },
346         {
347                 .label          = "realm",
348                 .type           = P_STRING,
349                 .p_class        = P_GLOBAL,
350                 .offset         = GLOBAL_VAR(realm_original),
351                 .special        = handle_realm,
352                 .enum_list      = NULL,
353                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
354         },
355         {
356                 .label          = "netbios name",
357                 .type           = P_USTRING,
358                 .p_class        = P_GLOBAL,
359                 .offset         = GLOBAL_VAR(netbios_name),
360                 .special        = NULL,
361                 .enum_list      = NULL,
362                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
363         },
364         {
365                 .label          = "netbios aliases",
366                 .type           = P_CMDLIST,
367                 .p_class        = P_GLOBAL,
368                 .offset         = GLOBAL_VAR(netbios_aliases),
369                 .special        = handle_netbios_aliases,
370                 .enum_list      = NULL,
371                 .flags          = FLAG_ADVANCED,
372         },
373         {
374                 .label          = "netbios scope",
375                 .type           = P_USTRING,
376                 .p_class        = P_GLOBAL,
377                 .offset         = GLOBAL_VAR(netbios_scope),
378                 .special        = NULL,
379                 .enum_list      = NULL,
380                 .flags          = FLAG_ADVANCED,
381         },
382         {
383                 .label          = "server string",
384                 .type           = P_STRING,
385                 .p_class        = P_GLOBAL,
386                 .offset         = GLOBAL_VAR(server_string),
387                 .special        = NULL,
388                 .enum_list      = NULL,
389                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
390         },
391         {
392                 .label          = "interfaces",
393                 .type           = P_CMDLIST,
394                 .p_class        = P_GLOBAL,
395                 .offset         = GLOBAL_VAR(interfaces),
396                 .special        = NULL,
397                 .enum_list      = NULL,
398                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
399         },
400         {
401                 .label          = "bind interfaces only",
402                 .type           = P_BOOL,
403                 .p_class        = P_GLOBAL,
404                 .offset         = GLOBAL_VAR(bind_interfaces_only),
405                 .special        = NULL,
406                 .enum_list      = NULL,
407                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
408         },
409         {
410                 .label          = "config backend",
411                 .type           = P_ENUM,
412                 .p_class        = P_GLOBAL,
413                 .offset         = GLOBAL_VAR(config_backend),
414                 .special        = NULL,
415                 .enum_list      = enum_config_backend,
416                 .flags          = FLAG_HIDE|FLAG_ADVANCED|FLAG_META,
417         },
418         {
419                 .label          = "server role",
420                 .type           = P_ENUM,
421                 .p_class        = P_GLOBAL,
422                 .offset         = GLOBAL_VAR(_server_role),
423                 .special        = NULL,
424                 .enum_list      = enum_server_role,
425                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
426         },
427
428         {N_("Security Options"), P_SEP, P_SEPARATOR},
429
430         {
431                 .label          = "security",
432                 .type           = P_ENUM,
433                 .p_class        = P_GLOBAL,
434                 .offset         = GLOBAL_VAR(_security),
435                 .special        = NULL,
436                 .enum_list      = enum_security,
437                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
438         },
439         {
440                 .label          = "auth methods",
441                 .type           = P_CMDLIST,
442                 .p_class        = P_GLOBAL,
443                 .offset         = GLOBAL_VAR(auth_methods),
444                 .special        = NULL,
445                 .enum_list      = NULL,
446                 .flags          = FLAG_ADVANCED,
447         },
448         {
449                 .label          = "encrypt passwords",
450                 .type           = P_BOOL,
451                 .p_class        = P_GLOBAL,
452                 .offset         = GLOBAL_VAR(encrypt_passwords),
453                 .special        = NULL,
454                 .enum_list      = NULL,
455                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
456         },
457         {
458                 .label          = "client schannel",
459                 .type           = P_ENUM,
460                 .p_class        = P_GLOBAL,
461                 .offset         = GLOBAL_VAR(client_schannel),
462                 .special        = NULL,
463                 .enum_list      = enum_bool_auto,
464                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
465         },
466         {
467                 .label          = "server schannel",
468                 .type           = P_ENUM,
469                 .p_class        = P_GLOBAL,
470                 .offset         = GLOBAL_VAR(server_schannel),
471                 .special        = NULL,
472                 .enum_list      = enum_bool_auto,
473                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
474         },
475         {
476                 .label          = "allow trusted domains",
477                 .type           = P_BOOL,
478                 .p_class        = P_GLOBAL,
479                 .offset         = GLOBAL_VAR(allow_trusted_domains),
480                 .special        = NULL,
481                 .enum_list      = NULL,
482                 .flags          = FLAG_ADVANCED,
483         },
484         {
485                 .label          = "map to guest",
486                 .type           = P_ENUM,
487                 .p_class        = P_GLOBAL,
488                 .offset         = GLOBAL_VAR(map_to_guest),
489                 .special        = NULL,
490                 .enum_list      = enum_map_to_guest,
491                 .flags          = FLAG_ADVANCED,
492         },
493         {
494                 .label          = "null passwords",
495                 .type           = P_BOOL,
496                 .p_class        = P_GLOBAL,
497                 .offset         = GLOBAL_VAR(null_passwords),
498                 .special        = NULL,
499                 .enum_list      = NULL,
500                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
501         },
502         {
503                 .label          = "old password allowed period",
504                 .type           = P_INTEGER,
505                 .p_class        = P_GLOBAL,
506                 .offset         = GLOBAL_VAR(old_password_allowed_period),
507                 .special        = NULL,
508                 .enum_list      = NULL,
509                 .flags          = FLAG_ADVANCED,
510         },
511         {
512                 .label          = "obey pam restrictions",
513                 .type           = P_BOOL,
514                 .p_class        = P_GLOBAL,
515                 .offset         = GLOBAL_VAR(obey_pam_restrictions),
516                 .special        = NULL,
517                 .enum_list      = NULL,
518                 .flags          = FLAG_ADVANCED,
519         },
520         {
521                 .label          = "password server",
522                 .type           = P_STRING,
523                 .p_class        = P_GLOBAL,
524                 .offset         = GLOBAL_VAR(password_server),
525                 .special        = NULL,
526                 .enum_list      = NULL,
527                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
528         },
529         {
530                 .label          = "smb passwd file",
531                 .type           = P_STRING,
532                 .p_class        = P_GLOBAL,
533                 .offset         = GLOBAL_VAR(smb_passwd_file),
534                 .special        = NULL,
535                 .enum_list      = NULL,
536                 .flags          = FLAG_ADVANCED,
537         },
538         {
539                 .label          = "private dir",
540                 .type           = P_STRING,
541                 .p_class        = P_GLOBAL,
542                 .offset         = GLOBAL_VAR(private_dir),
543                 .special        = NULL,
544                 .enum_list      = NULL,
545                 .flags          = FLAG_ADVANCED,
546         },
547         {
548                 .label          = "private directory",
549                 .type           = P_STRING,
550                 .p_class        = P_GLOBAL,
551                 .offset         = GLOBAL_VAR(private_dir),
552                 .special        = NULL,
553                 .enum_list      = NULL,
554                 .flags          = FLAG_HIDE,
555         },
556         {
557                 .label          = "passdb backend",
558                 .type           = P_STRING,
559                 .p_class        = P_GLOBAL,
560                 .offset         = GLOBAL_VAR(passdb_backend),
561                 .special        = NULL,
562                 .enum_list      = NULL,
563                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
564         },
565         {
566                 .label          = "algorithmic rid base",
567                 .type           = P_INTEGER,
568                 .p_class        = P_GLOBAL,
569                 .offset         = GLOBAL_VAR(algorithmic_rid_base),
570                 .special        = NULL,
571                 .enum_list      = NULL,
572                 .flags          = FLAG_ADVANCED,
573         },
574         {
575                 .label          = "root directory",
576                 .type           = P_STRING,
577                 .p_class        = P_GLOBAL,
578                 .offset         = GLOBAL_VAR(root_directory),
579                 .special        = NULL,
580                 .enum_list      = NULL,
581                 .flags          = FLAG_ADVANCED,
582         },
583         {
584                 .label          = "root dir",
585                 .type           = P_STRING,
586                 .p_class        = P_GLOBAL,
587                 .offset         = GLOBAL_VAR(root_directory),
588                 .special        = NULL,
589                 .enum_list      = NULL,
590                 .flags          = FLAG_HIDE,
591         },
592         {
593                 .label          = "root",
594                 .type           = P_STRING,
595                 .p_class        = P_GLOBAL,
596                 .offset         = GLOBAL_VAR(root_directory),
597                 .special        = NULL,
598                 .enum_list      = NULL,
599                 .flags          = FLAG_HIDE,
600         },
601         {
602                 .label          = "guest account",
603                 .type           = P_STRING,
604                 .p_class        = P_GLOBAL,
605                 .offset         = GLOBAL_VAR(guest_account),
606                 .special        = NULL,
607                 .enum_list      = NULL,
608                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
609         },
610         {
611                 .label          = "enable privileges",
612                 .type           = P_BOOL,
613                 .p_class        = P_GLOBAL,
614                 .offset         = GLOBAL_VAR(enable_privileges),
615                 .special        = NULL,
616                 .enum_list      = NULL,
617                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
618         },
619
620         {
621                 .label          = "pam password change",
622                 .type           = P_BOOL,
623                 .p_class        = P_GLOBAL,
624                 .offset         = GLOBAL_VAR(pam_password_change),
625                 .special        = NULL,
626                 .enum_list      = NULL,
627                 .flags          = FLAG_ADVANCED,
628         },
629         {
630                 .label          = "passwd program",
631                 .type           = P_STRING,
632                 .p_class        = P_GLOBAL,
633                 .offset         = GLOBAL_VAR(passwd_program),
634                 .special        = NULL,
635                 .enum_list      = NULL,
636                 .flags          = FLAG_ADVANCED,
637         },
638         {
639                 .label          = "passwd chat",
640                 .type           = P_STRING,
641                 .p_class        = P_GLOBAL,
642                 .offset         = GLOBAL_VAR(passwd_chat),
643                 .special        = NULL,
644                 .enum_list      = NULL,
645                 .flags          = FLAG_ADVANCED,
646         },
647         {
648                 .label          = "passwd chat debug",
649                 .type           = P_BOOL,
650                 .p_class        = P_GLOBAL,
651                 .offset         = GLOBAL_VAR(passwd_chat_debug),
652                 .special        = NULL,
653                 .enum_list      = NULL,
654                 .flags          = FLAG_ADVANCED,
655         },
656         {
657                 .label          = "passwd chat timeout",
658                 .type           = P_INTEGER,
659                 .p_class        = P_GLOBAL,
660                 .offset         = GLOBAL_VAR(passwd_chat_timeout),
661                 .special        = NULL,
662                 .enum_list      = NULL,
663                 .flags          = FLAG_ADVANCED,
664         },
665         {
666                 .label          = "check password script",
667                 .type           = P_STRING,
668                 .p_class        = P_GLOBAL,
669                 .offset         = GLOBAL_VAR(check_password_script),
670                 .special        = NULL,
671                 .enum_list      = NULL,
672                 .flags          = FLAG_ADVANCED,
673         },
674         {
675                 .label          = "username map",
676                 .type           = P_STRING,
677                 .p_class        = P_GLOBAL,
678                 .offset         = GLOBAL_VAR(username_map),
679                 .special        = NULL,
680                 .enum_list      = NULL,
681                 .flags          = FLAG_ADVANCED,
682         },
683         {
684                 .label          = "username level",
685                 .type           = P_INTEGER,
686                 .p_class        = P_GLOBAL,
687                 .offset         = GLOBAL_VAR(username_level),
688                 .special        = NULL,
689                 .enum_list      = NULL,
690                 .flags          = FLAG_ADVANCED,
691         },
692         {
693                 .label          = "unix password sync",
694                 .type           = P_BOOL,
695                 .p_class        = P_GLOBAL,
696                 .offset         = GLOBAL_VAR(unix_password_sync),
697                 .special        = NULL,
698                 .enum_list      = NULL,
699                 .flags          = FLAG_ADVANCED,
700         },
701         {
702                 .label          = "restrict anonymous",
703                 .type           = P_INTEGER,
704                 .p_class        = P_GLOBAL,
705                 .offset         = GLOBAL_VAR(restrict_anonymous),
706                 .special        = NULL,
707                 .enum_list      = NULL,
708                 .flags          = FLAG_ADVANCED,
709         },
710         {
711                 .label          = "lanman auth",
712                 .type           = P_BOOL,
713                 .p_class        = P_GLOBAL,
714                 .offset         = GLOBAL_VAR(lanman_auth),
715                 .special        = NULL,
716                 .enum_list      = NULL,
717                 .flags          = FLAG_ADVANCED,
718         },
719         {
720                 .label          = "ntlm auth",
721                 .type           = P_BOOL,
722                 .p_class        = P_GLOBAL,
723                 .offset         = GLOBAL_VAR(ntlm_auth),
724                 .special        = NULL,
725                 .enum_list      = NULL,
726                 .flags          = FLAG_ADVANCED,
727         },
728         {
729                 .label          = "client NTLMv2 auth",
730                 .type           = P_BOOL,
731                 .p_class        = P_GLOBAL,
732                 .offset         = GLOBAL_VAR(client_ntlmv2_auth),
733                 .special        = NULL,
734                 .enum_list      = NULL,
735                 .flags          = FLAG_ADVANCED,
736         },
737         {
738                 .label          = "client lanman auth",
739                 .type           = P_BOOL,
740                 .p_class        = P_GLOBAL,
741                 .offset         = GLOBAL_VAR(client_lanman_auth),
742                 .special        = NULL,
743                 .enum_list      = NULL,
744                 .flags          = FLAG_ADVANCED,
745         },
746         {
747                 .label          = "client plaintext auth",
748                 .type           = P_BOOL,
749                 .p_class        = P_GLOBAL,
750                 .offset         = GLOBAL_VAR(client_plaintext_auth),
751                 .special        = NULL,
752                 .enum_list      = NULL,
753                 .flags          = FLAG_ADVANCED,
754         },
755         {
756                 .label          = "client use spnego principal",
757                 .type           = P_BOOL,
758                 .p_class        = P_GLOBAL,
759                 .offset         = GLOBAL_VAR(client_use_spnego_principal),
760                 .special        = NULL,
761                 .enum_list      = NULL,
762                 .flags          = FLAG_ADVANCED,
763         },
764         {
765                 .label          = "username",
766                 .type           = P_STRING,
767                 .p_class        = P_LOCAL,
768                 .offset         = LOCAL_VAR(username),
769                 .special        = NULL,
770                 .enum_list      = NULL,
771                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE | FLAG_DEPRECATED,
772         },
773         {
774                 .label          = "user",
775                 .type           = P_STRING,
776                 .p_class        = P_LOCAL,
777                 .offset         = LOCAL_VAR(username),
778                 .special        = NULL,
779                 .enum_list      = NULL,
780                 .flags          = FLAG_HIDE,
781         },
782         {
783                 .label          = "users",
784                 .type           = P_STRING,
785                 .p_class        = P_LOCAL,
786                 .offset         = LOCAL_VAR(username),
787                 .special        = NULL,
788                 .enum_list      = NULL,
789                 .flags          = FLAG_HIDE,
790         },
791         {
792                 .label          = "invalid users",
793                 .type           = P_CMDLIST,
794                 .p_class        = P_LOCAL,
795                 .offset         = LOCAL_VAR(invalid_users),
796                 .special        = NULL,
797                 .enum_list      = NULL,
798                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
799         },
800         {
801                 .label          = "valid users",
802                 .type           = P_CMDLIST,
803                 .p_class        = P_LOCAL,
804                 .offset         = LOCAL_VAR(valid_users),
805                 .special        = NULL,
806                 .enum_list      = NULL,
807                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
808         },
809         {
810                 .label          = "admin users",
811                 .type           = P_CMDLIST,
812                 .p_class        = P_LOCAL,
813                 .offset         = LOCAL_VAR(admin_users),
814                 .special        = NULL,
815                 .enum_list      = NULL,
816                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
817         },
818         {
819                 .label          = "read list",
820                 .type           = P_CMDLIST,
821                 .p_class        = P_LOCAL,
822                 .offset         = LOCAL_VAR(read_list),
823                 .special        = NULL,
824                 .enum_list      = NULL,
825                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
826         },
827         {
828                 .label          = "write list",
829                 .type           = P_CMDLIST,
830                 .p_class        = P_LOCAL,
831                 .offset         = LOCAL_VAR(write_list),
832                 .special        = NULL,
833                 .enum_list      = NULL,
834                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
835         },
836         {
837                 .label          = "force user",
838                 .type           = P_STRING,
839                 .p_class        = P_LOCAL,
840                 .offset         = LOCAL_VAR(force_user),
841                 .special        = NULL,
842                 .enum_list      = NULL,
843                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
844         },
845         {
846                 .label          = "force group",
847                 .type           = P_STRING,
848                 .p_class        = P_LOCAL,
849                 .offset         = LOCAL_VAR(force_group),
850                 .special        = NULL,
851                 .enum_list      = NULL,
852                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
853         },
854         {
855                 .label          = "group",
856                 .type           = P_STRING,
857                 .p_class        = P_LOCAL,
858                 .offset         = LOCAL_VAR(force_group),
859                 .special        = NULL,
860                 .enum_list      = NULL,
861                 .flags          = FLAG_ADVANCED,
862         },
863         {
864                 .label          = "read only",
865                 .type           = P_BOOL,
866                 .p_class        = P_LOCAL,
867                 .offset         = LOCAL_VAR(read_only),
868                 .special        = NULL,
869                 .enum_list      = NULL,
870                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE,
871         },
872         {
873                 .label          = "write ok",
874                 .type           = P_BOOLREV,
875                 .p_class        = P_LOCAL,
876                 .offset         = LOCAL_VAR(read_only),
877                 .special        = NULL,
878                 .enum_list      = NULL,
879                 .flags          = FLAG_HIDE,
880         },
881         {
882                 .label          = "writeable",
883                 .type           = P_BOOLREV,
884                 .p_class        = P_LOCAL,
885                 .offset         = LOCAL_VAR(read_only),
886                 .special        = NULL,
887                 .enum_list      = NULL,
888                 .flags          = FLAG_HIDE,
889         },
890         {
891                 .label          = "writable",
892                 .type           = P_BOOLREV,
893                 .p_class        = P_LOCAL,
894                 .offset         = LOCAL_VAR(read_only),
895                 .special        = NULL,
896                 .enum_list      = NULL,
897                 .flags          = FLAG_HIDE,
898         },
899         {
900                 .label          = "acl check permissions",
901                 .type           = P_BOOL,
902                 .p_class        = P_LOCAL,
903                 .offset         = LOCAL_VAR(acl_check_permissions),
904                 .special        = NULL,
905                 .enum_list      = NULL,
906                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE | FLAG_DEPRECATED,
907         },
908         {
909                 .label          = "acl group control",
910                 .type           = P_BOOL,
911                 .p_class        = P_LOCAL,
912                 .offset         = LOCAL_VAR(acl_group_control),
913                 .special        = NULL,
914                 .enum_list      = NULL,
915                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
916         },
917         {
918                 .label          = "acl map full control",
919                 .type           = P_BOOL,
920                 .p_class        = P_LOCAL,
921                 .offset         = LOCAL_VAR(acl_map_full_control),
922                 .special        = NULL,
923                 .enum_list      = NULL,
924                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
925         },
926         {
927                 .label          = "acl allow execute always",
928                 .type           = P_BOOL,
929                 .p_class        = P_LOCAL,
930                 .offset         = LOCAL_VAR(acl_allow_execute_always),
931                 .special        = NULL,
932                 .enum_list      = NULL,
933                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
934         },
935
936         {
937                 .label          = "create mask",
938                 .type           = P_OCTAL,
939                 .p_class        = P_LOCAL,
940                 .offset         = LOCAL_VAR(create_mask),
941                 .special        = NULL,
942                 .enum_list      = NULL,
943                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
944         },
945         {
946                 .label          = "create mode",
947                 .type           = P_OCTAL,
948                 .p_class        = P_LOCAL,
949                 .offset         = LOCAL_VAR(create_mask),
950                 .special        = NULL,
951                 .enum_list      = NULL,
952                 .flags          = FLAG_HIDE,
953         },
954         {
955                 .label          = "force create mode",
956                 .type           = P_OCTAL,
957                 .p_class        = P_LOCAL,
958                 .offset         = LOCAL_VAR(force_create_mode),
959                 .special        = NULL,
960                 .enum_list      = NULL,
961                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
962         },
963         {
964                 .label          = "directory mask",
965                 .type           = P_OCTAL,
966                 .p_class        = P_LOCAL,
967                 .offset         = LOCAL_VAR(directory_mask),
968                 .special        = NULL,
969                 .enum_list      = NULL,
970                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
971         },
972         {
973                 .label          = "directory mode",
974                 .type           = P_OCTAL,
975                 .p_class        = P_LOCAL,
976                 .offset         = LOCAL_VAR(directory_mask),
977                 .special        = NULL,
978                 .enum_list      = NULL,
979                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
980         },
981         {
982                 .label          = "force directory mode",
983                 .type           = P_OCTAL,
984                 .p_class        = P_LOCAL,
985                 .offset         = LOCAL_VAR(force_directory_mode),
986                 .special        = NULL,
987                 .enum_list      = NULL,
988                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
989         },
990         {
991                 .label          = "force unknown acl user",
992                 .type           = P_BOOL,
993                 .p_class        = P_LOCAL,
994                 .offset         = LOCAL_VAR(force_unknown_acl_user),
995                 .special        = NULL,
996                 .enum_list      = NULL,
997                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
998         },
999         {
1000                 .label          = "inherit permissions",
1001                 .type           = P_BOOL,
1002                 .p_class        = P_LOCAL,
1003                 .offset         = LOCAL_VAR(inherit_permissions),
1004                 .special        = NULL,
1005                 .enum_list      = NULL,
1006                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1007         },
1008         {
1009                 .label          = "inherit acls",
1010                 .type           = P_BOOL,
1011                 .p_class        = P_LOCAL,
1012                 .offset         = LOCAL_VAR(inherit_acls),
1013                 .special        = NULL,
1014                 .enum_list      = NULL,
1015                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1016         },
1017         {
1018                 .label          = "inherit owner",
1019                 .type           = P_BOOL,
1020                 .p_class        = P_LOCAL,
1021                 .offset         = LOCAL_VAR(inherit_owner),
1022                 .special        = NULL,
1023                 .enum_list      = NULL,
1024                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1025         },
1026         {
1027                 .label          = "guest only",
1028                 .type           = P_BOOL,
1029                 .p_class        = P_LOCAL,
1030                 .offset         = LOCAL_VAR(guest_only),
1031                 .special        = NULL,
1032                 .enum_list      = NULL,
1033                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1034         },
1035         {
1036                 .label          = "only guest",
1037                 .type           = P_BOOL,
1038                 .p_class        = P_LOCAL,
1039                 .offset         = LOCAL_VAR(guest_only),
1040                 .special        = NULL,
1041                 .enum_list      = NULL,
1042                 .flags          = FLAG_HIDE,
1043         },
1044         {
1045                 .label          = "administrative share",
1046                 .type           = P_BOOL,
1047                 .p_class        = P_LOCAL,
1048                 .offset         = LOCAL_VAR(administrative_share),
1049                 .special        = NULL,
1050                 .enum_list      = NULL,
1051                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1052         },
1053
1054         {
1055                 .label          = "guest ok",
1056                 .type           = P_BOOL,
1057                 .p_class        = P_LOCAL,
1058                 .offset         = LOCAL_VAR(guest_ok),
1059                 .special        = NULL,
1060                 .enum_list      = NULL,
1061                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1062         },
1063         {
1064                 .label          = "public",
1065                 .type           = P_BOOL,
1066                 .p_class        = P_LOCAL,
1067                 .offset         = LOCAL_VAR(guest_ok),
1068                 .special        = NULL,
1069                 .enum_list      = NULL,
1070                 .flags          = FLAG_HIDE,
1071         },
1072         {
1073                 .label          = "only user",
1074                 .type           = P_BOOL,
1075                 .p_class        = P_LOCAL,
1076                 .offset         = LOCAL_VAR(only_user),
1077                 .special        = NULL,
1078                 .enum_list      = NULL,
1079                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_DEPRECATED,
1080         },
1081         {
1082                 .label          = "hosts allow",
1083                 .type           = P_CMDLIST,
1084                 .p_class        = P_LOCAL,
1085                 .offset         = LOCAL_VAR(hosts_allow),
1086                 .special        = NULL,
1087                 .enum_list      = NULL,
1088                 .flags          = FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1089         },
1090         {
1091                 .label          = "allow hosts",
1092                 .type           = P_CMDLIST,
1093                 .p_class        = P_LOCAL,
1094                 .offset         = LOCAL_VAR(hosts_allow),
1095                 .special        = NULL,
1096                 .enum_list      = NULL,
1097                 .flags          = FLAG_HIDE,
1098         },
1099         {
1100                 .label          = "hosts deny",
1101                 .type           = P_CMDLIST,
1102                 .p_class        = P_LOCAL,
1103                 .offset         = LOCAL_VAR(hosts_deny),
1104                 .special        = NULL,
1105                 .enum_list      = NULL,
1106                 .flags          = FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1107         },
1108         {
1109                 .label          = "deny hosts",
1110                 .type           = P_CMDLIST,
1111                 .p_class        = P_LOCAL,
1112                 .offset         = LOCAL_VAR(hosts_deny),
1113                 .special        = NULL,
1114                 .enum_list      = NULL,
1115                 .flags          = FLAG_HIDE,
1116         },
1117         {
1118                 .label          = "preload modules",
1119                 .type           = P_CMDLIST,
1120                 .p_class        = P_GLOBAL,
1121                 .offset         = GLOBAL_VAR(preload_modules),
1122                 .special        = NULL,
1123                 .enum_list      = NULL,
1124                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1125         },
1126         {
1127                 .label          = "dedicated keytab file",
1128                 .type           = P_STRING,
1129                 .p_class        = P_GLOBAL,
1130                 .offset         = GLOBAL_VAR(dedicated_keytab_file),
1131                 .special        = NULL,
1132                 .enum_list      = NULL,
1133                 .flags          = FLAG_ADVANCED,
1134         },
1135         {
1136                 .label          = "kerberos method",
1137                 .type           = P_ENUM,
1138                 .p_class        = P_GLOBAL,
1139                 .offset         = GLOBAL_VAR(kerberos_method),
1140                 .special        = NULL,
1141                 .enum_list      = enum_kerberos_method,
1142                 .flags          = FLAG_ADVANCED,
1143         },
1144         {
1145                 .label          = "map untrusted to domain",
1146                 .type           = P_BOOL,
1147                 .p_class        = P_GLOBAL,
1148                 .offset         = GLOBAL_VAR(map_untrusted_to_domain),
1149                 .special        = NULL,
1150                 .enum_list      = NULL,
1151                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1152         },
1153
1154
1155         {N_("Logging Options"), P_SEP, P_SEPARATOR},
1156
1157         {
1158                 .label          = "log level",
1159                 .type           = P_STRING,
1160                 .p_class        = P_GLOBAL,
1161                 .offset         = GLOBAL_VAR(log_level),
1162                 .special        = handle_debug_list,
1163                 .enum_list      = NULL,
1164                 .flags          = FLAG_ADVANCED,
1165         },
1166         {
1167                 .label          = "debuglevel",
1168                 .type           = P_STRING,
1169                 .p_class        = P_GLOBAL,
1170                 .offset         = GLOBAL_VAR(log_level),
1171                 .special        = handle_debug_list,
1172                 .enum_list      = NULL,
1173                 .flags          = FLAG_HIDE,
1174         },
1175         {
1176                 .label          = "syslog",
1177                 .type           = P_INTEGER,
1178                 .p_class        = P_GLOBAL,
1179                 .offset         = GLOBAL_VAR(syslog),
1180                 .special        = NULL,
1181                 .enum_list      = NULL,
1182                 .flags          = FLAG_ADVANCED,
1183         },
1184         {
1185                 .label          = "syslog only",
1186                 .type           = P_BOOL,
1187                 .p_class        = P_GLOBAL,
1188                 .offset         = GLOBAL_VAR(syslog_only),
1189                 .special        = NULL,
1190                 .enum_list      = NULL,
1191                 .flags          = FLAG_ADVANCED,
1192         },
1193         {
1194                 .label          = "log file",
1195                 .type           = P_STRING,
1196                 .p_class        = P_GLOBAL,
1197                 .offset         = GLOBAL_VAR(logfile),
1198                 .special        = handle_logfile,
1199                 .enum_list      = NULL,
1200                 .flags          = FLAG_ADVANCED,
1201         },
1202         {
1203                 .label          = "max log size",
1204                 .type           = P_BYTES,
1205                 .p_class        = P_GLOBAL,
1206                 .offset         = GLOBAL_VAR(max_log_size),
1207                 .special        = NULL,
1208                 .enum_list      = NULL,
1209                 .flags          = FLAG_ADVANCED,
1210         },
1211         {
1212                 .label          = "debug timestamp",
1213                 .type           = P_BOOL,
1214                 .p_class        = P_GLOBAL,
1215                 .offset         = GLOBAL_VAR(timestamp_logs),
1216                 .special        = NULL,
1217                 .enum_list      = NULL,
1218                 .flags          = FLAG_ADVANCED,
1219         },
1220         {
1221                 .label          = "timestamp logs",
1222                 .type           = P_BOOL,
1223                 .p_class        = P_GLOBAL,
1224                 .offset         = GLOBAL_VAR(timestamp_logs),
1225                 .special        = NULL,
1226                 .enum_list      = NULL,
1227                 .flags          = FLAG_ADVANCED,
1228         },
1229         {
1230                 .label          = "debug prefix timestamp",
1231                 .type           = P_BOOL,
1232                 .p_class        = P_GLOBAL,
1233                 .offset         = GLOBAL_VAR(debug_prefix_timestamp),
1234                 .special        = NULL,
1235                 .enum_list      = NULL,
1236                 .flags          = FLAG_ADVANCED,
1237         },
1238         {
1239                 .label          = "debug hires timestamp",
1240                 .type           = P_BOOL,
1241                 .p_class        = P_GLOBAL,
1242                 .offset         = GLOBAL_VAR(debug_hires_timestamp),
1243                 .special        = NULL,
1244                 .enum_list      = NULL,
1245                 .flags          = FLAG_ADVANCED,
1246         },
1247         {
1248                 .label          = "debug pid",
1249                 .type           = P_BOOL,
1250                 .p_class        = P_GLOBAL,
1251                 .offset         = GLOBAL_VAR(debug_pid),
1252                 .special        = NULL,
1253                 .enum_list      = NULL,
1254                 .flags          = FLAG_ADVANCED,
1255         },
1256         {
1257                 .label          = "debug uid",
1258                 .type           = P_BOOL,
1259                 .p_class        = P_GLOBAL,
1260                 .offset         = GLOBAL_VAR(debug_uid),
1261                 .special        = NULL,
1262                 .enum_list      = NULL,
1263                 .flags          = FLAG_ADVANCED,
1264         },
1265         {
1266                 .label          = "debug class",
1267                 .type           = P_BOOL,
1268                 .p_class        = P_GLOBAL,
1269                 .offset         = GLOBAL_VAR(debug_class),
1270                 .special        = NULL,
1271                 .enum_list      = NULL,
1272                 .flags          = FLAG_ADVANCED,
1273         },
1274         {
1275                 .label          = "enable core files",
1276                 .type           = P_BOOL,
1277                 .p_class        = P_GLOBAL,
1278                 .offset         = GLOBAL_VAR(enable_core_files),
1279                 .special        = NULL,
1280                 .enum_list      = NULL,
1281                 .flags          = FLAG_ADVANCED,
1282         },
1283
1284         {N_("Protocol Options"), P_SEP, P_SEPARATOR},
1285
1286         {
1287                 .label          = "allocation roundup size",
1288                 .type           = P_BYTES,
1289                 .p_class        = P_LOCAL,
1290                 .offset         = LOCAL_VAR(allocation_roundup_size),
1291                 .special        = NULL,
1292                 .enum_list      = NULL,
1293                 .flags          = FLAG_ADVANCED,
1294         },
1295         {
1296                 .label          = "aio read size",
1297                 .type           = P_BYTES,
1298                 .p_class        = P_LOCAL,
1299                 .offset         = LOCAL_VAR(aio_read_size),
1300                 .special        = NULL,
1301                 .enum_list      = NULL,
1302                 .flags          = FLAG_ADVANCED,
1303         },
1304         {
1305                 .label          = "aio write size",
1306                 .type           = P_BYTES,
1307                 .p_class        = P_LOCAL,
1308                 .offset         = LOCAL_VAR(aio_write_size),
1309                 .special        = NULL,
1310                 .enum_list      = NULL,
1311                 .flags          = FLAG_ADVANCED,
1312         },
1313         {
1314                 .label          = "aio write behind",
1315                 .type           = P_STRING,
1316                 .p_class        = P_LOCAL,
1317                 .offset         = LOCAL_VAR(aio_write_behind),
1318                 .special        = NULL,
1319                 .enum_list      = NULL,
1320                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1321         },
1322         {
1323                 .label          = "smb ports",
1324                 .type           = P_CMDLIST,
1325                 .p_class        = P_GLOBAL,
1326                 .offset         = GLOBAL_VAR(smb_ports),
1327                 .special        = handle_smb_ports,
1328                 .enum_list      = NULL,
1329                 .flags          = FLAG_ADVANCED,
1330         },
1331         {
1332                 .label          = "large readwrite",
1333                 .type           = P_BOOL,
1334                 .p_class        = P_GLOBAL,
1335                 .offset         = GLOBAL_VAR(large_readwrite),
1336                 .special        = NULL,
1337                 .enum_list      = NULL,
1338                 .flags          = FLAG_ADVANCED,
1339         },
1340         {
1341                 .label          = "server max protocol",
1342                 .type           = P_ENUM,
1343                 .p_class        = P_GLOBAL,
1344                 .offset         = GLOBAL_VAR(server_max_protocol),
1345                 .special        = NULL,
1346                 .enum_list      = enum_protocol,
1347                 .flags          = FLAG_ADVANCED,
1348         },
1349         {
1350                 .label          = "max protocol",
1351                 .type           = P_ENUM,
1352                 .p_class        = P_GLOBAL,
1353                 .offset         = GLOBAL_VAR(server_max_protocol),
1354                 .special        = NULL,
1355                 .enum_list      = enum_protocol,
1356                 .flags          = FLAG_ADVANCED,
1357         },
1358         {
1359                 .label          = "protocol",
1360                 .type           = P_ENUM,
1361                 .p_class        = P_GLOBAL,
1362                 .offset         = GLOBAL_VAR(server_max_protocol),
1363                 .special        = NULL,
1364                 .enum_list      = enum_protocol,
1365                 .flags          = FLAG_ADVANCED,
1366         },
1367         {
1368                 .label          = "server min protocol",
1369                 .type           = P_ENUM,
1370                 .p_class        = P_GLOBAL,
1371                 .offset         = GLOBAL_VAR(server_min_protocol),
1372                 .special        = NULL,
1373                 .enum_list      = enum_protocol,
1374                 .flags          = FLAG_ADVANCED,
1375         },
1376         {
1377                 .label          = "min protocol",
1378                 .type           = P_ENUM,
1379                 .p_class        = P_GLOBAL,
1380                 .offset         = GLOBAL_VAR(server_min_protocol),
1381                 .special        = NULL,
1382                 .enum_list      = enum_protocol,
1383                 .flags          = FLAG_ADVANCED,
1384         },
1385         {
1386                 .label          = "client max protocol",
1387                 .type           = P_ENUM,
1388                 .p_class        = P_GLOBAL,
1389                 .offset         = GLOBAL_VAR(client_max_protocol),
1390                 .special        = NULL,
1391                 .enum_list      = enum_protocol,
1392                 .flags          = FLAG_ADVANCED,
1393         },
1394         {
1395                 .label          = "client min protocol",
1396                 .type           = P_ENUM,
1397                 .p_class        = P_GLOBAL,
1398                 .offset         = GLOBAL_VAR(client_min_protocol),
1399                 .special        = NULL,
1400                 .enum_list      = enum_protocol,
1401                 .flags          = FLAG_ADVANCED,
1402         },
1403         {
1404                 .label          = "unicode",
1405                 .type           = P_BOOL,
1406                 .p_class        = P_GLOBAL,
1407                 .offset         = GLOBAL_VAR(unicode),
1408                 .special        = NULL,
1409                 .enum_list      = NULL
1410         },
1411         {
1412                 .label          = "min receivefile size",
1413                 .type           = P_BYTES,
1414                 .p_class        = P_GLOBAL,
1415                 .offset         = GLOBAL_VAR(iminreceivefile),
1416                 .special        = NULL,
1417                 .enum_list      = NULL,
1418                 .flags          = FLAG_ADVANCED,
1419         },
1420         {
1421                 .label          = "read raw",
1422                 .type           = P_BOOL,
1423                 .p_class        = P_GLOBAL,
1424                 .offset         = GLOBAL_VAR(read_raw),
1425                 .special        = NULL,
1426                 .enum_list      = NULL,
1427                 .flags          = FLAG_ADVANCED,
1428         },
1429         {
1430                 .label          = "write raw",
1431                 .type           = P_BOOL,
1432                 .p_class        = P_GLOBAL,
1433                 .offset         = GLOBAL_VAR(write_raw),
1434                 .special        = NULL,
1435                 .enum_list      = NULL,
1436                 .flags          = FLAG_ADVANCED,
1437         },
1438         {
1439                 .label          = "disable netbios",
1440                 .type           = P_BOOL,
1441                 .p_class        = P_GLOBAL,
1442                 .offset         = GLOBAL_VAR(disable_netbios),
1443                 .special        = NULL,
1444                 .enum_list      = NULL,
1445                 .flags          = FLAG_ADVANCED,
1446         },
1447         {
1448                 .label          = "reset on zero vc",
1449                 .type           = P_BOOL,
1450                 .p_class        = P_GLOBAL,
1451                 .offset         = GLOBAL_VAR(reset_on_zero_vc),
1452                 .special        = NULL,
1453                 .enum_list      = NULL,
1454                 .flags          = FLAG_ADVANCED,
1455         },
1456         {
1457                 .label          = "log writeable files on exit",
1458                 .type           = P_BOOL,
1459                 .p_class        = P_GLOBAL,
1460                 .offset         = GLOBAL_VAR(log_writeable_files_on_exit),
1461                 .special        = NULL,
1462                 .enum_list      = NULL,
1463                 .flags          = FLAG_ADVANCED,
1464         },
1465         {
1466                 .label          = "defer sharing violations",
1467                 .type           = P_BOOL,
1468                 .p_class        = P_GLOBAL,
1469                 .offset         = GLOBAL_VAR(defer_sharing_violations),
1470                 .special        = NULL,
1471                 .enum_list      = NULL,
1472                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1473         },
1474         {
1475                 .label          = "ea support",
1476                 .type           = P_BOOL,
1477                 .p_class        = P_LOCAL,
1478                 .offset         = LOCAL_VAR(ea_support),
1479                 .special        = NULL,
1480                 .enum_list      = NULL,
1481                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1482         },
1483         {
1484                 .label          = "nt acl support",
1485                 .type           = P_BOOL,
1486                 .p_class        = P_LOCAL,
1487                 .offset         = LOCAL_VAR(nt_acl_support),
1488                 .special        = NULL,
1489                 .enum_list      = NULL,
1490                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1491         },
1492         {
1493                 .label          = "nt pipe support",
1494                 .type           = P_BOOL,
1495                 .p_class        = P_GLOBAL,
1496                 .offset         = GLOBAL_VAR(nt_pipe_support),
1497                 .special        = NULL,
1498                 .enum_list      = NULL,
1499                 .flags          = FLAG_ADVANCED,
1500         },
1501         {
1502                 .label          = "nt status support",
1503                 .type           = P_BOOL,
1504                 .p_class        = P_GLOBAL,
1505                 .offset         = GLOBAL_VAR(nt_status_support),
1506                 .special        = NULL,
1507                 .enum_list      = NULL,
1508                 .flags          = FLAG_ADVANCED,
1509         },
1510         {
1511                 .label          = "profile acls",
1512                 .type           = P_BOOL,
1513                 .p_class        = P_LOCAL,
1514                 .offset         = LOCAL_VAR(profile_acls),
1515                 .special        = NULL,
1516                 .enum_list      = NULL,
1517                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1518         },
1519         {
1520                 .label          = "map acl inherit",
1521                 .type           = P_BOOL,
1522                 .p_class        = P_LOCAL,
1523                 .offset         = LOCAL_VAR(map_acl_inherit),
1524                 .special        = NULL,
1525                 .enum_list      = NULL,
1526                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1527         },
1528         {
1529                 .label          = "afs share",
1530                 .type           = P_BOOL,
1531                 .p_class        = P_LOCAL,
1532                 .offset         = LOCAL_VAR(afs_share),
1533                 .special        = NULL,
1534                 .enum_list      = NULL,
1535                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1536         },
1537         {
1538                 .label          = "max mux",
1539                 .type           = P_INTEGER,
1540                 .p_class        = P_GLOBAL,
1541                 .offset         = GLOBAL_VAR(max_mux),
1542                 .special        = NULL,
1543                 .enum_list      = NULL,
1544                 .flags          = FLAG_ADVANCED,
1545         },
1546         {
1547                 .label          = "max xmit",
1548                 .type           = P_BYTES,
1549                 .p_class        = P_GLOBAL,
1550                 .offset         = GLOBAL_VAR(max_xmit),
1551                 .special        = NULL,
1552                 .enum_list      = NULL,
1553                 .flags          = FLAG_ADVANCED,
1554         },
1555         {
1556                 .label          = "name resolve order",
1557                 .type           = P_CMDLIST,
1558                 .p_class        = P_GLOBAL,
1559                 .offset         = GLOBAL_VAR(name_resolve_order),
1560                 .special        = NULL,
1561                 .enum_list      = NULL,
1562                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
1563         },
1564         {
1565                 .label          = "max ttl",
1566                 .type           = P_INTEGER,
1567                 .p_class        = P_GLOBAL,
1568                 .offset         = GLOBAL_VAR(max_ttl),
1569                 .special        = NULL,
1570                 .enum_list      = NULL,
1571                 .flags          = FLAG_ADVANCED,
1572         },
1573         {
1574                 .label          = "max wins ttl",
1575                 .type           = P_INTEGER,
1576                 .p_class        = P_GLOBAL,
1577                 .offset         = GLOBAL_VAR(max_wins_ttl),
1578                 .special        = NULL,
1579                 .enum_list      = NULL,
1580                 .flags          = FLAG_ADVANCED,
1581         },
1582         {
1583                 .label          = "min wins ttl",
1584                 .type           = P_INTEGER,
1585                 .p_class        = P_GLOBAL,
1586                 .offset         = GLOBAL_VAR(min_wins_ttl),
1587                 .special        = NULL,
1588                 .enum_list      = NULL,
1589                 .flags          = FLAG_ADVANCED,
1590         },
1591         {
1592                 .label          = "time server",
1593                 .type           = P_BOOL,
1594                 .p_class        = P_GLOBAL,
1595                 .offset         = GLOBAL_VAR(time_server),
1596                 .special        = NULL,
1597                 .enum_list      = NULL,
1598                 .flags          = FLAG_ADVANCED,
1599         },
1600         {
1601                 .label          = "unix extensions",
1602                 .type           = P_BOOL,
1603                 .p_class        = P_GLOBAL,
1604                 .offset         = GLOBAL_VAR(unix_extensions),
1605                 .special        = NULL,
1606                 .enum_list      = NULL,
1607                 .flags          = FLAG_ADVANCED,
1608         },
1609         {
1610                 .label          = "use spnego",
1611                 .type           = P_BOOL,
1612                 .p_class        = P_GLOBAL,
1613                 .offset         = GLOBAL_VAR(use_spnego),
1614                 .special        = NULL,
1615                 .enum_list      = NULL,
1616                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
1617         },
1618         {
1619                 .label          = "client signing",
1620                 .type           = P_ENUM,
1621                 .p_class        = P_GLOBAL,
1622                 .offset         = GLOBAL_VAR(client_signing),
1623                 .special        = NULL,
1624                 .enum_list      = enum_smb_signing_vals,
1625                 .flags          = FLAG_ADVANCED,
1626         },
1627         {
1628                 .label          = "server signing",
1629                 .type           = P_ENUM,
1630                 .p_class        = P_GLOBAL,
1631                 .offset         = GLOBAL_VAR(server_signing),
1632                 .special        = NULL,
1633                 .enum_list      = enum_smb_signing_vals,
1634                 .flags          = FLAG_ADVANCED,
1635         },
1636         {
1637                 .label          = "smb encrypt",
1638                 .type           = P_ENUM,
1639                 .p_class        = P_LOCAL,
1640                 .offset         = LOCAL_VAR(smb_encrypt),
1641                 .special        = NULL,
1642                 .enum_list      = enum_smb_signing_vals,
1643                 .flags          = FLAG_ADVANCED,
1644         },
1645         {
1646                 .label          = "client use spnego",
1647                 .type           = P_BOOL,
1648                 .p_class        = P_GLOBAL,
1649                 .offset         = GLOBAL_VAR(client_use_spnego),
1650                 .special        = NULL,
1651                 .enum_list      = NULL,
1652                 .flags          = FLAG_ADVANCED,
1653         },
1654         {
1655                 .label          = "client ldap sasl wrapping",
1656                 .type           = P_ENUM,
1657                 .p_class        = P_GLOBAL,
1658                 .offset         = GLOBAL_VAR(client_ldap_sasl_wrapping),
1659                 .special        = NULL,
1660                 .enum_list      = enum_ldap_sasl_wrapping,
1661                 .flags          = FLAG_ADVANCED,
1662         },
1663         {
1664                 .label          = "enable asu support",
1665                 .type           = P_BOOL,
1666                 .p_class        = P_GLOBAL,
1667                 .offset         = GLOBAL_VAR(enable_asu_support),
1668                 .special        = NULL,
1669                 .enum_list      = NULL,
1670                 .flags          = FLAG_ADVANCED,
1671         },
1672         {
1673                 .label          = "svcctl list",
1674                 .type           = P_CMDLIST,
1675                 .p_class        = P_GLOBAL,
1676                 .offset         = GLOBAL_VAR(svcctl_list),
1677                 .special        = NULL,
1678                 .enum_list      = NULL,
1679                 .flags          = FLAG_ADVANCED,
1680         },
1681         {
1682                 .label          = "cldap port",
1683                 .type           = P_INTEGER,
1684                 .p_class        = P_GLOBAL,
1685                 .offset         = GLOBAL_VAR(cldap_port),
1686                 .special        = NULL,
1687                 .enum_list      = NULL
1688         },
1689         {
1690                 .label          = "dgram port",
1691                 .type           = P_INTEGER,
1692                 .p_class        = P_GLOBAL,
1693                 .offset         = GLOBAL_VAR(dgram_port),
1694                 .special        = NULL,
1695                 .enum_list      = NULL
1696         },
1697         {
1698                 .label          = "nbt port",
1699                 .type           = P_INTEGER,
1700                 .p_class        = P_GLOBAL,
1701                 .offset         = GLOBAL_VAR(nbt_port),
1702                 .special        = NULL,
1703                 .enum_list      = NULL
1704         },
1705         {
1706                 .label          = "krb5 port",
1707                 .type           = P_INTEGER,
1708                 .p_class        = P_GLOBAL,
1709                 .offset         = GLOBAL_VAR(krb5_port),
1710                 .special        = NULL,
1711                 .enum_list      = NULL
1712         },
1713         {
1714                 .label          = "kpasswd port",
1715                 .type           = P_INTEGER,
1716                 .p_class        = P_GLOBAL,
1717                 .offset         = GLOBAL_VAR(kpasswd_port),
1718                 .special        = NULL,
1719                 .enum_list      = NULL
1720         },
1721         {
1722                 .label          = "web port",
1723                 .type           = P_INTEGER,
1724                 .p_class        = P_GLOBAL,
1725                 .offset         = GLOBAL_VAR(web_port),
1726                 .special        = NULL,
1727                 .enum_list      = NULL
1728         },
1729         {
1730                 .label          = "rpc big endian",
1731                 .type           = P_BOOL,
1732                 .p_class        = P_GLOBAL,
1733                 .offset         = GLOBAL_VAR(rpc_big_endian),
1734                 .special        = NULL,
1735                 .enum_list      = NULL
1736         },
1737         {
1738                 .label          = "durable handles",
1739                 .type           = P_BOOL,
1740                 .p_class        = P_LOCAL,
1741                 .offset         = LOCAL_VAR(durable_handles),
1742                 .special        = NULL,
1743                 .enum_list      = NULL,
1744                 .flags          = FLAG_ADVANCED,
1745         },
1746
1747         {N_("Tuning Options"), P_SEP, P_SEPARATOR},
1748
1749         {
1750                 .label          = "block size",
1751                 .type           = P_BYTES,
1752                 .p_class        = P_LOCAL,
1753                 .offset         = LOCAL_VAR(block_size),
1754                 .special        = NULL,
1755                 .enum_list      = NULL,
1756                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1757         },
1758         {
1759                 .label          = "deadtime",
1760                 .type           = P_INTEGER,
1761                 .p_class        = P_GLOBAL,
1762                 .offset         = GLOBAL_VAR(deadtime),
1763                 .special        = NULL,
1764                 .enum_list      = NULL,
1765                 .flags          = FLAG_ADVANCED,
1766         },
1767         {
1768                 .label          = "getwd cache",
1769                 .type           = P_BOOL,
1770                 .p_class        = P_GLOBAL,
1771                 .offset         = GLOBAL_VAR(getwd_cache),
1772                 .special        = NULL,
1773                 .enum_list      = NULL,
1774                 .flags          = FLAG_ADVANCED,
1775         },
1776         {
1777                 .label          = "keepalive",
1778                 .type           = P_INTEGER,
1779                 .p_class        = P_GLOBAL,
1780                 .offset         = GLOBAL_VAR(keepalive),
1781                 .special        = NULL,
1782                 .enum_list      = NULL,
1783                 .flags          = FLAG_ADVANCED,
1784         },
1785         {
1786                 .label          = "change notify",
1787                 .type           = P_BOOL,
1788                 .p_class        = P_LOCAL,
1789                 .offset         = LOCAL_VAR(change_notify),
1790                 .special        = NULL,
1791                 .enum_list      = NULL,
1792                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1793         },
1794         {
1795                 .label          = "directory name cache size",
1796                 .type           = P_INTEGER,
1797                 .p_class        = P_LOCAL,
1798                 .offset         = LOCAL_VAR(directory_name_cache_size),
1799                 .special        = NULL,
1800                 .enum_list      = NULL,
1801                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1802         },
1803         {
1804                 .label          = "kernel change notify",
1805                 .type           = P_BOOL,
1806                 .p_class        = P_LOCAL,
1807                 .offset         = LOCAL_VAR(kernel_change_notify),
1808                 .special        = NULL,
1809                 .enum_list      = NULL,
1810                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1811         },
1812         {
1813                 .label          = "lpq cache time",
1814                 .type           = P_INTEGER,
1815                 .p_class        = P_GLOBAL,
1816                 .offset         = GLOBAL_VAR(lpq_cache_time),
1817                 .special        = NULL,
1818                 .enum_list      = NULL,
1819                 .flags          = FLAG_ADVANCED,
1820         },
1821         {
1822                 .label          = "max smbd processes",
1823                 .type           = P_INTEGER,
1824                 .p_class        = P_GLOBAL,
1825                 .offset         = GLOBAL_VAR(max_smbd_processes),
1826                 .special        = NULL,
1827                 .enum_list      = NULL,
1828                 .flags          = FLAG_ADVANCED,
1829         },
1830         {
1831                 .label          = "max connections",
1832                 .type           = P_INTEGER,
1833                 .p_class        = P_LOCAL,
1834                 .offset         = LOCAL_VAR(max_connections),
1835                 .special        = NULL,
1836                 .enum_list      = NULL,
1837                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1838         },
1839         {
1840                 .label          = "max disk size",
1841                 .type           = P_BYTES,
1842                 .p_class        = P_GLOBAL,
1843                 .offset         = GLOBAL_VAR(max_disk_size),
1844                 .special        = NULL,
1845                 .enum_list      = NULL,
1846                 .flags          = FLAG_ADVANCED,
1847         },
1848         {
1849                 .label          = "max open files",
1850                 .type           = P_INTEGER,
1851                 .p_class        = P_GLOBAL,
1852                 .offset         = GLOBAL_VAR(max_open_files),
1853                 .special        = NULL,
1854                 .enum_list      = NULL,
1855                 .flags          = FLAG_ADVANCED,
1856         },
1857         {
1858                 .label          = "min print space",
1859                 .type           = P_INTEGER,
1860                 .p_class        = P_LOCAL,
1861                 .offset         = LOCAL_VAR(min_print_space),
1862                 .special        = NULL,
1863                 .enum_list      = NULL,
1864                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
1865         },
1866         {
1867                 .label          = "socket options",
1868                 .type           = P_STRING,
1869                 .p_class        = P_GLOBAL,
1870                 .offset         = GLOBAL_VAR(socket_options),
1871                 .special        = NULL,
1872                 .enum_list      = NULL,
1873                 .flags          = FLAG_ADVANCED,
1874         },
1875         {
1876                 .label          = "strict allocate",
1877                 .type           = P_BOOL,
1878                 .p_class        = P_LOCAL,
1879                 .offset         = LOCAL_VAR(strict_allocate),
1880                 .special        = NULL,
1881                 .enum_list      = NULL,
1882                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1883         },
1884         {
1885                 .label          = "strict sync",
1886                 .type           = P_BOOL,
1887                 .p_class        = P_LOCAL,
1888                 .offset         = LOCAL_VAR(strict_sync),
1889                 .special        = NULL,
1890                 .enum_list      = NULL,
1891                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1892         },
1893         {
1894                 .label          = "sync always",
1895                 .type           = P_BOOL,
1896                 .p_class        = P_LOCAL,
1897                 .offset         = LOCAL_VAR(sync_always),
1898                 .special        = NULL,
1899                 .enum_list      = NULL,
1900                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1901         },
1902         {
1903                 .label          = "use mmap",
1904                 .type           = P_BOOL,
1905                 .p_class        = P_GLOBAL,
1906                 .offset         = GLOBAL_VAR(use_mmap),
1907                 .special        = NULL,
1908                 .enum_list      = NULL,
1909                 .flags          = FLAG_ADVANCED,
1910         },
1911         {
1912                 .label          = "use ntdb",
1913                 .type           = P_BOOL,
1914                 .p_class        = P_GLOBAL,
1915                 .offset         = GLOBAL_VAR(use_ntdb),
1916                 .special        = NULL,
1917                 .enum_list      = NULL,
1918                 .flags          = FLAG_ADVANCED,
1919         },
1920         {
1921                 .label          = "use sendfile",
1922                 .type           = P_BOOL,
1923                 .p_class        = P_LOCAL,
1924                 .offset         = LOCAL_VAR(_use_sendfile),
1925                 .special        = NULL,
1926                 .enum_list      = NULL,
1927                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1928         },
1929         {
1930                 .label          = "hostname lookups",
1931                 .type           = P_BOOL,
1932                 .p_class        = P_GLOBAL,
1933                 .offset         = GLOBAL_VAR(hostname_lookups),
1934                 .special        = NULL,
1935                 .enum_list      = NULL,
1936                 .flags          = FLAG_ADVANCED,
1937         },
1938         {
1939                 .label          = "write cache size",
1940                 .type           = P_BYTES,
1941                 .p_class        = P_LOCAL,
1942                 .offset         = LOCAL_VAR(write_cache_size),
1943                 .special        = NULL,
1944                 .enum_list      = NULL,
1945                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1946         },
1947         {
1948                 .label          = "name cache timeout",
1949                 .type           = P_INTEGER,
1950                 .p_class        = P_GLOBAL,
1951                 .offset         = GLOBAL_VAR(name_cache_timeout),
1952                 .special        = NULL,
1953                 .enum_list      = NULL,
1954                 .flags          = FLAG_ADVANCED,
1955         },
1956         {
1957                 .label          = "ctdbd socket",
1958                 .type           = P_STRING,
1959                 .p_class        = P_GLOBAL,
1960                 .offset         = GLOBAL_VAR(_ctdbd_socket),
1961                 .special        = NULL,
1962                 .enum_list      = NULL,
1963                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1964         },
1965         {
1966                 .label          = "cluster addresses",
1967                 .type           = P_CMDLIST,
1968                 .p_class        = P_GLOBAL,
1969                 .offset         = GLOBAL_VAR(cluster_addresses),
1970                 .special        = NULL,
1971                 .enum_list      = NULL,
1972                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1973         },
1974         {
1975                 .label          = "clustering",
1976                 .type           = P_BOOL,
1977                 .p_class        = P_GLOBAL,
1978                 .offset         = GLOBAL_VAR(clustering),
1979                 .special        = NULL,
1980                 .enum_list      = NULL,
1981                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1982         },
1983         {
1984                 .label          = "ctdb timeout",
1985                 .type           = P_INTEGER,
1986                 .p_class        = P_GLOBAL,
1987                 .offset         = GLOBAL_VAR(ctdb_timeout),
1988                 .special        = NULL,
1989                 .enum_list      = NULL,
1990                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1991         },
1992         {
1993                 .label          = "ctdb locktime warn threshold",
1994                 .type           = P_INTEGER,
1995                 .p_class        = P_GLOBAL,
1996                 .offset         = GLOBAL_VAR(ctdb_locktime_warn_threshold),
1997                 .special        = NULL,
1998                 .enum_list      = NULL,
1999                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2000         },
2001         {
2002                 .label          = "smb2 max read",
2003                 .type           = P_BYTES,
2004                 .p_class        = P_GLOBAL,
2005                 .offset         = GLOBAL_VAR(smb2_max_read),
2006                 .special        = NULL,
2007                 .enum_list      = NULL,
2008                 .flags          = FLAG_ADVANCED,
2009         },
2010         {
2011                 .label          = "smb2 max write",
2012                 .type           = P_BYTES,
2013                 .p_class        = P_GLOBAL,
2014                 .offset         = GLOBAL_VAR(smb2_max_write),
2015                 .special        = NULL,
2016                 .enum_list      = NULL,
2017                 .flags          = FLAG_ADVANCED,
2018         },
2019         {
2020                 .label          = "smb2 max trans",
2021                 .type           = P_BYTES,
2022                 .p_class        = P_GLOBAL,
2023                 .offset         = GLOBAL_VAR(smb2_max_trans),
2024                 .special        = NULL,
2025                 .enum_list      = NULL,
2026                 .flags          = FLAG_ADVANCED,
2027         },
2028         {
2029                 .label          = "smb2 max credits",
2030                 .type           = P_INTEGER,
2031                 .p_class        = P_GLOBAL,
2032                 .offset         = GLOBAL_VAR(ismb2_max_credits),
2033                 .special        = NULL,
2034                 .enum_list      = NULL,
2035                 .flags          = FLAG_ADVANCED,
2036         },
2037
2038         {N_("Printing Options"), P_SEP, P_SEPARATOR},
2039
2040         {
2041                 .label          = "max reported print jobs",
2042                 .type           = P_INTEGER,
2043                 .p_class        = P_LOCAL,
2044                 .offset         = LOCAL_VAR(max_reported_print_jobs),
2045                 .special        = NULL,
2046                 .enum_list      = NULL,
2047                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2048         },
2049         {
2050                 .label          = "max print jobs",
2051                 .type           = P_INTEGER,
2052                 .p_class        = P_LOCAL,
2053                 .offset         = LOCAL_VAR(iMaxPrintJobs),
2054                 .special        = NULL,
2055                 .enum_list      = NULL,
2056                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2057         },
2058         {
2059                 .label          = "load printers",
2060                 .type           = P_BOOL,
2061                 .p_class        = P_GLOBAL,
2062                 .offset         = GLOBAL_VAR(load_printers),
2063                 .special        = NULL,
2064                 .enum_list      = NULL,
2065                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2066         },
2067         {
2068                 .label          = "printcap cache time",
2069                 .type           = P_INTEGER,
2070                 .p_class        = P_GLOBAL,
2071                 .offset         = GLOBAL_VAR(printcap_cache_time),
2072                 .special        = NULL,
2073                 .enum_list      = NULL,
2074                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2075         },
2076         {
2077                 .label          = "printcap name",
2078                 .type           = P_STRING,
2079                 .p_class        = P_GLOBAL,
2080                 .offset         = GLOBAL_VAR(szPrintcapname),
2081                 .special        = NULL,
2082                 .enum_list      = NULL,
2083                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2084         },
2085         {
2086                 .label          = "printcap",
2087                 .type           = P_STRING,
2088                 .p_class        = P_GLOBAL,
2089                 .offset         = GLOBAL_VAR(szPrintcapname),
2090                 .special        = NULL,
2091                 .enum_list      = NULL,
2092                 .flags          = FLAG_HIDE,
2093         },
2094         {
2095                 .label          = "printable",
2096                 .type           = P_BOOL,
2097                 .p_class        = P_LOCAL,
2098                 .offset         = LOCAL_VAR(printable),
2099                 .special        = NULL,
2100                 .enum_list      = NULL,
2101                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2102         },
2103         {
2104                 .label          = "print notify backchannel",
2105                 .type           = P_BOOL,
2106                 .p_class        = P_LOCAL,
2107                 .offset         = LOCAL_VAR(print_notify_backchannel),
2108                 .special        = NULL,
2109                 .enum_list      = NULL,
2110                 .flags          = FLAG_ADVANCED,
2111         },
2112         {
2113                 .label          = "print ok",
2114                 .type           = P_BOOL,
2115                 .p_class        = P_LOCAL,
2116                 .offset         = LOCAL_VAR(printable),
2117                 .special        = NULL,
2118                 .enum_list      = NULL,
2119                 .flags          = FLAG_HIDE,
2120         },
2121         {
2122                 .label          = "printing",
2123                 .type           = P_ENUM,
2124                 .p_class        = P_LOCAL,
2125                 .offset         = LOCAL_VAR(printing),
2126                 .special        = handle_printing,
2127                 .enum_list      = enum_printing,
2128                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2129         },
2130         {
2131                 .label          = "cups options",
2132                 .type           = P_STRING,
2133                 .p_class        = P_LOCAL,
2134                 .offset         = LOCAL_VAR(cups_options),
2135                 .special        = NULL,
2136                 .enum_list      = NULL,
2137                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2138         },
2139         {
2140                 .label          = "cups server",
2141                 .type           = P_STRING,
2142                 .p_class        = P_GLOBAL,
2143                 .offset         = GLOBAL_VAR(cups_server),
2144                 .special        = NULL,
2145                 .enum_list      = NULL,
2146                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2147         },
2148         {
2149                 .label          = "cups encrypt",
2150                 .type           = P_ENUM,
2151                 .p_class        = P_GLOBAL,
2152                 .offset         = GLOBAL_VAR(CupsEncrypt),
2153                 .special        = NULL,
2154                 .enum_list      = enum_bool_auto,
2155                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2156         },
2157         {
2158
2159                 .label          = "cups connection timeout",
2160                 .type           = P_INTEGER,
2161                 .p_class        = P_GLOBAL,
2162                 .offset         = GLOBAL_VAR(cups_connection_timeout),
2163                 .special        = NULL,
2164                 .enum_list      = NULL,
2165                 .flags          = FLAG_ADVANCED,
2166         },
2167         {
2168                 .label          = "iprint server",
2169                 .type           = P_STRING,
2170                 .p_class        = P_GLOBAL,
2171                 .offset         = GLOBAL_VAR(iprint_server),
2172                 .special        = NULL,
2173                 .enum_list      = NULL,
2174                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2175         },
2176         {
2177                 .label          = "print command",
2178                 .type           = P_STRING,
2179                 .p_class        = P_LOCAL,
2180                 .offset         = LOCAL_VAR(print_command),
2181                 .special        = NULL,
2182                 .enum_list      = NULL,
2183                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2184         },
2185         {
2186                 .label          = "disable spoolss",
2187                 .type           = P_BOOL,
2188                 .p_class        = P_GLOBAL,
2189                 .offset         = GLOBAL_VAR(_disable_spoolss),
2190                 .special        = NULL,
2191                 .enum_list      = NULL,
2192                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2193         },
2194         {
2195                 .label          = "enable spoolss",
2196                 .type           = P_BOOLREV,
2197                 .p_class        = P_GLOBAL,
2198                 .offset         = GLOBAL_VAR(_disable_spoolss),
2199                 .special        = NULL,
2200                 .enum_list      = NULL,
2201                 .flags          = FLAG_HIDE,
2202         },
2203         {
2204                 .label          = "lpq command",
2205                 .type           = P_STRING,
2206                 .p_class        = P_LOCAL,
2207                 .offset         = LOCAL_VAR(lpq_command),
2208                 .special        = NULL,
2209                 .enum_list      = NULL,
2210                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2211         },
2212         {
2213                 .label          = "lprm command",
2214                 .type           = P_STRING,
2215                 .p_class        = P_LOCAL,
2216                 .offset         = LOCAL_VAR(lprm_command),
2217                 .special        = NULL,
2218                 .enum_list      = NULL,
2219                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2220         },
2221         {
2222                 .label          = "lppause command",
2223                 .type           = P_STRING,
2224                 .p_class        = P_LOCAL,
2225                 .offset         = LOCAL_VAR(lppause_command),
2226                 .special        = NULL,
2227                 .enum_list      = NULL,
2228                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2229         },
2230         {
2231                 .label          = "lpresume command",
2232                 .type           = P_STRING,
2233                 .p_class        = P_LOCAL,
2234                 .offset         = LOCAL_VAR(lpresume_command),
2235                 .special        = NULL,
2236                 .enum_list      = NULL,
2237                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2238         },
2239         {
2240                 .label          = "queuepause command",
2241                 .type           = P_STRING,
2242                 .p_class        = P_LOCAL,
2243                 .offset         = LOCAL_VAR(queuepause_command),
2244                 .special        = NULL,
2245                 .enum_list      = NULL,
2246                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2247         },
2248         {
2249                 .label          = "queueresume command",
2250                 .type           = P_STRING,
2251                 .p_class        = P_LOCAL,
2252                 .offset         = LOCAL_VAR(queueresume_command),
2253                 .special        = NULL,
2254                 .enum_list      = NULL,
2255                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2256         },
2257         {
2258                 .label          = "addport command",
2259                 .type           = P_STRING,
2260                 .p_class        = P_GLOBAL,
2261                 .offset         = GLOBAL_VAR(addport_command),
2262                 .special        = NULL,
2263                 .enum_list      = NULL,
2264                 .flags          = FLAG_ADVANCED,
2265         },
2266         {
2267                 .label          = "enumports command",
2268                 .type           = P_STRING,
2269                 .p_class        = P_GLOBAL,
2270                 .offset         = GLOBAL_VAR(enumports_command),
2271                 .special        = NULL,
2272                 .enum_list      = NULL,
2273                 .flags          = FLAG_ADVANCED,
2274         },
2275         {
2276                 .label          = "addprinter command",
2277                 .type           = P_STRING,
2278                 .p_class        = P_GLOBAL,
2279                 .offset         = GLOBAL_VAR(addprinter_command),
2280                 .special        = NULL,
2281                 .enum_list      = NULL,
2282                 .flags          = FLAG_ADVANCED,
2283         },
2284         {
2285                 .label          = "deleteprinter command",
2286                 .type           = P_STRING,
2287                 .p_class        = P_GLOBAL,
2288                 .offset         = GLOBAL_VAR(deleteprinter_command),
2289                 .special        = NULL,
2290                 .enum_list      = NULL,
2291                 .flags          = FLAG_ADVANCED,
2292         },
2293         {
2294                 .label          = "show add printer wizard",
2295                 .type           = P_BOOL,
2296                 .p_class        = P_GLOBAL,
2297                 .offset         = GLOBAL_VAR(show_add_printer_wizard),
2298                 .special        = NULL,
2299                 .enum_list      = NULL,
2300                 .flags          = FLAG_ADVANCED,
2301         },
2302         {
2303                 .label          = "os2 driver map",
2304                 .type           = P_STRING,
2305                 .p_class        = P_GLOBAL,
2306                 .offset         = GLOBAL_VAR(os2_driver_map),
2307                 .special        = NULL,
2308                 .enum_list      = NULL,
2309                 .flags          = FLAG_ADVANCED,
2310         },
2311
2312         {
2313                 .label          = "printer name",
2314                 .type           = P_STRING,
2315                 .p_class        = P_LOCAL,
2316                 .offset         = LOCAL_VAR(_printername),
2317                 .special        = NULL,
2318                 .enum_list      = NULL,
2319                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2320         },
2321         {
2322                 .label          = "printer",
2323                 .type           = P_STRING,
2324                 .p_class        = P_LOCAL,
2325                 .offset         = LOCAL_VAR(_printername),
2326                 .special        = NULL,
2327                 .enum_list      = NULL,
2328                 .flags          = FLAG_HIDE,
2329         },
2330         {
2331                 .label          = "use client driver",
2332                 .type           = P_BOOL,
2333                 .p_class        = P_LOCAL,
2334                 .offset         = LOCAL_VAR(use_client_driver),
2335                 .special        = NULL,
2336                 .enum_list      = NULL,
2337                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2338         },
2339         {
2340                 .label          = "default devmode",
2341                 .type           = P_BOOL,
2342                 .p_class        = P_LOCAL,
2343                 .offset         = LOCAL_VAR(default_devmode),
2344                 .special        = NULL,
2345                 .enum_list      = NULL,
2346                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2347         },
2348         {
2349                 .label          = "force printername",
2350                 .type           = P_BOOL,
2351                 .p_class        = P_LOCAL,
2352                 .offset         = LOCAL_VAR(force_printername),
2353                 .special        = NULL,
2354                 .enum_list      = NULL,
2355                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2356         },
2357         {
2358                 .label          = "printjob username",
2359                 .type           = P_STRING,
2360                 .p_class        = P_LOCAL,
2361                 .offset         = LOCAL_VAR(printjob_username),
2362                 .special        = NULL,
2363                 .enum_list      = NULL,
2364                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2365         },
2366
2367         {N_("Filename Handling"), P_SEP, P_SEPARATOR},
2368
2369         {
2370                 .label          = "mangling method",
2371                 .type           = P_STRING,
2372                 .p_class        = P_GLOBAL,
2373                 .offset         = GLOBAL_VAR(mangling_method),
2374                 .special        = NULL,
2375                 .enum_list      = NULL,
2376                 .flags          = FLAG_ADVANCED,
2377         },
2378         {
2379                 .label          = "mangle prefix",
2380                 .type           = P_INTEGER,
2381                 .p_class        = P_GLOBAL,
2382                 .offset         = GLOBAL_VAR(mangle_prefix),
2383                 .special        = NULL,
2384                 .enum_list      = NULL,
2385                 .flags          = FLAG_ADVANCED,
2386         },
2387
2388         {
2389                 .label          = "default case",
2390                 .type           = P_ENUM,
2391                 .p_class        = P_LOCAL,
2392                 .offset         = LOCAL_VAR(default_case),
2393                 .special        = NULL,
2394                 .enum_list      = enum_case,
2395                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2396         },
2397         {
2398                 .label          = "case sensitive",
2399                 .type           = P_ENUM,
2400                 .p_class        = P_LOCAL,
2401                 .offset         = LOCAL_VAR(case_sensitive),
2402                 .special        = NULL,
2403                 .enum_list      = enum_bool_auto,
2404                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2405         },
2406         {
2407                 .label          = "casesignames",
2408                 .type           = P_ENUM,
2409                 .p_class        = P_LOCAL,
2410                 .offset         = LOCAL_VAR(case_sensitive),
2411                 .special        = NULL,
2412                 .enum_list      = enum_bool_auto,
2413                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_HIDE,
2414         },
2415         {
2416                 .label          = "preserve case",
2417                 .type           = P_BOOL,
2418                 .p_class        = P_LOCAL,
2419                 .offset         = LOCAL_VAR(preserve_case),
2420                 .special        = NULL,
2421                 .enum_list      = NULL,
2422                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2423         },
2424         {
2425                 .label          = "short preserve case",
2426                 .type           = P_BOOL,
2427                 .p_class        = P_LOCAL,
2428                 .offset         = LOCAL_VAR(short_preserve_case),
2429                 .special        = NULL,
2430                 .enum_list      = NULL,
2431                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2432         },
2433         {
2434                 .label          = "mangling char",
2435                 .type           = P_CHAR,
2436                 .p_class        = P_LOCAL,
2437                 .offset         = LOCAL_VAR(mangling_char),
2438                 .special        = NULL,
2439                 .enum_list      = NULL,
2440                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2441         },
2442         {
2443                 .label          = "hide dot files",
2444                 .type           = P_BOOL,
2445                 .p_class        = P_LOCAL,
2446                 .offset         = LOCAL_VAR(hide_dot_files),
2447                 .special        = NULL,
2448                 .enum_list      = NULL,
2449                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2450         },
2451         {
2452                 .label          = "hide special files",
2453                 .type           = P_BOOL,
2454                 .p_class        = P_LOCAL,
2455                 .offset         = LOCAL_VAR(hide_special_files),
2456                 .special        = NULL,
2457                 .enum_list      = NULL,
2458                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2459         },
2460         {
2461                 .label          = "hide unreadable",
2462                 .type           = P_BOOL,
2463                 .p_class        = P_LOCAL,
2464                 .offset         = LOCAL_VAR(hide_unreadable),
2465                 .special        = NULL,
2466                 .enum_list      = NULL,
2467                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2468         },
2469         {
2470                 .label          = "hide unwriteable files",
2471                 .type           = P_BOOL,
2472                 .p_class        = P_LOCAL,
2473                 .offset         = LOCAL_VAR(hide_unwriteable_files),
2474                 .special        = NULL,
2475                 .enum_list      = NULL,
2476                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2477         },
2478         {
2479                 .label          = "delete veto files",
2480                 .type           = P_BOOL,
2481                 .p_class        = P_LOCAL,
2482                 .offset         = LOCAL_VAR(delete_veto_files),
2483                 .special        = NULL,
2484                 .enum_list      = NULL,
2485                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2486         },
2487         {
2488                 .label          = "veto files",
2489                 .type           = P_STRING,
2490                 .p_class        = P_LOCAL,
2491                 .offset         = LOCAL_VAR(veto_files),
2492                 .special        = NULL,
2493                 .enum_list      = NULL,
2494                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2495         },
2496         {
2497                 .label          = "hide files",
2498                 .type           = P_STRING,
2499                 .p_class        = P_LOCAL,
2500                 .offset         = LOCAL_VAR(hide_files),
2501                 .special        = NULL,
2502                 .enum_list      = NULL,
2503                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2504         },
2505         {
2506                 .label          = "veto oplock files",
2507                 .type           = P_STRING,
2508                 .p_class        = P_LOCAL,
2509                 .offset         = LOCAL_VAR(veto_oplock_files),
2510                 .special        = NULL,
2511                 .enum_list      = NULL,
2512                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2513         },
2514         {
2515                 .label          = "map archive",
2516                 .type           = P_BOOL,
2517                 .p_class        = P_LOCAL,
2518                 .offset         = LOCAL_VAR(map_archive),
2519                 .special        = NULL,
2520                 .enum_list      = NULL,
2521                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2522         },
2523         {
2524                 .label          = "map hidden",
2525                 .type           = P_BOOL,
2526                 .p_class        = P_LOCAL,
2527                 .offset         = LOCAL_VAR(map_hidden),
2528                 .special        = NULL,
2529                 .enum_list      = NULL,
2530                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2531         },
2532         {
2533                 .label          = "map system",
2534                 .type           = P_BOOL,
2535                 .p_class        = P_LOCAL,
2536                 .offset         = LOCAL_VAR(map_system),
2537                 .special        = NULL,
2538                 .enum_list      = NULL,
2539                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2540         },
2541         {
2542                 .label          = "map readonly",
2543                 .type           = P_ENUM,
2544                 .p_class        = P_LOCAL,
2545                 .offset         = LOCAL_VAR(map_readonly),
2546                 .special        = NULL,
2547                 .enum_list      = enum_map_readonly,
2548                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2549         },
2550         {
2551                 .label          = "mangled names",
2552                 .type           = P_BOOL,
2553                 .p_class        = P_LOCAL,
2554                 .offset         = LOCAL_VAR(mangled_names),
2555                 .special        = NULL,
2556                 .enum_list      = NULL,
2557                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2558         },
2559         {
2560                 .label          = "max stat cache size",
2561                 .type           = P_INTEGER,
2562                 .p_class        = P_GLOBAL,
2563                 .offset         = GLOBAL_VAR(max_stat_cache_size),
2564                 .special        = NULL,
2565                 .enum_list      = NULL,
2566                 .flags          = FLAG_ADVANCED,
2567         },
2568         {
2569                 .label          = "stat cache",
2570                 .type           = P_BOOL,
2571                 .p_class        = P_GLOBAL,
2572                 .offset         = GLOBAL_VAR(stat_cache),
2573                 .special        = NULL,
2574                 .enum_list      = NULL,
2575                 .flags          = FLAG_ADVANCED,
2576         },
2577         {
2578                 .label          = "store dos attributes",
2579                 .type           = P_BOOL,
2580                 .p_class        = P_LOCAL,
2581                 .offset         = LOCAL_VAR(store_dos_attributes),
2582                 .special        = NULL,
2583                 .enum_list      = NULL,
2584                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2585         },
2586         {
2587                 .label          = "dmapi support",
2588                 .type           = P_BOOL,
2589                 .p_class        = P_LOCAL,
2590                 .offset         = LOCAL_VAR(dmapi_support),
2591                 .special        = NULL,
2592                 .enum_list      = NULL,
2593                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2594         },
2595
2596
2597         {N_("Domain Options"), P_SEP, P_SEPARATOR},
2598
2599         {
2600                 .label          = "machine password timeout",
2601                 .type           = P_INTEGER,
2602                 .p_class        = P_GLOBAL,
2603                 .offset         = GLOBAL_VAR(machine_password_timeout),
2604                 .special        = NULL,
2605                 .enum_list      = NULL,
2606                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
2607         },
2608
2609         {N_("Logon Options"), P_SEP, P_SEPARATOR},
2610
2611         {
2612                 .label          = "add user script",
2613                 .type           = P_STRING,
2614                 .p_class        = P_GLOBAL,
2615                 .offset         = GLOBAL_VAR(add_user_script),
2616                 .special        = NULL,
2617                 .enum_list      = NULL,
2618                 .flags          = FLAG_ADVANCED,
2619         },
2620         {
2621                 .label          = "rename user script",
2622                 .type           = P_STRING,
2623                 .p_class        = P_GLOBAL,
2624                 .offset         = GLOBAL_VAR(rename_user_script),
2625                 .special        = NULL,
2626                 .enum_list      = NULL,
2627                 .flags          = FLAG_ADVANCED,
2628         },
2629         {
2630                 .label          = "delete user script",
2631                 .type           = P_STRING,
2632                 .p_class        = P_GLOBAL,
2633                 .offset         = GLOBAL_VAR(delete_user_script),
2634                 .special        = NULL,
2635                 .enum_list      = NULL,
2636                 .flags          = FLAG_ADVANCED,
2637         },
2638         {
2639                 .label          = "add group script",
2640                 .type           = P_STRING,
2641                 .p_class        = P_GLOBAL,
2642                 .offset         = GLOBAL_VAR(add_group_script),
2643                 .special        = NULL,
2644                 .enum_list      = NULL,
2645                 .flags          = FLAG_ADVANCED,
2646         },
2647         {
2648                 .label          = "delete group script",
2649                 .type           = P_STRING,
2650                 .p_class        = P_GLOBAL,
2651                 .offset         = GLOBAL_VAR(delete_group_script),
2652                 .special        = NULL,
2653                 .enum_list      = NULL,
2654                 .flags          = FLAG_ADVANCED,
2655         },
2656         {
2657                 .label          = "add user to group script",
2658                 .type           = P_STRING,
2659                 .p_class        = P_GLOBAL,
2660                 .offset         = GLOBAL_VAR(add_user_to_group_script),
2661                 .special        = NULL,
2662                 .enum_list      = NULL,
2663                 .flags          = FLAG_ADVANCED,
2664         },
2665         {
2666                 .label          = "delete user from group script",
2667                 .type           = P_STRING,
2668                 .p_class        = P_GLOBAL,
2669                 .offset         = GLOBAL_VAR(delete_user_from_group_script),
2670                 .special        = NULL,
2671                 .enum_list      = NULL,
2672                 .flags          = FLAG_ADVANCED,
2673         },
2674         {
2675                 .label          = "set primary group script",
2676                 .type           = P_STRING,
2677                 .p_class        = P_GLOBAL,
2678                 .offset         = GLOBAL_VAR(set_primary_group_script),
2679                 .special        = NULL,
2680                 .enum_list      = NULL,
2681                 .flags          = FLAG_ADVANCED,
2682         },
2683         {
2684                 .label          = "add machine script",
2685                 .type           = P_STRING,
2686                 .p_class        = P_GLOBAL,
2687                 .offset         = GLOBAL_VAR(add_machine_script),
2688                 .special        = NULL,
2689                 .enum_list      = NULL,
2690                 .flags          = FLAG_ADVANCED,
2691         },
2692         {
2693                 .label          = "shutdown script",
2694                 .type           = P_STRING,
2695                 .p_class        = P_GLOBAL,
2696                 .offset         = GLOBAL_VAR(shutdown_script),
2697                 .special        = NULL,
2698                 .enum_list      = NULL,
2699                 .flags          = FLAG_ADVANCED,
2700         },
2701         {
2702                 .label          = "abort shutdown script",
2703                 .type           = P_STRING,
2704                 .p_class        = P_GLOBAL,
2705                 .offset         = GLOBAL_VAR(abort_shutdown_script),
2706                 .special        = NULL,
2707                 .enum_list      = NULL,
2708                 .flags          = FLAG_ADVANCED,
2709         },
2710         {
2711                 .label          = "username map script",
2712                 .type           = P_STRING,
2713                 .p_class        = P_GLOBAL,
2714                 .offset         = GLOBAL_VAR(username_map_script),
2715                 .special        = NULL,
2716                 .enum_list      = NULL,
2717                 .flags          = FLAG_ADVANCED,
2718         },
2719         {
2720                 .label          = "username map cache time",
2721                 .type           = P_INTEGER,
2722                 .p_class        = P_GLOBAL,
2723                 .offset         = GLOBAL_VAR(username_map_cache_time),
2724                 .special        = NULL,
2725                 .enum_list      = NULL,
2726                 .flags          = FLAG_ADVANCED,
2727         },
2728         {
2729                 .label          = "logon script",
2730                 .type           = P_STRING,
2731                 .p_class        = P_GLOBAL,
2732                 .offset         = GLOBAL_VAR(logon_script),
2733                 .special        = NULL,
2734                 .enum_list      = NULL,
2735                 .flags          = FLAG_ADVANCED,
2736         },
2737         {
2738                 .label          = "logon path",
2739                 .type           = P_STRING,
2740                 .p_class        = P_GLOBAL,
2741                 .offset         = GLOBAL_VAR(logon_path),
2742                 .special        = NULL,
2743                 .enum_list      = NULL,
2744                 .flags          = FLAG_ADVANCED,
2745         },
2746         {
2747                 .label          = "logon drive",
2748                 .type           = P_STRING,
2749                 .p_class        = P_GLOBAL,
2750                 .offset         = GLOBAL_VAR(logon_drive),
2751                 .special        = NULL,
2752                 .enum_list      = NULL,
2753                 .flags          = FLAG_ADVANCED,
2754         },
2755         {
2756                 .label          = "logon home",
2757                 .type           = P_STRING,