a41e9f7e32c2e9bf063069e43bbba6f0a073a333
[samba.git] / source3 / param / loadparm.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 /*
31  *  Load parameters.
32  *
33  *  This module provides suitable callback functions for the params
34  *  module. It builds the internal table of service details which is
35  *  then used by the rest of the server.
36  *
37  * To add a parameter:
38  *
39  * 1) add it to the global or service structure definition
40  * 2) add it to the parm_table
41  * 3) add it to the list of available functions (eg: using FN_GLOBAL_STRING())
42  * 4) If it's a global then initialise it in init_globals. If a local
43  *    (ie. service) parameter then initialise it in the sDefault structure
44  *  
45  *
46  * Notes:
47  *   The configuration file is processed sequentially for speed. It is NOT
48  *   accessed randomly as happens in 'real' Windows. For this reason, there
49  *   is a fair bit of sequence-dependent code here - ie., code which assumes
50  *   that certain things happen before others. In particular, the code which
51  *   happens at the boundary between sections is delicately poised, so be
52  *   careful!
53  *
54  */
55
56 #include "includes.h"
57 #include "system/filesys.h"
58 #include "util_tdb.h"
59 #include "printing.h"
60 #include "lib/smbconf/smbconf.h"
61 #include "lib/smbconf/smbconf_init.h"
62 #include "lib/param/loadparm.h"
63
64 #include "ads.h"
65 #include "../librpc/gen_ndr/svcctl.h"
66 #include "intl.h"
67 #include "smb_signing.h"
68 #include "dbwrap.h"
69 #include "smbldap.h"
70 #include "../lib/util/bitmap.h"
71
72 #ifdef HAVE_SYS_SYSCTL_H
73 #include <sys/sysctl.h>
74 #endif
75
76 #ifdef HAVE_HTTPCONNECTENCRYPT
77 #include <cups/http.h>
78 #endif
79
80 bool bLoaded = false;
81
82 extern userdom_struct current_user_info;
83
84 /* the special value for the include parameter
85  * to be interpreted not as a file name but to
86  * trigger loading of the global smb.conf options
87  * from registry. */
88 #ifndef INCLUDE_REGISTRY_NAME
89 #define INCLUDE_REGISTRY_NAME "registry"
90 #endif
91
92 static bool in_client = false;          /* Not in the client by default */
93 static struct smbconf_csn conf_last_csn;
94
95 #define CONFIG_BACKEND_FILE 0
96 #define CONFIG_BACKEND_REGISTRY 1
97
98 static int config_backend = CONFIG_BACKEND_FILE;
99
100 /* some helpful bits */
101 #define LP_SNUM_OK(i) (((i) >= 0) && ((i) < iNumServices) && (ServicePtrs != NULL) && ServicePtrs[(i)]->valid)
102 #define VALID(i) (ServicePtrs != NULL && ServicePtrs[i]->valid)
103
104 #define USERSHARE_VALID 1
105 #define USERSHARE_PENDING_DELETE 2
106
107 static bool defaults_saved = false;
108
109 #define LOADPARM_EXTRA_GLOBALS \
110         struct parmlist_entry *param_opt;                               \
111         char *szRealm;                                                  \
112         char *szLogLevel;                                               \
113         int iminreceivefile;                                            \
114         char *szPrintcapname;                                           \
115         int CupsEncrypt;                                                \
116         int  iPreferredMaster;                                          \
117         int iDomainMaster;                                              \
118         char *szLdapMachineSuffix;                                      \
119         char *szLdapUserSuffix;                                         \
120         char *szLdapIdmapSuffix;                                        \
121         char *szLdapGroupSuffix;                                        \
122         char *szStateDir;                                               \
123         char *szCacheDir;                                               \
124         char *szSocketAddress;                                          \
125         char *szUsershareTemplateShare;                                 \
126         char *szIdmapUID;                                               \
127         char *szIdmapGID;                                               \
128         int winbindMaxDomainConnections;                                \
129         int ismb2_max_credits;
130 #define LOADPARM_EXTRA_LOCALS                                           \
131         bool valid;                                                     \
132         int usershare;                                                  \
133         struct timespec usershare_last_mod;                             \
134         int iMaxPrintJobs;                                              \
135         char *szCopy;                                                   \
136         char *szInclude;                                                \
137         bool bAvailable;                                                \
138         bool bWidelinks;                                                \
139         struct parmlist_entry *param_opt;                               \
140         struct bitmap *copymap;                                         \
141         char dummy[3];          /* for alignment */
142
143 #include "param/param_global.h"
144 #include "param/param_local.h"
145
146 static struct loadparm_global Globals;
147
148 /* This is a default service used to prime a services structure */
149 static struct loadparm_service sDefault =
150 {
151         .valid = true,
152         .autoloaded = false,
153         .usershare = 0,
154         .usershare_last_mod = {0, 0},
155         .szService = NULL,
156         .szPath = NULL,
157         .szUsername = NULL,
158         .szInvalidUsers = NULL,
159         .szValidUsers = NULL,
160         .szAdminUsers = NULL,
161         .szCopy = NULL,
162         .szInclude = NULL,
163         .szPreExec = NULL,
164         .szPostExec = NULL,
165         .szRootPreExec = NULL,
166         .szRootPostExec = NULL,
167         .szCupsOptions = NULL,
168         .szPrintcommand = NULL,
169         .szLpqcommand = NULL,
170         .szLprmcommand = NULL,
171         .szLppausecommand = NULL,
172         .szLpresumecommand = NULL,
173         .szQueuepausecommand = NULL,
174         .szQueueresumecommand = NULL,
175         .szPrintername = NULL,
176         .szPrintjobUsername = NULL,
177         .szDontdescend = NULL,
178         .szHostsallow = NULL,
179         .szHostsdeny = NULL,
180         .szMagicScript = NULL,
181         .szMagicOutput = NULL,
182         .szVetoFiles = NULL,
183         .szHideFiles = NULL,
184         .szVetoOplockFiles = NULL,
185         .comment = NULL,
186         .force_user = NULL,
187         .force_group = NULL,
188         .readlist = NULL,
189         .writelist = NULL,
190         .printer_admin = NULL,
191         .volume = NULL,
192         .fstype = NULL,
193         .szVfsObjects = NULL,
194         .szMSDfsProxy = NULL,
195         .szAioWriteBehind = NULL,
196         .szDfree = NULL,
197         .iMinPrintSpace = 0,
198         .iMaxPrintJobs = 1000,
199         .iMaxReportedPrintJobs = 0,
200         .iWriteCacheSize = 0,
201         .iCreate_mask = 0744,
202         .iCreate_force_mode = 0,
203         .iSecurity_mask = 0777,
204         .iSecurity_force_mode = 0,
205         .iDir_mask = 0755,
206         .iDir_force_mode = 0,
207         .iDir_Security_mask = 0777,
208         .iDir_Security_force_mode = 0,
209         .iMaxConnections = 0,
210         .iDefaultCase = CASE_LOWER,
211         .iPrinting = DEFAULT_PRINTING,
212         .iOplockContentionLimit = 2,
213         .iCSCPolicy = 0,
214         .iBlock_size = 1024,
215         .iDfreeCacheTime = 0,
216         .bPreexecClose = false,
217         .bRootpreexecClose = false,
218         .iCaseSensitive = Auto,
219         .bCasePreserve = true,
220         .bShortCasePreserve = true,
221         .bHideDotFiles = true,
222         .bHideSpecialFiles = false,
223         .bHideUnReadable = false,
224         .bHideUnWriteableFiles = false,
225         .bBrowseable = true,
226         .bAccessBasedShareEnum = false,
227         .bAvailable = true,
228         .bRead_only = true,
229         .bNo_set_dir = true,
230         .bGuest_only = false,
231         .bAdministrative_share = false,
232         .bGuest_ok = false,
233         .bPrint_ok = false,
234         .bPrintNotifyBackchannel = true,
235         .bMap_system = false,
236         .bMap_hidden = false,
237         .bMap_archive = true,
238         .bStoreDosAttributes = false,
239         .bDmapiSupport = false,
240         .bLocking = true,
241         .iStrictLocking = Auto,
242         .bPosixLocking = true,
243         .bShareModes = true,
244         .bOpLocks = true,
245         .bLevel2OpLocks = true,
246         .bOnlyUser = false,
247         .bMangledNames = true,
248         .bWidelinks = false,
249         .bSymlinks = true,
250         .bSyncAlways = false,
251         .bStrictAllocate = false,
252         .bStrictSync = false,
253         .magic_char = '~',
254         .copymap = NULL,
255         .bDeleteReadonly = false,
256         .bFakeOplocks = false,
257         .bDeleteVetoFiles = false,
258         .bDosFilemode = false,
259         .bDosFiletimes = true,
260         .bDosFiletimeResolution = false,
261         .bFakeDirCreateTimes = false,
262         .bBlockingLocks = true,
263         .bInheritPerms = false,
264         .bInheritACLS = false,
265         .bInheritOwner = false,
266         .bMSDfsRoot = false,
267         .bUseClientDriver = false,
268         .bDefaultDevmode = true,
269         .bForcePrintername = false,
270         .bNTAclSupport = true,
271         .bForceUnknownAclUser = false,
272         .bUseSendfile = false,
273         .bProfileAcls = false,
274         .bMap_acl_inherit = false,
275         .bAfs_Share = false,
276         .bEASupport = false,
277         .bAclCheckPermissions = true,
278         .bAclMapFullControl = true,
279         .bAclGroupControl = false,
280         .bChangeNotify = true,
281         .bKernelChangeNotify = true,
282         .iallocation_roundup_size = SMB_ROUNDUP_ALLOCATION_SIZE,
283         .iAioReadSize = 0,
284         .iAioWriteSize = 0,
285         .iMap_readonly = MAP_READONLY_YES,
286 #ifdef BROKEN_DIRECTORY_HANDLING
287         .iDirectoryNameCacheSize = 0,
288 #else
289         .iDirectoryNameCacheSize = 100,
290 #endif
291         .ismb_encrypt = Auto,
292         .param_opt = NULL,
293         .dummy = ""
294 };
295
296 /* local variables */
297 static struct loadparm_service **ServicePtrs = NULL;
298 static int iNumServices = 0;
299 static int iServiceIndex = 0;
300 static struct db_context *ServiceHash;
301 static int *invalid_services = NULL;
302 static int num_invalid_services = 0;
303 static bool bInGlobalSection = true;
304 static bool bGlobalOnly = false;
305
306 #define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct))
307
308 /* prototypes for the special type handlers */
309 static bool handle_include(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr);
310 static bool handle_copy(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr);
311 static bool handle_idmap_backend(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr);
312 static bool handle_idmap_uid(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr);
313 static bool handle_idmap_gid(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr);
314 static bool handle_debug_list(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr );
315 static bool handle_realm(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr );
316 static bool handle_netbios_aliases(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr );
317 static bool handle_charset(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr );
318 static bool handle_dos_charset(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr );
319 static bool handle_printing(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr);
320 static bool handle_ldap_debug_level(struct loadparm_context *unused, int snum, const char *pszParmValue, char **ptr);
321
322 static void set_allowed_client_auth(void);
323
324 static void add_to_file_list(const char *fname, const char *subfname);
325 static bool lp_set_cmdline_helper(const char *pszParmName, const char *pszParmValue, bool store_values);
326
327 static const struct enum_list enum_protocol[] = {
328         {PROTOCOL_SMB2, "SMB2"},
329         {PROTOCOL_NT1, "NT1"},
330         {PROTOCOL_LANMAN2, "LANMAN2"},
331         {PROTOCOL_LANMAN1, "LANMAN1"},
332         {PROTOCOL_CORE, "CORE"},
333         {PROTOCOL_COREPLUS, "COREPLUS"},
334         {PROTOCOL_COREPLUS, "CORE+"},
335         {-1, NULL}
336 };
337
338 static const struct enum_list enum_security[] = {
339         {SEC_SHARE, "SHARE"},
340         {SEC_USER, "USER"},
341         {SEC_SERVER, "SERVER"},
342         {SEC_DOMAIN, "DOMAIN"},
343 #ifdef HAVE_ADS
344         {SEC_ADS, "ADS"},
345 #endif
346         {-1, NULL}
347 };
348
349 static const struct enum_list enum_printing[] = {
350         {PRINT_SYSV, "sysv"},
351         {PRINT_AIX, "aix"},
352         {PRINT_HPUX, "hpux"},
353         {PRINT_BSD, "bsd"},
354         {PRINT_QNX, "qnx"},
355         {PRINT_PLP, "plp"},
356         {PRINT_LPRNG, "lprng"},
357         {PRINT_CUPS, "cups"},
358         {PRINT_IPRINT, "iprint"},
359         {PRINT_LPRNT, "nt"},
360         {PRINT_LPROS2, "os2"},
361 #if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
362         {PRINT_TEST, "test"},
363         {PRINT_VLP, "vlp"},
364 #endif /* DEVELOPER */
365         {-1, NULL}
366 };
367
368 static const struct enum_list enum_ldap_sasl_wrapping[] = {
369         {0, "plain"},
370         {ADS_AUTH_SASL_SIGN, "sign"},
371         {ADS_AUTH_SASL_SEAL, "seal"},
372         {-1, NULL}
373 };
374
375 static const struct enum_list enum_ldap_ssl[] = {
376         {LDAP_SSL_OFF, "no"},
377         {LDAP_SSL_OFF, "off"},
378         {LDAP_SSL_START_TLS, "start tls"},
379         {LDAP_SSL_START_TLS, "start_tls"},
380         {-1, NULL}
381 };
382
383 /* LDAP Dereferencing Alias types */
384 #define SAMBA_LDAP_DEREF_NEVER          0
385 #define SAMBA_LDAP_DEREF_SEARCHING      1
386 #define SAMBA_LDAP_DEREF_FINDING        2
387 #define SAMBA_LDAP_DEREF_ALWAYS         3
388
389 static const struct enum_list enum_ldap_deref[] = {
390         {SAMBA_LDAP_DEREF_NEVER, "never"},
391         {SAMBA_LDAP_DEREF_SEARCHING, "searching"},
392         {SAMBA_LDAP_DEREF_FINDING, "finding"},
393         {SAMBA_LDAP_DEREF_ALWAYS, "always"},
394         {-1, "auto"}
395 };
396
397 static const struct enum_list enum_ldap_passwd_sync[] = {
398         {LDAP_PASSWD_SYNC_OFF, "no"},
399         {LDAP_PASSWD_SYNC_OFF, "off"},
400         {LDAP_PASSWD_SYNC_ON, "yes"},
401         {LDAP_PASSWD_SYNC_ON, "on"},
402         {LDAP_PASSWD_SYNC_ONLY, "only"},
403         {-1, NULL}
404 };
405
406 static const struct enum_list enum_map_readonly[] = {
407         {MAP_READONLY_NO, "no"},
408         {MAP_READONLY_NO, "false"},
409         {MAP_READONLY_NO, "0"},
410         {MAP_READONLY_YES, "yes"},
411         {MAP_READONLY_YES, "true"},
412         {MAP_READONLY_YES, "1"},
413         {MAP_READONLY_PERMISSIONS, "permissions"},
414         {MAP_READONLY_PERMISSIONS, "perms"},
415         {-1, NULL}
416 };
417
418 static const struct enum_list enum_case[] = {
419         {CASE_LOWER, "lower"},
420         {CASE_UPPER, "upper"},
421         {-1, NULL}
422 };
423
424
425
426 static const struct enum_list enum_bool_auto[] = {
427         {false, "No"},
428         {false, "False"},
429         {false, "0"},
430         {true, "Yes"},
431         {true, "True"},
432         {true, "1"},
433         {Auto, "Auto"},
434         {-1, NULL}
435 };
436
437 static const struct enum_list enum_csc_policy[] = {
438         {CSC_POLICY_MANUAL, "manual"},
439         {CSC_POLICY_DOCUMENTS, "documents"},
440         {CSC_POLICY_PROGRAMS, "programs"},
441         {CSC_POLICY_DISABLE, "disable"},
442         {-1, NULL}
443 };
444
445 /* SMB signing types. */
446 static const struct enum_list enum_smb_signing_vals[] = {
447         {false, "No"},
448         {false, "False"},
449         {false, "0"},
450         {false, "Off"},
451         {false, "disabled"},
452         {true, "Yes"},
453         {true, "True"},
454         {true, "1"},
455         {true, "On"},
456         {true, "enabled"},
457         {Auto, "auto"},
458         {Required, "required"},
459         {Required, "mandatory"},
460         {Required, "force"},
461         {Required, "forced"},
462         {Required, "enforced"},
463         {-1, NULL}
464 };
465
466 /* ACL compatibility options. */
467 static const struct enum_list enum_acl_compat_vals[] = {
468     { ACL_COMPAT_AUTO, "auto" },
469     { ACL_COMPAT_WINNT, "winnt" },
470     { ACL_COMPAT_WIN2K, "win2k" },
471     { -1, NULL}
472 };
473
474 /* 
475    Do you want session setups at user level security with a invalid
476    password to be rejected or allowed in as guest? WinNT rejects them
477    but it can be a pain as it means "net view" needs to use a password
478
479    You have 3 choices in the setting of map_to_guest:
480
481    "Never" means session setups with an invalid password
482    are rejected. This is the default.
483
484    "Bad User" means session setups with an invalid password
485    are rejected, unless the username does not exist, in which case it
486    is treated as a guest login
487
488    "Bad Password" means session setups with an invalid password
489    are treated as a guest login
490
491    Note that map_to_guest only has an effect in user or server
492    level security.
493 */
494
495 static const struct enum_list enum_map_to_guest[] = {
496         {NEVER_MAP_TO_GUEST, "Never"},
497         {MAP_TO_GUEST_ON_BAD_USER, "Bad User"},
498         {MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"},
499         {MAP_TO_GUEST_ON_BAD_UID, "Bad Uid"},
500         {-1, NULL}
501 };
502
503 /* Config backend options */
504
505 static const struct enum_list enum_config_backend[] = {
506         {CONFIG_BACKEND_FILE, "file"},
507         {CONFIG_BACKEND_REGISTRY, "registry"},
508         {-1, NULL}
509 };
510
511 /* ADS kerberos ticket verification options */
512
513 static const struct enum_list enum_kerberos_method[] = {
514         {KERBEROS_VERIFY_SECRETS, "default"},
515         {KERBEROS_VERIFY_SECRETS, "secrets only"},
516         {KERBEROS_VERIFY_SYSTEM_KEYTAB, "system keytab"},
517         {KERBEROS_VERIFY_DEDICATED_KEYTAB, "dedicated keytab"},
518         {KERBEROS_VERIFY_SECRETS_AND_KEYTAB, "secrets and keytab"},
519         {-1, NULL}
520 };
521
522 /* Note: We do not initialise the defaults union - it is not allowed in ANSI C
523  *
524  * The FLAG_HIDE is explicit. Parameters set this way do NOT appear in any edit
525  * screen in SWAT. This is used to exclude parameters as well as to squash all
526  * parameters that have been duplicated by pseudonyms.
527  *
528  * NOTE: To display a parameter in BASIC view set FLAG_BASIC
529  *       Any parameter that does NOT have FLAG_ADVANCED will not disply at all
530  *       Set FLAG_SHARE and FLAG_PRINT to specifically display parameters in
531  *        respective views.
532  *
533  * NOTE2: Handling of duplicated (synonym) parameters:
534  *      Only the first occurance of a parameter should be enabled by FLAG_BASIC
535  *      and/or FLAG_ADVANCED. All duplicates following the first mention should be
536  *      set to FLAG_HIDE. ie: Make you must place the parameter that has the preferred
537  *      name first, and all synonyms must follow it with the FLAG_HIDE attribute.
538  */
539
540 #define GLOBAL_VAR(name) offsetof(struct loadparm_global, name)
541 #define LOCAL_VAR(name) offsetof(struct loadparm_service, name)
542
543 static struct parm_struct parm_table[] = {
544         {N_("Base Options"), P_SEP, P_SEPARATOR},
545
546         {
547                 .label          = "dos charset",
548                 .type           = P_STRING,
549                 .p_class        = P_GLOBAL,
550                 .offset         = GLOBAL_VAR(dos_charset),
551                 .special        = handle_dos_charset,
552                 .enum_list      = NULL,
553                 .flags          = FLAG_ADVANCED
554         },
555         {
556                 .label          = "unix charset",
557                 .type           = P_STRING,
558                 .p_class        = P_GLOBAL,
559                 .offset         = GLOBAL_VAR(unix_charset),
560                 .special        = handle_charset,
561                 .enum_list      = NULL,
562                 .flags          = FLAG_ADVANCED
563         },
564         {
565                 .label          = "comment",
566                 .type           = P_STRING,
567                 .p_class        = P_LOCAL,
568                 .offset         = LOCAL_VAR(comment),
569                 .special        = NULL,
570                 .enum_list      = NULL,
571                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT
572         },
573         {
574                 .label          = "path",
575                 .type           = P_STRING,
576                 .p_class        = P_LOCAL,
577                 .offset         = LOCAL_VAR(szPath),
578                 .special        = NULL,
579                 .enum_list      = NULL,
580                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
581         },
582         {
583                 .label          = "directory",
584                 .type           = P_STRING,
585                 .p_class        = P_LOCAL,
586                 .offset         = LOCAL_VAR(szPath),
587                 .special        = NULL,
588                 .enum_list      = NULL,
589                 .flags          = FLAG_HIDE,
590         },
591         {
592                 .label          = "workgroup",
593                 .type           = P_USTRING,
594                 .p_class        = P_GLOBAL,
595                 .offset         = GLOBAL_VAR(szWorkgroup),
596                 .special        = NULL,
597                 .enum_list      = NULL,
598                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
599         },
600         {
601                 .label          = "realm",
602                 .type           = P_USTRING,
603                 .p_class        = P_GLOBAL,
604                 .offset         = GLOBAL_VAR(szRealm),
605                 .special        = handle_realm,
606                 .enum_list      = NULL,
607                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
608         },
609         {
610                 .label          = "netbios name",
611                 .type           = P_USTRING,
612                 .p_class        = P_GLOBAL,
613                 .offset         = GLOBAL_VAR(szNetbiosName),
614                 .special        = NULL,
615                 .enum_list      = NULL,
616                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
617         },
618         {
619                 .label          = "netbios aliases",
620                 .type           = P_LIST,
621                 .p_class        = P_GLOBAL,
622                 .offset         = GLOBAL_VAR(szNetbiosAliases),
623                 .special        = handle_netbios_aliases,
624                 .enum_list      = NULL,
625                 .flags          = FLAG_ADVANCED,
626         },
627         {
628                 .label          = "netbios scope",
629                 .type           = P_USTRING,
630                 .p_class        = P_GLOBAL,
631                 .offset         = GLOBAL_VAR(szNetbiosScope),
632                 .special        = NULL,
633                 .enum_list      = NULL,
634                 .flags          = FLAG_ADVANCED,
635         },
636         {
637                 .label          = "server string",
638                 .type           = P_STRING,
639                 .p_class        = P_GLOBAL,
640                 .offset         = GLOBAL_VAR(szServerString),
641                 .special        = NULL,
642                 .enum_list      = NULL,
643                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
644         },
645         {
646                 .label          = "interfaces",
647                 .type           = P_LIST,
648                 .p_class        = P_GLOBAL,
649                 .offset         = GLOBAL_VAR(szInterfaces),
650                 .special        = NULL,
651                 .enum_list      = NULL,
652                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
653         },
654         {
655                 .label          = "bind interfaces only",
656                 .type           = P_BOOL,
657                 .p_class        = P_GLOBAL,
658                 .offset         = GLOBAL_VAR(bBindInterfacesOnly),
659                 .special        = NULL,
660                 .enum_list      = NULL,
661                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
662         },
663         {
664                 .label          = "config backend",
665                 .type           = P_ENUM,
666                 .p_class        = P_GLOBAL,
667                 .offset         = GLOBAL_VAR(ConfigBackend),
668                 .special        = NULL,
669                 .enum_list      = enum_config_backend,
670                 .flags          = FLAG_HIDE|FLAG_ADVANCED|FLAG_META,
671         },
672
673         {N_("Security Options"), P_SEP, P_SEPARATOR},
674
675         {
676                 .label          = "security",
677                 .type           = P_ENUM,
678                 .p_class        = P_GLOBAL,
679                 .offset         = GLOBAL_VAR(security),
680                 .special        = NULL,
681                 .enum_list      = enum_security,
682                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
683         },
684         {
685                 .label          = "auth methods",
686                 .type           = P_LIST,
687                 .p_class        = P_GLOBAL,
688                 .offset         = GLOBAL_VAR(AuthMethods),
689                 .special        = NULL,
690                 .enum_list      = NULL,
691                 .flags          = FLAG_ADVANCED,
692         },
693         {
694                 .label          = "encrypt passwords",
695                 .type           = P_BOOL,
696                 .p_class        = P_GLOBAL,
697                 .offset         = GLOBAL_VAR(bEncryptPasswords),
698                 .special        = NULL,
699                 .enum_list      = NULL,
700                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
701         },
702         {
703                 .label          = "client schannel",
704                 .type           = P_ENUM,
705                 .p_class        = P_GLOBAL,
706                 .offset         = GLOBAL_VAR(clientSchannel),
707                 .special        = NULL,
708                 .enum_list      = enum_bool_auto,
709                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
710         },
711         {
712                 .label          = "server schannel",
713                 .type           = P_ENUM,
714                 .p_class        = P_GLOBAL,
715                 .offset         = GLOBAL_VAR(serverSchannel),
716                 .special        = NULL,
717                 .enum_list      = enum_bool_auto,
718                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
719         },
720         {
721                 .label          = "allow trusted domains",
722                 .type           = P_BOOL,
723                 .p_class        = P_GLOBAL,
724                 .offset         = GLOBAL_VAR(bAllowTrustedDomains),
725                 .special        = NULL,
726                 .enum_list      = NULL,
727                 .flags          = FLAG_ADVANCED,
728         },
729         {
730                 .label          = "map to guest",
731                 .type           = P_ENUM,
732                 .p_class        = P_GLOBAL,
733                 .offset         = GLOBAL_VAR(map_to_guest),
734                 .special        = NULL,
735                 .enum_list      = enum_map_to_guest,
736                 .flags          = FLAG_ADVANCED,
737         },
738         {
739                 .label          = "null passwords",
740                 .type           = P_BOOL,
741                 .p_class        = P_GLOBAL,
742                 .offset         = GLOBAL_VAR(bNullPasswords),
743                 .special        = NULL,
744                 .enum_list      = NULL,
745                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
746         },
747         {
748                 .label          = "obey pam restrictions",
749                 .type           = P_BOOL,
750                 .p_class        = P_GLOBAL,
751                 .offset         = GLOBAL_VAR(bObeyPamRestrictions),
752                 .special        = NULL,
753                 .enum_list      = NULL,
754                 .flags          = FLAG_ADVANCED,
755         },
756         {
757                 .label          = "password server",
758                 .type           = P_STRING,
759                 .p_class        = P_GLOBAL,
760                 .offset         = GLOBAL_VAR(szPasswordServer),
761                 .special        = NULL,
762                 .enum_list      = NULL,
763                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
764         },
765         {
766                 .label          = "smb passwd file",
767                 .type           = P_STRING,
768                 .p_class        = P_GLOBAL,
769                 .offset         = GLOBAL_VAR(szSMBPasswdFile),
770                 .special        = NULL,
771                 .enum_list      = NULL,
772                 .flags          = FLAG_ADVANCED,
773         },
774         {
775                 .label          = "private dir",
776                 .type           = P_STRING,
777                 .p_class        = P_GLOBAL,
778                 .offset         = GLOBAL_VAR(szPrivateDir),
779                 .special        = NULL,
780                 .enum_list      = NULL,
781                 .flags          = FLAG_ADVANCED,
782         },
783         {
784                 .label          = "passdb backend",
785                 .type           = P_STRING,
786                 .p_class        = P_GLOBAL,
787                 .offset         = GLOBAL_VAR(szPassdbBackend),
788                 .special        = NULL,
789                 .enum_list      = NULL,
790                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
791         },
792         {
793                 .label          = "algorithmic rid base",
794                 .type           = P_INTEGER,
795                 .p_class        = P_GLOBAL,
796                 .offset         = GLOBAL_VAR(AlgorithmicRidBase),
797                 .special        = NULL,
798                 .enum_list      = NULL,
799                 .flags          = FLAG_ADVANCED,
800         },
801         {
802                 .label          = "root directory",
803                 .type           = P_STRING,
804                 .p_class        = P_GLOBAL,
805                 .offset         = GLOBAL_VAR(szRootdir),
806                 .special        = NULL,
807                 .enum_list      = NULL,
808                 .flags          = FLAG_ADVANCED,
809         },
810         {
811                 .label          = "root dir",
812                 .type           = P_STRING,
813                 .p_class        = P_GLOBAL,
814                 .offset         = GLOBAL_VAR(szRootdir),
815                 .special        = NULL,
816                 .enum_list      = NULL,
817                 .flags          = FLAG_HIDE,
818         },
819         {
820                 .label          = "root",
821                 .type           = P_STRING,
822                 .p_class        = P_GLOBAL,
823                 .offset         = GLOBAL_VAR(szRootdir),
824                 .special        = NULL,
825                 .enum_list      = NULL,
826                 .flags          = FLAG_HIDE,
827         },
828         {
829                 .label          = "guest account",
830                 .type           = P_STRING,
831                 .p_class        = P_GLOBAL,
832                 .offset         = GLOBAL_VAR(szGuestaccount),
833                 .special        = NULL,
834                 .enum_list      = NULL,
835                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
836         },
837         {
838                 .label          = "enable privileges",
839                 .type           = P_BOOL,
840                 .p_class        = P_GLOBAL,
841                 .offset         = GLOBAL_VAR(bEnablePrivileges),
842                 .special        = NULL,
843                 .enum_list      = NULL,
844                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
845         },
846
847         {
848                 .label          = "pam password change",
849                 .type           = P_BOOL,
850                 .p_class        = P_GLOBAL,
851                 .offset         = GLOBAL_VAR(bPamPasswordChange),
852                 .special        = NULL,
853                 .enum_list      = NULL,
854                 .flags          = FLAG_ADVANCED,
855         },
856         {
857                 .label          = "passwd program",
858                 .type           = P_STRING,
859                 .p_class        = P_GLOBAL,
860                 .offset         = GLOBAL_VAR(szPasswdProgram),
861                 .special        = NULL,
862                 .enum_list      = NULL,
863                 .flags          = FLAG_ADVANCED,
864         },
865         {
866                 .label          = "passwd chat",
867                 .type           = P_STRING,
868                 .p_class        = P_GLOBAL,
869                 .offset         = GLOBAL_VAR(szPasswdChat),
870                 .special        = NULL,
871                 .enum_list      = NULL,
872                 .flags          = FLAG_ADVANCED,
873         },
874         {
875                 .label          = "passwd chat debug",
876                 .type           = P_BOOL,
877                 .p_class        = P_GLOBAL,
878                 .offset         = GLOBAL_VAR(bPasswdChatDebug),
879                 .special        = NULL,
880                 .enum_list      = NULL,
881                 .flags          = FLAG_ADVANCED,
882         },
883         {
884                 .label          = "passwd chat timeout",
885                 .type           = P_INTEGER,
886                 .p_class        = P_GLOBAL,
887                 .offset         = GLOBAL_VAR(iPasswdChatTimeout),
888                 .special        = NULL,
889                 .enum_list      = NULL,
890                 .flags          = FLAG_ADVANCED,
891         },
892         {
893                 .label          = "check password script",
894                 .type           = P_STRING,
895                 .p_class        = P_GLOBAL,
896                 .offset         = GLOBAL_VAR(szCheckPasswordScript),
897                 .special        = NULL,
898                 .enum_list      = NULL,
899                 .flags          = FLAG_ADVANCED,
900         },
901         {
902                 .label          = "username map",
903                 .type           = P_STRING,
904                 .p_class        = P_GLOBAL,
905                 .offset         = GLOBAL_VAR(szUsernameMap),
906                 .special        = NULL,
907                 .enum_list      = NULL,
908                 .flags          = FLAG_ADVANCED,
909         },
910         {
911                 .label          = "password level",
912                 .type           = P_INTEGER,
913                 .p_class        = P_GLOBAL,
914                 .offset         = GLOBAL_VAR(pwordlevel),
915                 .special        = NULL,
916                 .enum_list      = NULL,
917                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
918         },
919         {
920                 .label          = "username level",
921                 .type           = P_INTEGER,
922                 .p_class        = P_GLOBAL,
923                 .offset         = GLOBAL_VAR(unamelevel),
924                 .special        = NULL,
925                 .enum_list      = NULL,
926                 .flags          = FLAG_ADVANCED,
927         },
928         {
929                 .label          = "unix password sync",
930                 .type           = P_BOOL,
931                 .p_class        = P_GLOBAL,
932                 .offset         = GLOBAL_VAR(bUnixPasswdSync),
933                 .special        = NULL,
934                 .enum_list      = NULL,
935                 .flags          = FLAG_ADVANCED,
936         },
937         {
938                 .label          = "restrict anonymous",
939                 .type           = P_INTEGER,
940                 .p_class        = P_GLOBAL,
941                 .offset         = GLOBAL_VAR(restrict_anonymous),
942                 .special        = NULL,
943                 .enum_list      = NULL,
944                 .flags          = FLAG_ADVANCED,
945         },
946         {
947                 .label          = "lanman auth",
948                 .type           = P_BOOL,
949                 .p_class        = P_GLOBAL,
950                 .offset         = GLOBAL_VAR(bLanmanAuth),
951                 .special        = NULL,
952                 .enum_list      = NULL,
953                 .flags          = FLAG_ADVANCED,
954         },
955         {
956                 .label          = "ntlm auth",
957                 .type           = P_BOOL,
958                 .p_class        = P_GLOBAL,
959                 .offset         = GLOBAL_VAR(bNTLMAuth),
960                 .special        = NULL,
961                 .enum_list      = NULL,
962                 .flags          = FLAG_ADVANCED,
963         },
964         {
965                 .label          = "client NTLMv2 auth",
966                 .type           = P_BOOL,
967                 .p_class        = P_GLOBAL,
968                 .offset         = GLOBAL_VAR(bClientNTLMv2Auth),
969                 .special        = NULL,
970                 .enum_list      = NULL,
971                 .flags          = FLAG_ADVANCED,
972         },
973         {
974                 .label          = "client lanman auth",
975                 .type           = P_BOOL,
976                 .p_class        = P_GLOBAL,
977                 .offset         = GLOBAL_VAR(bClientLanManAuth),
978                 .special        = NULL,
979                 .enum_list      = NULL,
980                 .flags          = FLAG_ADVANCED,
981         },
982         {
983                 .label          = "client plaintext auth",
984                 .type           = P_BOOL,
985                 .p_class        = P_GLOBAL,
986                 .offset         = GLOBAL_VAR(bClientPlaintextAuth),
987                 .special        = NULL,
988                 .enum_list      = NULL,
989                 .flags          = FLAG_ADVANCED,
990         },
991         {
992                 .label          = "client use spnego principal",
993                 .type           = P_BOOL,
994                 .p_class        = P_GLOBAL,
995                 .offset         = GLOBAL_VAR(client_use_spnego_principal),
996                 .special        = NULL,
997                 .enum_list      = NULL,
998                 .flags          = FLAG_ADVANCED,
999         },
1000         {
1001                 .label          = "send spnego principal",
1002                 .type           = P_BOOL,
1003                 .p_class        = P_GLOBAL,
1004                 .offset         = GLOBAL_VAR(send_spnego_principal),
1005                 .special        = NULL,
1006                 .enum_list      = NULL,
1007                 .flags          = FLAG_ADVANCED,
1008         },
1009         {
1010                 .label          = "username",
1011                 .type           = P_STRING,
1012                 .p_class        = P_LOCAL,
1013                 .offset         = LOCAL_VAR(szUsername),
1014                 .special        = NULL,
1015                 .enum_list      = NULL,
1016                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE | FLAG_DEPRECATED,
1017         },
1018         {
1019                 .label          = "user",
1020                 .type           = P_STRING,
1021                 .p_class        = P_LOCAL,
1022                 .offset         = LOCAL_VAR(szUsername),
1023                 .special        = NULL,
1024                 .enum_list      = NULL,
1025                 .flags          = FLAG_HIDE,
1026         },
1027         {
1028                 .label          = "users",
1029                 .type           = P_STRING,
1030                 .p_class        = P_LOCAL,
1031                 .offset         = LOCAL_VAR(szUsername),
1032                 .special        = NULL,
1033                 .enum_list      = NULL,
1034                 .flags          = FLAG_HIDE,
1035         },
1036         {
1037                 .label          = "invalid users",
1038                 .type           = P_LIST,
1039                 .p_class        = P_LOCAL,
1040                 .offset         = LOCAL_VAR(szInvalidUsers),
1041                 .special        = NULL,
1042                 .enum_list      = NULL,
1043                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1044         },
1045         {
1046                 .label          = "valid users",
1047                 .type           = P_LIST,
1048                 .p_class        = P_LOCAL,
1049                 .offset         = LOCAL_VAR(szValidUsers),
1050                 .special        = NULL,
1051                 .enum_list      = NULL,
1052                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1053         },
1054         {
1055                 .label          = "admin users",
1056                 .type           = P_LIST,
1057                 .p_class        = P_LOCAL,
1058                 .offset         = LOCAL_VAR(szAdminUsers),
1059                 .special        = NULL,
1060                 .enum_list      = NULL,
1061                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1062         },
1063         {
1064                 .label          = "read list",
1065                 .type           = P_LIST,
1066                 .p_class        = P_LOCAL,
1067                 .offset         = LOCAL_VAR(readlist),
1068                 .special        = NULL,
1069                 .enum_list      = NULL,
1070                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1071         },
1072         {
1073                 .label          = "write list",
1074                 .type           = P_LIST,
1075                 .p_class        = P_LOCAL,
1076                 .offset         = LOCAL_VAR(writelist),
1077                 .special        = NULL,
1078                 .enum_list      = NULL,
1079                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1080         },
1081         {
1082                 .label          = "printer admin",
1083                 .type           = P_LIST,
1084                 .p_class        = P_LOCAL,
1085                 .offset         = LOCAL_VAR(printer_admin),
1086                 .special        = NULL,
1087                 .enum_list      = NULL,
1088                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_PRINT | FLAG_DEPRECATED,
1089         },
1090         {
1091                 .label          = "force user",
1092                 .type           = P_STRING,
1093                 .p_class        = P_LOCAL,
1094                 .offset         = LOCAL_VAR(force_user),
1095                 .special        = NULL,
1096                 .enum_list      = NULL,
1097                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1098         },
1099         {
1100                 .label          = "force group",
1101                 .type           = P_STRING,
1102                 .p_class        = P_LOCAL,
1103                 .offset         = LOCAL_VAR(force_group),
1104                 .special        = NULL,
1105                 .enum_list      = NULL,
1106                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1107         },
1108         {
1109                 .label          = "group",
1110                 .type           = P_STRING,
1111                 .p_class        = P_LOCAL,
1112                 .offset         = LOCAL_VAR(force_group),
1113                 .special        = NULL,
1114                 .enum_list      = NULL,
1115                 .flags          = FLAG_ADVANCED,
1116         },
1117         {
1118                 .label          = "read only",
1119                 .type           = P_BOOL,
1120                 .p_class        = P_LOCAL,
1121                 .offset         = LOCAL_VAR(bRead_only),
1122                 .special        = NULL,
1123                 .enum_list      = NULL,
1124                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE,
1125         },
1126         {
1127                 .label          = "write ok",
1128                 .type           = P_BOOLREV,
1129                 .p_class        = P_LOCAL,
1130                 .offset         = LOCAL_VAR(bRead_only),
1131                 .special        = NULL,
1132                 .enum_list      = NULL,
1133                 .flags          = FLAG_HIDE,
1134         },
1135         {
1136                 .label          = "writeable",
1137                 .type           = P_BOOLREV,
1138                 .p_class        = P_LOCAL,
1139                 .offset         = LOCAL_VAR(bRead_only),
1140                 .special        = NULL,
1141                 .enum_list      = NULL,
1142                 .flags          = FLAG_HIDE,
1143         },
1144         {
1145                 .label          = "writable",
1146                 .type           = P_BOOLREV,
1147                 .p_class        = P_LOCAL,
1148                 .offset         = LOCAL_VAR(bRead_only),
1149                 .special        = NULL,
1150                 .enum_list      = NULL,
1151                 .flags          = FLAG_HIDE,
1152         },
1153         {
1154                 .label          = "acl check permissions",
1155                 .type           = P_BOOL,
1156                 .p_class        = P_LOCAL,
1157                 .offset         = LOCAL_VAR(bAclCheckPermissions),
1158                 .special        = NULL,
1159                 .enum_list      = NULL,
1160                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1161         },
1162         {
1163                 .label          = "acl group control",
1164                 .type           = P_BOOL,
1165                 .p_class        = P_LOCAL,
1166                 .offset         = LOCAL_VAR(bAclGroupControl),
1167                 .special        = NULL,
1168                 .enum_list      = NULL,
1169                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1170         },
1171         {
1172                 .label          = "acl map full control",
1173                 .type           = P_BOOL,
1174                 .p_class        = P_LOCAL,
1175                 .offset         = LOCAL_VAR(bAclMapFullControl),
1176                 .special        = NULL,
1177                 .enum_list      = NULL,
1178                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1179         },
1180         {
1181                 .label          = "create mask",
1182                 .type           = P_OCTAL,
1183                 .p_class        = P_LOCAL,
1184                 .offset         = LOCAL_VAR(iCreate_mask),
1185                 .special        = NULL,
1186                 .enum_list      = NULL,
1187                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1188         },
1189         {
1190                 .label          = "create mode",
1191                 .type           = P_OCTAL,
1192                 .p_class        = P_LOCAL,
1193                 .offset         = LOCAL_VAR(iCreate_mask),
1194                 .special        = NULL,
1195                 .enum_list      = NULL,
1196                 .flags          = FLAG_HIDE,
1197         },
1198         {
1199                 .label          = "force create mode",
1200                 .type           = P_OCTAL,
1201                 .p_class        = P_LOCAL,
1202                 .offset         = LOCAL_VAR(iCreate_force_mode),
1203                 .special        = NULL,
1204                 .enum_list      = NULL,
1205                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1206         },
1207         {
1208                 .label          = "security mask",
1209                 .type           = P_OCTAL,
1210                 .p_class        = P_LOCAL,
1211                 .offset         = LOCAL_VAR(iSecurity_mask),
1212                 .special        = NULL,
1213                 .enum_list      = NULL,
1214                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1215         },
1216         {
1217                 .label          = "force security mode",
1218                 .type           = P_OCTAL,
1219                 .p_class        = P_LOCAL,
1220                 .offset         = LOCAL_VAR(iSecurity_force_mode),
1221                 .special        = NULL,
1222                 .enum_list      = NULL,
1223                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1224         },
1225         {
1226                 .label          = "directory mask",
1227                 .type           = P_OCTAL,
1228                 .p_class        = P_LOCAL,
1229                 .offset         = LOCAL_VAR(iDir_mask),
1230                 .special        = NULL,
1231                 .enum_list      = NULL,
1232                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1233         },
1234         {
1235                 .label          = "directory mode",
1236                 .type           = P_OCTAL,
1237                 .p_class        = P_LOCAL,
1238                 .offset         = LOCAL_VAR(iDir_mask),
1239                 .special        = NULL,
1240                 .enum_list      = NULL,
1241                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1242         },
1243         {
1244                 .label          = "force directory mode",
1245                 .type           = P_OCTAL,
1246                 .p_class        = P_LOCAL,
1247                 .offset         = LOCAL_VAR(iDir_force_mode),
1248                 .special        = NULL,
1249                 .enum_list      = NULL,
1250                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1251         },
1252         {
1253                 .label          = "directory security mask",
1254                 .type           = P_OCTAL,
1255                 .p_class        = P_LOCAL,
1256                 .offset         = LOCAL_VAR(iDir_Security_mask),
1257                 .special        = NULL,
1258                 .enum_list      = NULL,
1259                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1260         },
1261         {
1262                 .label          = "force directory security mode",
1263                 .type           = P_OCTAL,
1264                 .p_class        = P_LOCAL,
1265                 .offset         = LOCAL_VAR(iDir_Security_force_mode),
1266                 .special        = NULL,
1267                 .enum_list      = NULL,
1268                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1269         },
1270         {
1271                 .label          = "force unknown acl user",
1272                 .type           = P_BOOL,
1273                 .p_class        = P_LOCAL,
1274                 .offset         = LOCAL_VAR(bForceUnknownAclUser),
1275                 .special        = NULL,
1276                 .enum_list      = NULL,
1277                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1278         },
1279         {
1280                 .label          = "inherit permissions",
1281                 .type           = P_BOOL,
1282                 .p_class        = P_LOCAL,
1283                 .offset         = LOCAL_VAR(bInheritPerms),
1284                 .special        = NULL,
1285                 .enum_list      = NULL,
1286                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1287         },
1288         {
1289                 .label          = "inherit acls",
1290                 .type           = P_BOOL,
1291                 .p_class        = P_LOCAL,
1292                 .offset         = LOCAL_VAR(bInheritACLS),
1293                 .special        = NULL,
1294                 .enum_list      = NULL,
1295                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1296         },
1297         {
1298                 .label          = "inherit owner",
1299                 .type           = P_BOOL,
1300                 .p_class        = P_LOCAL,
1301                 .offset         = LOCAL_VAR(bInheritOwner),
1302                 .special        = NULL,
1303                 .enum_list      = NULL,
1304                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1305         },
1306         {
1307                 .label          = "guest only",
1308                 .type           = P_BOOL,
1309                 .p_class        = P_LOCAL,
1310                 .offset         = LOCAL_VAR(bGuest_only),
1311                 .special        = NULL,
1312                 .enum_list      = NULL,
1313                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1314         },
1315         {
1316                 .label          = "only guest",
1317                 .type           = P_BOOL,
1318                 .p_class        = P_LOCAL,
1319                 .offset         = LOCAL_VAR(bGuest_only),
1320                 .special        = NULL,
1321                 .enum_list      = NULL,
1322                 .flags          = FLAG_HIDE,
1323         },
1324         {
1325                 .label          = "administrative share",
1326                 .type           = P_BOOL,
1327                 .p_class        = P_LOCAL,
1328                 .offset         = LOCAL_VAR(bAdministrative_share),
1329                 .special        = NULL,
1330                 .enum_list      = NULL,
1331                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1332         },
1333
1334         {
1335                 .label          = "guest ok",
1336                 .type           = P_BOOL,
1337                 .p_class        = P_LOCAL,
1338                 .offset         = LOCAL_VAR(bGuest_ok),
1339                 .special        = NULL,
1340                 .enum_list      = NULL,
1341                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1342         },
1343         {
1344                 .label          = "public",
1345                 .type           = P_BOOL,
1346                 .p_class        = P_LOCAL,
1347                 .offset         = LOCAL_VAR(bGuest_ok),
1348                 .special        = NULL,
1349                 .enum_list      = NULL,
1350                 .flags          = FLAG_HIDE,
1351         },
1352         {
1353                 .label          = "only user",
1354                 .type           = P_BOOL,
1355                 .p_class        = P_LOCAL,
1356                 .offset         = LOCAL_VAR(bOnlyUser),
1357                 .special        = NULL,
1358                 .enum_list      = NULL,
1359                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_DEPRECATED,
1360         },
1361         {
1362                 .label          = "hosts allow",
1363                 .type           = P_LIST,
1364                 .p_class        = P_LOCAL,
1365                 .offset         = LOCAL_VAR(szHostsallow),
1366                 .special        = NULL,
1367                 .enum_list      = NULL,
1368                 .flags          = FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1369         },
1370         {
1371                 .label          = "allow hosts",
1372                 .type           = P_LIST,
1373                 .p_class        = P_LOCAL,
1374                 .offset         = LOCAL_VAR(szHostsallow),
1375                 .special        = NULL,
1376                 .enum_list      = NULL,
1377                 .flags          = FLAG_HIDE,
1378         },
1379         {
1380                 .label          = "hosts deny",
1381                 .type           = P_LIST,
1382                 .p_class        = P_LOCAL,
1383                 .offset         = LOCAL_VAR(szHostsdeny),
1384                 .special        = NULL,
1385                 .enum_list      = NULL,
1386                 .flags          = FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1387         },
1388         {
1389                 .label          = "deny hosts",
1390                 .type           = P_LIST,
1391                 .p_class        = P_LOCAL,
1392                 .offset         = LOCAL_VAR(szHostsdeny),
1393                 .special        = NULL,
1394                 .enum_list      = NULL,
1395                 .flags          = FLAG_HIDE,
1396         },
1397         {
1398                 .label          = "preload modules",
1399                 .type           = P_LIST,
1400                 .p_class        = P_GLOBAL,
1401                 .offset         = GLOBAL_VAR(szPreloadModules),
1402                 .special        = NULL,
1403                 .enum_list      = NULL,
1404                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1405         },
1406         {
1407                 .label          = "dedicated keytab file",
1408                 .type           = P_STRING,
1409                 .p_class        = P_GLOBAL,
1410                 .offset         = GLOBAL_VAR(szDedicatedKeytabFile),
1411                 .special        = NULL,
1412                 .enum_list      = NULL,
1413                 .flags          = FLAG_ADVANCED,
1414         },
1415         {
1416                 .label          = "kerberos method",
1417                 .type           = P_ENUM,
1418                 .p_class        = P_GLOBAL,
1419                 .offset         = GLOBAL_VAR(iKerberosMethod),
1420                 .special        = NULL,
1421                 .enum_list      = enum_kerberos_method,
1422                 .flags          = FLAG_ADVANCED,
1423         },
1424         {
1425                 .label          = "map untrusted to domain",
1426                 .type           = P_BOOL,
1427                 .p_class        = P_GLOBAL,
1428                 .offset         = GLOBAL_VAR(bMapUntrustedToDomain),
1429                 .special        = NULL,
1430                 .enum_list      = NULL,
1431                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1432         },
1433
1434
1435         {N_("Logging Options"), P_SEP, P_SEPARATOR},
1436
1437         {
1438                 .label          = "log level",
1439                 .type           = P_STRING,
1440                 .p_class        = P_GLOBAL,
1441                 .offset         = GLOBAL_VAR(szLogLevel),
1442                 .special        = handle_debug_list,
1443                 .enum_list      = NULL,
1444                 .flags          = FLAG_ADVANCED,
1445         },
1446         {
1447                 .label          = "debuglevel",
1448                 .type           = P_STRING,
1449                 .p_class        = P_GLOBAL,
1450                 .offset         = GLOBAL_VAR(szLogLevel),
1451                 .special        = handle_debug_list,
1452                 .enum_list      = NULL,
1453                 .flags          = FLAG_HIDE,
1454         },
1455         {
1456                 .label          = "syslog",
1457                 .type           = P_INTEGER,
1458                 .p_class        = P_GLOBAL,
1459                 .offset         = GLOBAL_VAR(syslog),
1460                 .special        = NULL,
1461                 .enum_list      = NULL,
1462                 .flags          = FLAG_ADVANCED,
1463         },
1464         {
1465                 .label          = "syslog only",
1466                 .type           = P_BOOL,
1467                 .p_class        = P_GLOBAL,
1468                 .offset         = GLOBAL_VAR(bSyslogOnly),
1469                 .special        = NULL,
1470                 .enum_list      = NULL,
1471                 .flags          = FLAG_ADVANCED,
1472         },
1473         {
1474                 .label          = "log file",
1475                 .type           = P_STRING,
1476                 .p_class        = P_GLOBAL,
1477                 .offset         = GLOBAL_VAR(szLogFile),
1478                 .special        = NULL,
1479                 .enum_list      = NULL,
1480                 .flags          = FLAG_ADVANCED,
1481         },
1482         {
1483                 .label          = "max log size",
1484                 .type           = P_INTEGER,
1485                 .p_class        = P_GLOBAL,
1486                 .offset         = GLOBAL_VAR(max_log_size),
1487                 .special        = NULL,
1488                 .enum_list      = NULL,
1489                 .flags          = FLAG_ADVANCED,
1490         },
1491         {
1492                 .label          = "debug timestamp",
1493                 .type           = P_BOOL,
1494                 .p_class        = P_GLOBAL,
1495                 .offset         = GLOBAL_VAR(bTimestampLogs),
1496                 .special        = NULL,
1497                 .enum_list      = NULL,
1498                 .flags          = FLAG_ADVANCED,
1499         },
1500         {
1501                 .label          = "timestamp logs",
1502                 .type           = P_BOOL,
1503                 .p_class        = P_GLOBAL,
1504                 .offset         = GLOBAL_VAR(bTimestampLogs),
1505                 .special        = NULL,
1506                 .enum_list      = NULL,
1507                 .flags          = FLAG_ADVANCED,
1508         },
1509         {
1510                 .label          = "debug prefix timestamp",
1511                 .type           = P_BOOL,
1512                 .p_class        = P_GLOBAL,
1513                 .offset         = GLOBAL_VAR(bDebugPrefixTimestamp),
1514                 .special        = NULL,
1515                 .enum_list      = NULL,
1516                 .flags          = FLAG_ADVANCED,
1517         },
1518         {
1519                 .label          = "debug hires timestamp",
1520                 .type           = P_BOOL,
1521                 .p_class        = P_GLOBAL,
1522                 .offset         = GLOBAL_VAR(bDebugHiresTimestamp),
1523                 .special        = NULL,
1524                 .enum_list      = NULL,
1525                 .flags          = FLAG_ADVANCED,
1526         },
1527         {
1528                 .label          = "debug pid",
1529                 .type           = P_BOOL,
1530                 .p_class        = P_GLOBAL,
1531                 .offset         = GLOBAL_VAR(bDebugPid),
1532                 .special        = NULL,
1533                 .enum_list      = NULL,
1534                 .flags          = FLAG_ADVANCED,
1535         },
1536         {
1537                 .label          = "debug uid",
1538                 .type           = P_BOOL,
1539                 .p_class        = P_GLOBAL,
1540                 .offset         = GLOBAL_VAR(bDebugUid),
1541                 .special        = NULL,
1542                 .enum_list      = NULL,
1543                 .flags          = FLAG_ADVANCED,
1544         },
1545         {
1546                 .label          = "debug class",
1547                 .type           = P_BOOL,
1548                 .p_class        = P_GLOBAL,
1549                 .offset         = GLOBAL_VAR(bDebugClass),
1550                 .special        = NULL,
1551                 .enum_list      = NULL,
1552                 .flags          = FLAG_ADVANCED,
1553         },
1554         {
1555                 .label          = "enable core files",
1556                 .type           = P_BOOL,
1557                 .p_class        = P_GLOBAL,
1558                 .offset         = GLOBAL_VAR(bEnableCoreFiles),
1559                 .special        = NULL,
1560                 .enum_list      = NULL,
1561                 .flags          = FLAG_ADVANCED,
1562         },
1563
1564         {N_("Protocol Options"), P_SEP, P_SEPARATOR},
1565
1566         {
1567                 .label          = "allocation roundup size",
1568                 .type           = P_INTEGER,
1569                 .p_class        = P_LOCAL,
1570                 .offset         = LOCAL_VAR(iallocation_roundup_size),
1571                 .special        = NULL,
1572                 .enum_list      = NULL,
1573                 .flags          = FLAG_ADVANCED,
1574         },
1575         {
1576                 .label          = "aio read size",
1577                 .type           = P_INTEGER,
1578                 .p_class        = P_LOCAL,
1579                 .offset         = LOCAL_VAR(iAioReadSize),
1580                 .special        = NULL,
1581                 .enum_list      = NULL,
1582                 .flags          = FLAG_ADVANCED,
1583         },
1584         {
1585                 .label          = "aio write size",
1586                 .type           = P_INTEGER,
1587                 .p_class        = P_LOCAL,
1588                 .offset         = LOCAL_VAR(iAioWriteSize),
1589                 .special        = NULL,
1590                 .enum_list      = NULL,
1591                 .flags          = FLAG_ADVANCED,
1592         },
1593         {
1594                 .label          = "aio write behind",
1595                 .type           = P_STRING,
1596                 .p_class        = P_LOCAL,
1597                 .offset         = LOCAL_VAR(szAioWriteBehind),
1598                 .special        = NULL,
1599                 .enum_list      = NULL,
1600                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1601         },
1602         {
1603                 .label          = "smb ports",
1604                 .type           = P_STRING,
1605                 .p_class        = P_GLOBAL,
1606                 .offset         = GLOBAL_VAR(smb_ports),
1607                 .special        = NULL,
1608                 .enum_list      = NULL,
1609                 .flags          = FLAG_ADVANCED,
1610         },
1611         {
1612                 .label          = "large readwrite",
1613                 .type           = P_BOOL,
1614                 .p_class        = P_GLOBAL,
1615                 .offset         = GLOBAL_VAR(bLargeReadwrite),
1616                 .special        = NULL,
1617                 .enum_list      = NULL,
1618                 .flags          = FLAG_ADVANCED,
1619         },
1620         {
1621                 .label          = "max protocol",
1622                 .type           = P_ENUM,
1623                 .p_class        = P_GLOBAL,
1624                 .offset         = GLOBAL_VAR(maxprotocol),
1625                 .special        = NULL,
1626                 .enum_list      = enum_protocol,
1627                 .flags          = FLAG_ADVANCED,
1628         },
1629         {
1630                 .label          = "protocol",
1631                 .type           = P_ENUM,
1632                 .p_class        = P_GLOBAL,
1633                 .offset         = GLOBAL_VAR(maxprotocol),
1634                 .special        = NULL,
1635                 .enum_list      = enum_protocol,
1636                 .flags          = FLAG_ADVANCED,
1637         },
1638         {
1639                 .label          = "min protocol",
1640                 .type           = P_ENUM,
1641                 .p_class        = P_GLOBAL,
1642                 .offset         = GLOBAL_VAR(minprotocol),
1643                 .special        = NULL,
1644                 .enum_list      = enum_protocol,
1645                 .flags          = FLAG_ADVANCED,
1646         },
1647         {
1648                 .label          = "min receivefile size",
1649                 .type           = P_INTEGER,
1650                 .p_class        = P_GLOBAL,
1651                 .offset         = GLOBAL_VAR(iminreceivefile),
1652                 .special        = NULL,
1653                 .enum_list      = NULL,
1654                 .flags          = FLAG_ADVANCED,
1655         },
1656         {
1657                 .label          = "read raw",
1658                 .type           = P_BOOL,
1659                 .p_class        = P_GLOBAL,
1660                 .offset         = GLOBAL_VAR(bReadRaw),
1661                 .special        = NULL,
1662                 .enum_list      = NULL,
1663                 .flags          = FLAG_ADVANCED,
1664         },
1665         {
1666                 .label          = "write raw",
1667                 .type           = P_BOOL,
1668                 .p_class        = P_GLOBAL,
1669                 .offset         = GLOBAL_VAR(bWriteRaw),
1670                 .special        = NULL,
1671                 .enum_list      = NULL,
1672                 .flags          = FLAG_ADVANCED,
1673         },
1674         {
1675                 .label          = "disable netbios",
1676                 .type           = P_BOOL,
1677                 .p_class        = P_GLOBAL,
1678                 .offset         = GLOBAL_VAR(bDisableNetbios),
1679                 .special        = NULL,
1680                 .enum_list      = NULL,
1681                 .flags          = FLAG_ADVANCED,
1682         },
1683         {
1684                 .label          = "reset on zero vc",
1685                 .type           = P_BOOL,
1686                 .p_class        = P_GLOBAL,
1687                 .offset         = GLOBAL_VAR(bResetOnZeroVC),
1688                 .special        = NULL,
1689                 .enum_list      = NULL,
1690                 .flags          = FLAG_ADVANCED,
1691         },
1692         {
1693                 .label          = "log writeable files on exit",
1694                 .type           = P_BOOL,
1695                 .p_class        = P_GLOBAL,
1696                 .offset         = GLOBAL_VAR(bLogWriteableFilesOnExit),
1697                 .special        = NULL,
1698                 .enum_list      = NULL,
1699                 .flags          = FLAG_ADVANCED,
1700         },
1701         {
1702                 .label          = "acl compatibility",
1703                 .type           = P_ENUM,
1704                 .p_class        = P_GLOBAL,
1705                 .offset         = GLOBAL_VAR(iAclCompat),
1706                 .special        = NULL,
1707                 .enum_list      = enum_acl_compat_vals,
1708                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1709         },
1710         {
1711                 .label          = "defer sharing violations",
1712                 .type           = P_BOOL,
1713                 .p_class        = P_GLOBAL,
1714                 .offset         = GLOBAL_VAR(bDeferSharingViolations),
1715                 .special        = NULL,
1716                 .enum_list      = NULL,
1717                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1718         },
1719         {
1720                 .label          = "ea support",
1721                 .type           = P_BOOL,
1722                 .p_class        = P_LOCAL,
1723                 .offset         = LOCAL_VAR(bEASupport),
1724                 .special        = NULL,
1725                 .enum_list      = NULL,
1726                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1727         },
1728         {
1729                 .label          = "nt acl support",
1730                 .type           = P_BOOL,
1731                 .p_class        = P_LOCAL,
1732                 .offset         = LOCAL_VAR(bNTAclSupport),
1733                 .special        = NULL,
1734                 .enum_list      = NULL,
1735                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1736         },
1737         {
1738                 .label          = "nt pipe support",
1739                 .type           = P_BOOL,
1740                 .p_class        = P_GLOBAL,
1741                 .offset         = GLOBAL_VAR(bNTPipeSupport),
1742                 .special        = NULL,
1743                 .enum_list      = NULL,
1744                 .flags          = FLAG_ADVANCED,
1745         },
1746         {
1747                 .label          = "nt status support",
1748                 .type           = P_BOOL,
1749                 .p_class        = P_GLOBAL,
1750                 .offset         = GLOBAL_VAR(bNTStatusSupport),
1751                 .special        = NULL,
1752                 .enum_list      = NULL,
1753                 .flags          = FLAG_ADVANCED,
1754         },
1755         {
1756                 .label          = "profile acls",
1757                 .type           = P_BOOL,
1758                 .p_class        = P_LOCAL,
1759                 .offset         = LOCAL_VAR(bProfileAcls),
1760                 .special        = NULL,
1761                 .enum_list      = NULL,
1762                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1763         },
1764         {
1765                 .label          = "map acl inherit",
1766                 .type           = P_BOOL,
1767                 .p_class        = P_LOCAL,
1768                 .offset         = LOCAL_VAR(bMap_acl_inherit),
1769                 .special        = NULL,
1770                 .enum_list      = NULL,
1771                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1772         },
1773         {
1774                 .label          = "afs share",
1775                 .type           = P_BOOL,
1776                 .p_class        = P_LOCAL,
1777                 .offset         = LOCAL_VAR(bAfs_Share),
1778                 .special        = NULL,
1779                 .enum_list      = NULL,
1780                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1781         },
1782         {
1783                 .label          = "max mux",
1784                 .type           = P_INTEGER,
1785                 .p_class        = P_GLOBAL,
1786                 .offset         = GLOBAL_VAR(max_mux),
1787                 .special        = NULL,
1788                 .enum_list      = NULL,
1789                 .flags          = FLAG_ADVANCED,
1790         },
1791         {
1792                 .label          = "max xmit",
1793                 .type           = P_INTEGER,
1794                 .p_class        = P_GLOBAL,
1795                 .offset         = GLOBAL_VAR(max_xmit),
1796                 .special        = NULL,
1797                 .enum_list      = NULL,
1798                 .flags          = FLAG_ADVANCED,
1799         },
1800         {
1801                 .label          = "name resolve order",
1802                 .type           = P_STRING,
1803                 .p_class        = P_GLOBAL,
1804                 .offset         = GLOBAL_VAR(szNameResolveOrder),
1805                 .special        = NULL,
1806                 .enum_list      = NULL,
1807                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
1808         },
1809         {
1810                 .label          = "max ttl",
1811                 .type           = P_INTEGER,
1812                 .p_class        = P_GLOBAL,
1813                 .offset         = GLOBAL_VAR(max_ttl),
1814                 .special        = NULL,
1815                 .enum_list      = NULL,
1816                 .flags          = FLAG_ADVANCED,
1817         },
1818         {
1819                 .label          = "max wins ttl",
1820                 .type           = P_INTEGER,
1821                 .p_class        = P_GLOBAL,
1822                 .offset         = GLOBAL_VAR(max_wins_ttl),
1823                 .special        = NULL,
1824                 .enum_list      = NULL,
1825                 .flags          = FLAG_ADVANCED,
1826         },
1827         {
1828                 .label          = "min wins ttl",
1829                 .type           = P_INTEGER,
1830                 .p_class        = P_GLOBAL,
1831                 .offset         = GLOBAL_VAR(min_wins_ttl),
1832                 .special        = NULL,
1833                 .enum_list      = NULL,
1834                 .flags          = FLAG_ADVANCED,
1835         },
1836         {
1837                 .label          = "time server",
1838                 .type           = P_BOOL,
1839                 .p_class        = P_GLOBAL,
1840                 .offset         = GLOBAL_VAR(bTimeServer),
1841                 .special        = NULL,
1842                 .enum_list      = NULL,
1843                 .flags          = FLAG_ADVANCED,
1844         },
1845         {
1846                 .label          = "unix extensions",
1847                 .type           = P_BOOL,
1848                 .p_class        = P_GLOBAL,
1849                 .offset         = GLOBAL_VAR(bUnixExtensions),
1850                 .special        = NULL,
1851                 .enum_list      = NULL,
1852                 .flags          = FLAG_ADVANCED,
1853         },
1854         {
1855                 .label          = "use spnego",
1856                 .type           = P_BOOL,
1857                 .p_class        = P_GLOBAL,
1858                 .offset         = GLOBAL_VAR(bUseSpnego),
1859                 .special        = NULL,
1860                 .enum_list      = NULL,
1861                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
1862         },
1863         {
1864                 .label          = "client signing",
1865                 .type           = P_ENUM,
1866                 .p_class        = P_GLOBAL,
1867                 .offset         = GLOBAL_VAR(client_signing),
1868                 .special        = NULL,
1869                 .enum_list      = enum_smb_signing_vals,
1870                 .flags          = FLAG_ADVANCED,
1871         },
1872         {
1873                 .label          = "server signing",
1874                 .type           = P_ENUM,
1875                 .p_class        = P_GLOBAL,
1876                 .offset         = GLOBAL_VAR(server_signing),
1877                 .special        = NULL,
1878                 .enum_list      = enum_smb_signing_vals,
1879                 .flags          = FLAG_ADVANCED,
1880         },
1881         {
1882                 .label          = "smb encrypt",
1883                 .type           = P_ENUM,
1884                 .p_class        = P_LOCAL,
1885                 .offset         = LOCAL_VAR(ismb_encrypt),
1886                 .special        = NULL,
1887                 .enum_list      = enum_smb_signing_vals,
1888                 .flags          = FLAG_ADVANCED,
1889         },
1890         {
1891                 .label          = "client use spnego",
1892                 .type           = P_BOOL,
1893                 .p_class        = P_GLOBAL,
1894                 .offset         = GLOBAL_VAR(bClientUseSpnego),
1895                 .special        = NULL,
1896                 .enum_list      = NULL,
1897                 .flags          = FLAG_ADVANCED,
1898         },
1899         {
1900                 .label          = "client ldap sasl wrapping",
1901                 .type           = P_ENUM,
1902                 .p_class        = P_GLOBAL,
1903                 .offset         = GLOBAL_VAR(client_ldap_sasl_wrapping),
1904                 .special        = NULL,
1905                 .enum_list      = enum_ldap_sasl_wrapping,
1906                 .flags          = FLAG_ADVANCED,
1907         },
1908         {
1909                 .label          = "enable asu support",
1910                 .type           = P_BOOL,
1911                 .p_class        = P_GLOBAL,
1912                 .offset         = GLOBAL_VAR(bASUSupport),
1913                 .special        = NULL,
1914                 .enum_list      = NULL,
1915                 .flags          = FLAG_ADVANCED,
1916         },
1917         {
1918                 .label          = "svcctl list",
1919                 .type           = P_LIST,
1920                 .p_class        = P_GLOBAL,
1921                 .offset         = GLOBAL_VAR(szServicesList),
1922                 .special        = NULL,
1923                 .enum_list      = NULL,
1924                 .flags          = FLAG_ADVANCED,
1925         },
1926
1927         {N_("Tuning Options"), P_SEP, P_SEPARATOR},
1928
1929         {
1930                 .label          = "block size",
1931                 .type           = P_INTEGER,
1932                 .p_class        = P_LOCAL,
1933                 .offset         = LOCAL_VAR(iBlock_size),
1934                 .special        = NULL,
1935                 .enum_list      = NULL,
1936                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1937         },
1938         {
1939                 .label          = "deadtime",
1940                 .type           = P_INTEGER,
1941                 .p_class        = P_GLOBAL,
1942                 .offset         = GLOBAL_VAR(deadtime),
1943                 .special        = NULL,
1944                 .enum_list      = NULL,
1945                 .flags          = FLAG_ADVANCED,
1946         },
1947         {
1948                 .label          = "getwd cache",
1949                 .type           = P_BOOL,
1950                 .p_class        = P_GLOBAL,
1951                 .offset         = GLOBAL_VAR(getwd_cache),
1952                 .special        = NULL,
1953                 .enum_list      = NULL,
1954                 .flags          = FLAG_ADVANCED,
1955         },
1956         {
1957                 .label          = "keepalive",
1958                 .type           = P_INTEGER,
1959                 .p_class        = P_GLOBAL,
1960                 .offset         = GLOBAL_VAR(iKeepalive),
1961                 .special        = NULL,
1962                 .enum_list      = NULL,
1963                 .flags          = FLAG_ADVANCED,
1964         },
1965         {
1966                 .label          = "change notify",
1967                 .type           = P_BOOL,
1968                 .p_class        = P_LOCAL,
1969                 .offset         = LOCAL_VAR(bChangeNotify),
1970                 .special        = NULL,
1971                 .enum_list      = NULL,
1972                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1973         },
1974         {
1975                 .label          = "directory name cache size",
1976                 .type           = P_INTEGER,
1977                 .p_class        = P_LOCAL,
1978                 .offset         = LOCAL_VAR(iDirectoryNameCacheSize),
1979                 .special        = NULL,
1980                 .enum_list      = NULL,
1981                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1982         },
1983         {
1984                 .label          = "kernel change notify",
1985                 .type           = P_BOOL,
1986                 .p_class        = P_LOCAL,
1987                 .offset         = LOCAL_VAR(bKernelChangeNotify),
1988                 .special        = NULL,
1989                 .enum_list      = NULL,
1990                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1991         },
1992         {
1993                 .label          = "lpq cache time",
1994                 .type           = P_INTEGER,
1995                 .p_class        = P_GLOBAL,
1996                 .offset         = GLOBAL_VAR(lpqcachetime),
1997                 .special        = NULL,
1998                 .enum_list      = NULL,
1999                 .flags          = FLAG_ADVANCED,
2000         },
2001         {
2002                 .label          = "max smbd processes",
2003                 .type           = P_INTEGER,
2004                 .p_class        = P_GLOBAL,
2005                 .offset         = GLOBAL_VAR(iMaxSmbdProcesses),
2006                 .special        = NULL,
2007                 .enum_list      = NULL,
2008                 .flags          = FLAG_ADVANCED,
2009         },
2010         {
2011                 .label          = "max connections",
2012                 .type           = P_INTEGER,
2013                 .p_class        = P_LOCAL,
2014                 .offset         = LOCAL_VAR(iMaxConnections),
2015                 .special        = NULL,
2016                 .enum_list      = NULL,
2017                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2018         },
2019         {
2020                 .label          = "paranoid server security",
2021                 .type           = P_BOOL,
2022                 .p_class        = P_GLOBAL,
2023                 .offset         = GLOBAL_VAR(paranoid_server_security),
2024                 .special        = NULL,
2025                 .enum_list      = NULL,
2026                 .flags          = FLAG_ADVANCED,
2027         },
2028         {
2029                 .label          = "max disk size",
2030                 .type           = P_INTEGER,
2031                 .p_class        = P_GLOBAL,
2032                 .offset         = GLOBAL_VAR(maxdisksize),
2033                 .special        = NULL,
2034                 .enum_list      = NULL,
2035                 .flags          = FLAG_ADVANCED,
2036         },
2037         {
2038                 .label          = "max open files",
2039                 .type           = P_INTEGER,
2040                 .p_class        = P_GLOBAL,
2041                 .offset         = GLOBAL_VAR(max_open_files),
2042                 .special        = NULL,
2043                 .enum_list      = NULL,
2044                 .flags          = FLAG_ADVANCED,
2045         },
2046         {
2047                 .label          = "min print space",
2048                 .type           = P_INTEGER,
2049                 .p_class        = P_LOCAL,
2050                 .offset         = LOCAL_VAR(iMinPrintSpace),
2051                 .special        = NULL,
2052                 .enum_list      = NULL,
2053                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2054         },
2055         {
2056                 .label          = "socket options",
2057                 .type           = P_STRING,
2058                 .p_class        = P_GLOBAL,
2059                 .offset         = GLOBAL_VAR(szSocketOptions),
2060                 .special        = NULL,
2061                 .enum_list      = NULL,
2062                 .flags          = FLAG_ADVANCED,
2063         },
2064         {
2065                 .label          = "strict allocate",
2066                 .type           = P_BOOL,
2067                 .p_class        = P_LOCAL,
2068                 .offset         = LOCAL_VAR(bStrictAllocate),
2069                 .special        = NULL,
2070                 .enum_list      = NULL,
2071                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2072         },
2073         {
2074                 .label          = "strict sync",
2075                 .type           = P_BOOL,
2076                 .p_class        = P_LOCAL,
2077                 .offset         = LOCAL_VAR(bStrictSync),
2078                 .special        = NULL,
2079                 .enum_list      = NULL,
2080                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2081         },
2082         {
2083                 .label          = "sync always",
2084                 .type           = P_BOOL,
2085                 .p_class        = P_LOCAL,
2086                 .offset         = LOCAL_VAR(bSyncAlways),
2087                 .special        = NULL,
2088                 .enum_list      = NULL,
2089                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2090         },
2091         {
2092                 .label          = "use mmap",
2093                 .type           = P_BOOL,
2094                 .p_class        = P_GLOBAL,
2095                 .offset         = GLOBAL_VAR(bUseMmap),
2096                 .special        = NULL,
2097                 .enum_list      = NULL,
2098                 .flags          = FLAG_ADVANCED,
2099         },
2100         {
2101                 .label          = "use sendfile",
2102                 .type           = P_BOOL,
2103                 .p_class        = P_LOCAL,
2104                 .offset         = LOCAL_VAR(bUseSendfile),
2105                 .special        = NULL,
2106                 .enum_list      = NULL,
2107                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2108         },
2109         {
2110                 .label          = "hostname lookups",
2111                 .type           = P_BOOL,
2112                 .p_class        = P_GLOBAL,
2113                 .offset         = GLOBAL_VAR(bHostnameLookups),
2114                 .special        = NULL,
2115                 .enum_list      = NULL,
2116                 .flags          = FLAG_ADVANCED,
2117         },
2118         {
2119                 .label          = "write cache size",
2120                 .type           = P_INTEGER,
2121                 .p_class        = P_LOCAL,
2122                 .offset         = LOCAL_VAR(iWriteCacheSize),
2123                 .special        = NULL,
2124                 .enum_list      = NULL,
2125                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2126         },
2127         {
2128                 .label          = "name cache timeout",
2129                 .type           = P_INTEGER,
2130                 .p_class        = P_GLOBAL,
2131                 .offset         = GLOBAL_VAR(name_cache_timeout),
2132                 .special        = NULL,
2133                 .enum_list      = NULL,
2134                 .flags          = FLAG_ADVANCED,
2135         },
2136         {
2137                 .label          = "ctdbd socket",
2138                 .type           = P_STRING,
2139                 .p_class        = P_GLOBAL,
2140                 .offset         = GLOBAL_VAR(ctdbdSocket),
2141                 .special        = NULL,
2142                 .enum_list      = NULL,
2143                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2144         },
2145         {
2146                 .label          = "cluster addresses",
2147                 .type           = P_LIST,
2148                 .p_class        = P_GLOBAL,
2149                 .offset         = GLOBAL_VAR(szClusterAddresses),
2150                 .special        = NULL,
2151                 .enum_list      = NULL,
2152                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2153         },
2154         {
2155                 .label          = "clustering",
2156                 .type           = P_BOOL,
2157                 .p_class        = P_GLOBAL,
2158                 .offset         = GLOBAL_VAR(clustering),
2159                 .special        = NULL,
2160                 .enum_list      = NULL,
2161                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2162         },
2163         {
2164                 .label          = "ctdb timeout",
2165                 .type           = P_INTEGER,
2166                 .p_class        = P_GLOBAL,
2167                 .offset         = GLOBAL_VAR(ctdb_timeout),
2168                 .special        = NULL,
2169                 .enum_list      = NULL,
2170                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2171         },
2172         {
2173                 .label          = "ctdb locktime warn threshold",
2174                 .type           = P_INTEGER,
2175                 .p_class        = P_GLOBAL,
2176                 .offset         = GLOBAL_VAR(ctdb_locktime_warn_threshold),
2177                 .special        = NULL,
2178                 .enum_list      = NULL,
2179                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2180         },
2181         {
2182                 .label          = "smb2 max read",
2183                 .type           = P_INTEGER,
2184                 .p_class        = P_GLOBAL,
2185                 .offset         = GLOBAL_VAR(ismb2_max_read),
2186                 .special        = NULL,
2187                 .enum_list      = NULL,
2188                 .flags          = FLAG_ADVANCED,
2189         },
2190         {
2191                 .label          = "smb2 max write",
2192                 .type           = P_INTEGER,
2193                 .p_class        = P_GLOBAL,
2194                 .offset         = GLOBAL_VAR(ismb2_max_write),
2195                 .special        = NULL,
2196                 .enum_list      = NULL,
2197                 .flags          = FLAG_ADVANCED,
2198         },
2199         {
2200                 .label          = "smb2 max trans",
2201                 .type           = P_INTEGER,
2202                 .p_class        = P_GLOBAL,
2203                 .offset         = GLOBAL_VAR(ismb2_max_trans),
2204                 .special        = NULL,
2205                 .enum_list      = NULL,
2206                 .flags          = FLAG_ADVANCED,
2207         },
2208         {
2209                 .label          = "smb2 max credits",
2210                 .type           = P_INTEGER,
2211                 .p_class        = P_GLOBAL,
2212                 .offset         = GLOBAL_VAR(ismb2_max_credits),
2213                 .special        = NULL,
2214                 .enum_list      = NULL,
2215                 .flags          = FLAG_ADVANCED,
2216         },
2217
2218         {N_("Printing Options"), P_SEP, P_SEPARATOR},
2219
2220         {
2221                 .label          = "max reported print jobs",
2222                 .type           = P_INTEGER,
2223                 .p_class        = P_LOCAL,
2224                 .offset         = LOCAL_VAR(iMaxReportedPrintJobs),
2225                 .special        = NULL,
2226                 .enum_list      = NULL,
2227                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2228         },
2229         {
2230                 .label          = "max print jobs",
2231                 .type           = P_INTEGER,
2232                 .p_class        = P_LOCAL,
2233                 .offset         = LOCAL_VAR(iMaxPrintJobs),
2234                 .special        = NULL,
2235                 .enum_list      = NULL,
2236                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2237         },
2238         {
2239                 .label          = "load printers",
2240                 .type           = P_BOOL,
2241                 .p_class        = P_GLOBAL,
2242                 .offset         = GLOBAL_VAR(bLoadPrinters),
2243                 .special        = NULL,
2244                 .enum_list      = NULL,
2245                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2246         },
2247         {
2248                 .label          = "printcap cache time",
2249                 .type           = P_INTEGER,
2250                 .p_class        = P_GLOBAL,
2251                 .offset         = GLOBAL_VAR(PrintcapCacheTime),
2252                 .special        = NULL,
2253                 .enum_list      = NULL,
2254                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2255         },
2256         {
2257                 .label          = "printcap name",
2258                 .type           = P_STRING,
2259                 .p_class        = P_GLOBAL,
2260                 .offset         = GLOBAL_VAR(szPrintcapname),
2261                 .special        = NULL,
2262                 .enum_list      = NULL,
2263                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2264         },
2265         {
2266                 .label          = "printcap",
2267                 .type           = P_STRING,
2268                 .p_class        = P_GLOBAL,
2269                 .offset         = GLOBAL_VAR(szPrintcapname),
2270                 .special        = NULL,
2271                 .enum_list      = NULL,
2272                 .flags          = FLAG_HIDE,
2273         },
2274         {
2275                 .label          = "printable",
2276                 .type           = P_BOOL,
2277                 .p_class        = P_LOCAL,
2278                 .offset         = LOCAL_VAR(bPrint_ok),
2279                 .special        = NULL,
2280                 .enum_list      = NULL,
2281                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2282         },
2283         {
2284                 .label          = "print notify backchannel",
2285                 .type           = P_BOOL,
2286                 .p_class        = P_LOCAL,
2287                 .offset         = LOCAL_VAR(bPrintNotifyBackchannel),
2288                 .special        = NULL,
2289                 .enum_list      = NULL,
2290                 .flags          = FLAG_ADVANCED,
2291         },
2292         {
2293                 .label          = "print ok",
2294                 .type           = P_BOOL,
2295                 .p_class        = P_LOCAL,
2296                 .offset         = LOCAL_VAR(bPrint_ok),
2297                 .special        = NULL,
2298                 .enum_list      = NULL,
2299                 .flags          = FLAG_HIDE,
2300         },
2301         {
2302                 .label          = "printing",
2303                 .type           = P_ENUM,
2304                 .p_class        = P_LOCAL,
2305                 .offset         = LOCAL_VAR(iPrinting),
2306                 .special        = handle_printing,
2307                 .enum_list      = enum_printing,
2308                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2309         },
2310         {
2311                 .label          = "cups options",
2312                 .type           = P_STRING,
2313                 .p_class        = P_LOCAL,
2314                 .offset         = LOCAL_VAR(szCupsOptions),
2315                 .special        = NULL,
2316                 .enum_list      = NULL,
2317                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2318         },
2319         {
2320                 .label          = "cups server",
2321                 .type           = P_STRING,
2322                 .p_class        = P_GLOBAL,
2323                 .offset         = GLOBAL_VAR(szCupsServer),
2324                 .special        = NULL,
2325                 .enum_list      = NULL,
2326                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2327         },
2328         {
2329                 .label          = "cups encrypt",
2330                 .type           = P_ENUM,
2331                 .p_class        = P_GLOBAL,
2332                 .offset            = GLOBAL_VAR(CupsEncrypt),
2333                 .special        = NULL,
2334                 .enum_list      = enum_bool_auto,
2335                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2336         },
2337         {
2338
2339                 .label          = "cups connection timeout",
2340                 .type           = P_INTEGER,
2341                 .p_class        = P_GLOBAL,
2342                 .offset         = GLOBAL_VAR(cups_connection_timeout),
2343                 .special        = NULL,
2344                 .enum_list      = NULL,
2345                 .flags          = FLAG_ADVANCED,
2346         },
2347         {
2348                 .label          = "iprint server",
2349                 .type           = P_STRING,
2350                 .p_class        = P_GLOBAL,
2351                 .offset         = GLOBAL_VAR(szIPrintServer),
2352                 .special        = NULL,
2353                 .enum_list      = NULL,
2354                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2355         },
2356         {
2357                 .label          = "print command",
2358                 .type           = P_STRING,
2359                 .p_class        = P_LOCAL,
2360                 .offset         = LOCAL_VAR(szPrintcommand),
2361                 .special        = NULL,
2362                 .enum_list      = NULL,
2363                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2364         },
2365         {
2366                 .label          = "disable spoolss",
2367                 .type           = P_BOOL,
2368                 .p_class        = P_GLOBAL,
2369                 .offset         = GLOBAL_VAR(bDisableSpoolss),
2370                 .special        = NULL,
2371                 .enum_list      = NULL,
2372                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2373         },
2374         {
2375                 .label          = "enable spoolss",
2376                 .type           = P_BOOLREV,
2377                 .p_class        = P_GLOBAL,
2378                 .offset         = GLOBAL_VAR(bDisableSpoolss),
2379                 .special        = NULL,
2380                 .enum_list      = NULL,
2381                 .flags          = FLAG_HIDE,
2382         },
2383         {
2384                 .label          = "lpq command",
2385                 .type           = P_STRING,
2386                 .p_class        = P_LOCAL,
2387                 .offset         = LOCAL_VAR(szLpqcommand),
2388                 .special        = NULL,
2389                 .enum_list      = NULL,
2390                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2391         },
2392         {
2393                 .label          = "lprm command",
2394                 .type           = P_STRING,
2395                 .p_class        = P_LOCAL,
2396                 .offset         = LOCAL_VAR(szLprmcommand),
2397                 .special        = NULL,
2398                 .enum_list      = NULL,
2399                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2400         },
2401         {
2402                 .label          = "lppause command",
2403                 .type           = P_STRING,
2404                 .p_class        = P_LOCAL,
2405                 .offset         = LOCAL_VAR(szLppausecommand),
2406                 .special        = NULL,
2407                 .enum_list      = NULL,
2408                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2409         },
2410         {
2411                 .label          = "lpresume command",
2412                 .type           = P_STRING,
2413                 .p_class        = P_LOCAL,
2414                 .offset         = LOCAL_VAR(szLpresumecommand),
2415                 .special        = NULL,
2416                 .enum_list      = NULL,
2417                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2418         },
2419         {
2420                 .label          = "queuepause command",
2421                 .type           = P_STRING,
2422                 .p_class        = P_LOCAL,
2423                 .offset         = LOCAL_VAR(szQueuepausecommand),
2424                 .special        = NULL,
2425                 .enum_list      = NULL,
2426                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2427         },
2428         {
2429                 .label          = "queueresume command",
2430                 .type           = P_STRING,
2431                 .p_class        = P_LOCAL,
2432                 .offset         = LOCAL_VAR(szQueueresumecommand),
2433                 .special        = NULL,
2434                 .enum_list      = NULL,
2435                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2436         },
2437         {
2438                 .label          = "addport command",
2439                 .type           = P_STRING,
2440                 .p_class        = P_GLOBAL,
2441                 .offset         = GLOBAL_VAR(szAddPortCommand),
2442                 .special        = NULL,
2443                 .enum_list      = NULL,
2444                 .flags          = FLAG_ADVANCED,
2445         },
2446         {
2447                 .label          = "enumports command",
2448                 .type           = P_STRING,
2449                 .p_class        = P_GLOBAL,
2450                 .offset         = GLOBAL_VAR(szEnumPortsCommand),
2451                 .special        = NULL,
2452                 .enum_list      = NULL,
2453                 .flags          = FLAG_ADVANCED,
2454         },
2455         {
2456                 .label          = "addprinter command",
2457                 .type           = P_STRING,
2458                 .p_class        = P_GLOBAL,
2459                 .offset         = GLOBAL_VAR(szAddPrinterCommand),
2460                 .special        = NULL,
2461                 .enum_list      = NULL,
2462                 .flags          = FLAG_ADVANCED,
2463         },
2464         {
2465                 .label          = "deleteprinter command",
2466                 .type           = P_STRING,
2467                 .p_class        = P_GLOBAL,
2468                 .offset         = GLOBAL_VAR(szDeletePrinterCommand),
2469                 .special        = NULL,
2470                 .enum_list      = NULL,
2471                 .flags          = FLAG_ADVANCED,
2472         },
2473         {
2474                 .label          = "show add printer wizard",
2475                 .type           = P_BOOL,
2476                 .p_class        = P_GLOBAL,
2477                 .offset         = GLOBAL_VAR(bMsAddPrinterWizard),
2478                 .special        = NULL,
2479                 .enum_list      = NULL,
2480                 .flags          = FLAG_ADVANCED,
2481         },
2482         {
2483                 .label          = "os2 driver map",
2484                 .type           = P_STRING,
2485                 .p_class        = P_GLOBAL,
2486                 .offset         = GLOBAL_VAR(szOs2DriverMap),
2487                 .special        = NULL,
2488                 .enum_list      = NULL,
2489                 .flags          = FLAG_ADVANCED,
2490         },
2491
2492         {
2493                 .label          = "printer name",
2494                 .type           = P_STRING,
2495                 .p_class        = P_LOCAL,
2496                 .offset         = LOCAL_VAR(szPrintername),
2497                 .special        = NULL,
2498                 .enum_list      = NULL,
2499                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2500         },
2501         {
2502                 .label          = "printer",
2503                 .type           = P_STRING,
2504                 .p_class        = P_LOCAL,
2505                 .offset         = LOCAL_VAR(szPrintername),
2506                 .special        = NULL,
2507                 .enum_list      = NULL,
2508                 .flags          = FLAG_HIDE,
2509         },
2510         {
2511                 .label          = "use client driver",
2512                 .type           = P_BOOL,
2513                 .p_class        = P_LOCAL,
2514                 .offset         = LOCAL_VAR(bUseClientDriver),
2515                 .special        = NULL,
2516                 .enum_list      = NULL,
2517                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2518         },
2519         {
2520                 .label          = "default devmode",
2521                 .type           = P_BOOL,
2522                 .p_class        = P_LOCAL,
2523                 .offset         = LOCAL_VAR(bDefaultDevmode),
2524                 .special        = NULL,
2525                 .enum_list      = NULL,
2526                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2527         },
2528         {
2529                 .label          = "force printername",
2530                 .type           = P_BOOL,
2531                 .p_class        = P_LOCAL,
2532                 .offset         = LOCAL_VAR(bForcePrintername),
2533                 .special        = NULL,
2534                 .enum_list      = NULL,
2535                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2536         },
2537         {
2538                 .label          = "printjob username",
2539                 .type           = P_STRING,
2540                 .p_class        = P_LOCAL,
2541                 .offset         = LOCAL_VAR(szPrintjobUsername),
2542                 .special        = NULL,
2543                 .enum_list      = NULL,
2544                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2545         },
2546
2547         {N_("Filename Handling"), P_SEP, P_SEPARATOR},
2548
2549         {
2550                 .label          = "mangling method",
2551                 .type           = P_STRING,
2552                 .p_class        = P_GLOBAL,
2553                 .offset         = GLOBAL_VAR(szManglingMethod),
2554                 .special        = NULL,
2555                 .enum_list      = NULL,
2556                 .flags          = FLAG_ADVANCED,
2557         },
2558         {
2559                 .label          = "mangle prefix",
2560                 .type           = P_INTEGER,
2561                 .p_class        = P_GLOBAL,
2562                 .offset         = GLOBAL_VAR(mangle_prefix),
2563                 .special        = NULL,
2564                 .enum_list      = NULL,
2565                 .flags          = FLAG_ADVANCED,
2566         },
2567
2568         {
2569                 .label          = "default case",
2570                 .type           = P_ENUM,
2571                 .p_class        = P_LOCAL,
2572                 .offset         = LOCAL_VAR(iDefaultCase),
2573                 .special        = NULL,
2574                 .enum_list      = enum_case,
2575                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2576         },
2577         {
2578                 .label          = "case sensitive",
2579                 .type           = P_ENUM,
2580                 .p_class        = P_LOCAL,
2581                 .offset         = LOCAL_VAR(iCaseSensitive),
2582                 .special        = NULL,
2583                 .enum_list      = enum_bool_auto,
2584                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2585         },
2586         {
2587                 .label          = "casesignames",
2588                 .type           = P_ENUM,
2589                 .p_class        = P_LOCAL,
2590                 .offset         = LOCAL_VAR(iCaseSensitive),
2591                 .special        = NULL,
2592                 .enum_list      = enum_bool_auto,
2593                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_HIDE,
2594         },
2595         {
2596                 .label          = "preserve case",
2597                 .type           = P_BOOL,
2598                 .p_class        = P_LOCAL,
2599                 .offset         = LOCAL_VAR(bCasePreserve),
2600                 .special        = NULL,
2601                 .enum_list      = NULL,
2602                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2603         },
2604         {
2605                 .label          = "short preserve case",
2606                 .type           = P_BOOL,
2607                 .p_class        = P_LOCAL,
2608                 .offset         = LOCAL_VAR(bShortCasePreserve),
2609                 .special        = NULL,
2610                 .enum_list      = NULL,
2611                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2612         },
2613         {
2614                 .label          = "mangling char",
2615                 .type           = P_CHAR,
2616                 .p_class        = P_LOCAL,
2617                 .offset         = LOCAL_VAR(magic_char),
2618                 .special        = NULL,
2619                 .enum_list      = NULL,
2620                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2621         },
2622         {
2623                 .label          = "hide dot files",
2624                 .type           = P_BOOL,
2625                 .p_class        = P_LOCAL,
2626                 .offset         = LOCAL_VAR(bHideDotFiles),
2627                 .special        = NULL,
2628                 .enum_list      = NULL,
2629                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2630         },
2631         {
2632                 .label          = "hide special files",
2633                 .type           = P_BOOL,
2634                 .p_class        = P_LOCAL,
2635                 .offset         = LOCAL_VAR(bHideSpecialFiles),
2636                 .special        = NULL,
2637                 .enum_list      = NULL,
2638                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2639         },
2640         {
2641                 .label          = "hide unreadable",
2642                 .type           = P_BOOL,
2643                 .p_class        = P_LOCAL,
2644                 .offset         = LOCAL_VAR(bHideUnReadable),
2645                 .special        = NULL,
2646                 .enum_list      = NULL,
2647                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2648         },
2649         {
2650                 .label          = "hide unwriteable files",
2651                 .type           = P_BOOL,
2652                 .p_class        = P_LOCAL,
2653                 .offset         = LOCAL_VAR(bHideUnWriteableFiles),
2654                 .special        = NULL,
2655                 .enum_list      = NULL,
2656                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2657         },
2658         {
2659                 .label          = "delete veto files",
2660                 .type           = P_BOOL,
2661                 .p_class        = P_LOCAL,
2662                 .offset         = LOCAL_VAR(bDeleteVetoFiles),
2663                 .special        = NULL,
2664                 .enum_list      = NULL,
2665                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2666         },
2667         {
2668                 .label          = "veto files",
2669                 .type           = P_STRING,
2670                 .p_class        = P_LOCAL,
2671                 .offset         = LOCAL_VAR(szVetoFiles),
2672                 .special        = NULL,
2673                 .enum_list      = NULL,
2674                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2675         },
2676         {
2677                 .label          = "hide files",
2678                 .type           = P_STRING,
2679                 .p_class        = P_LOCAL,
2680                 .offset         = LOCAL_VAR(szHideFiles),
2681                 .special        = NULL,
2682                 .enum_list      = NULL,
2683                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2684         },
2685         {
2686                 .label          = "veto oplock files",
2687                 .type           = P_STRING,
2688                 .p_class        = P_LOCAL,
2689                 .offset         = LOCAL_VAR(szVetoOplockFiles),
2690                 .special        = NULL,
2691                 .enum_list      = NULL,
2692                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2693         },
2694         {
2695                 .label          = "map archive",
2696                 .type           = P_BOOL,
2697                 .p_class        = P_LOCAL,
2698                 .offset         = LOCAL_VAR(bMap_archive),
2699                 .special        = NULL,
2700                 .enum_list      = NULL,
2701                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2702         },
2703         {
2704                 .label          = "map hidden",
2705                 .type           = P_BOOL,
2706                 .p_class        = P_LOCAL,
2707                 .offset         = LOCAL_VAR(bMap_hidden),
2708                 .special        = NULL,
2709                 .enum_list      = NULL,
2710                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2711         },
2712         {
2713                 .label          = "map system",
2714                 .type           = P_BOOL,
2715                 .p_class        = P_LOCAL,
2716                 .offset         = LOCAL_VAR(bMap_system),
2717                 .special        = NULL,
2718                 .enum_list      = NULL,
2719                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2720         },
2721         {
2722                 .label          = "map readonly",
2723                 .type           = P_ENUM,
2724                 .p_class        = P_LOCAL,
2725                 .offset         = LOCAL_VAR(iMap_readonly),
2726                 .special        = NULL,
2727                 .enum_list      = enum_map_readonly,
2728                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2729         },
2730         {
2731                 .label          = "mangled names",
2732                 .type           = P_BOOL,
2733                 .p_class        = P_LOCAL,
2734                 .offset         = LOCAL_VAR(bMangledNames),
2735                 .special        = NULL,
2736                 .enum_list      = NULL,
2737                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2738         },
2739         {
2740                 .label          = "max stat cache size",
2741                 .type           = P_INTEGER,
2742                 .p_class        = P_GLOBAL,
2743                 .offset         = GLOBAL_VAR(iMaxStatCacheSize),
2744                 .special        = NULL,
2745                 .enum_list      = NULL,
2746                 .flags          = FLAG_ADVANCED,
2747         },
2748         {
2749                 .label          = "stat cache",
2750                 .type           = P_BOOL,
2751                 .p_class        = P_GLOBAL,
2752                 .offset         = GLOBAL_VAR(bStatCache),
2753                 .special        = NULL,
2754                 .enum_list      = NULL,
2755                 .flags          = FLAG_ADVANCED,
2756         },
2757         {
2758                 .label          = "store dos attributes",
2759                 .type           = P_BOOL,
2760                 .p_class        = P_LOCAL,
2761                 .offset         = LOCAL_VAR(bStoreDosAttributes),
2762                 .special        = NULL,
2763                 .enum_list      = NULL,
2764                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2765         },
2766         {
2767                 .label          = "dmapi support",
2768                 .type           = P_BOOL,
2769                 .p_class        = P_LOCAL,
2770                 .offset         = LOCAL_VAR(bDmapiSupport),
2771                 .special        = NULL,
2772                 .enum_list      = NULL,
2773                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2774         },
2775
2776
2777         {N_("Domain Options"), P_SEP, P_SEPARATOR},
2778
2779         {
2780                 .label          = "machine password timeout",
2781                 .type           = P_INTEGER,
2782                 .p_class        = P_GLOBAL,
2783                 .offset         = GLOBAL_VAR(machine_password_timeout),
2784                 .special        = NULL,
2785                 .enum_list      = NULL,
2786                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
2787         },
2788
2789         {N_("Logon Options"), P_SEP, P_SEPARATOR},
2790
2791         {
2792                 .label          = "add user script",
2793                 .type           = P_STRING,
2794                 .p_class        = P_GLOBAL,
2795                 .offset         = GLOBAL_VAR(szAddUserScript),
2796                 .special        = NULL,
2797                 .enum_list      = NULL,
2798                 .flags          = FLAG_ADVANCED,
2799         },
2800         {
2801                 .label          = "rename user script",
2802                 .type           = P_STRING,
2803                 .p_class        = P_GLOBAL,
2804                 .offset         = GLOBAL_VAR(szRenameUserScript),
2805                 .special        = NULL,
2806                 .enum_list      = NULL,
2807                 .flags          = FLAG_ADVANCED,
2808         },
2809         {
2810                 .label          = "delete user script",
2811                 .type           = P_STRING,
2812                 .p_class        = P_GLOBAL,
2813                 .offset         = GLOBAL_VAR(szDelUserScript),
2814                 .special        = NULL,
2815                 .enum_list      = NULL,
2816                 .flags          = FLAG_ADVANCED,
2817         },
2818         {
2819                 .label          = "add group script",
2820                 .type           = P_STRING,
2821                 .p_class        = P_GLOBAL,
2822                 .offset         = GLOBAL_VAR(szAddGroupScript),
2823                 .special        = NULL,
2824                 .enum_list      = NULL,
2825                 .flags          = FLAG_ADVANCED,
2826         },
2827         {
2828                 .label          = "delete group script",
2829                 .type           = P_STRING,
2830                 .p_class        = P_GLOBAL,
2831                 .offset         = GLOBAL_VAR(szDelGroupScript),
2832                 .special        = NULL,
2833                 .enum_list      = NULL,
2834                 .flags          = FLAG_ADVANCED,
2835         },
2836         {
2837                 .label          = "add user to group script",
2838                 .type           = P_STRING,
2839                 .p_class        = P_GLOBAL,
2840                 .offset         = GLOBAL_VAR(szAddUserToGroupScript),
2841                 .special        = NULL,
2842                 .enum_list      = NULL,
2843                 .flags          = FLAG_ADVANCED,
2844         },
2845         {
2846                 .label          = "delete user from group script",
2847                 .type           = P_STRING,
2848                 .p_class        = P_GLOBAL,
2849                 .offset         = GLOBAL_VAR(szDelUserFromGroupScript),
2850                 .special        = NULL,
2851                 .enum_list      = NULL,
2852                 .flags          = FLAG_ADVANCED,
2853         },
2854         {
2855                 .label          = "set primary group script",
2856                 .type           = P_STRING,
2857                 .p_class        = P_GLOBAL,
2858                 .offset         = GLOBAL_VAR(szSetPrimaryGroupScript),
2859                 .special        = NULL,
2860                 .enum_list      = NULL,
2861                 .flags          = FLAG_ADVANCED,
2862         },
2863         {
2864                 .label          = "add machine script",
2865                 .type           = P_STRING,
2866                 .p_class        = P_GLOBAL,
2867                 .offset         = GLOBAL_VAR(szAddMachineScript),
2868                 .special        = NULL,
2869                 .enum_list      = NULL,
2870                 .flags          = FLAG_ADVANCED,
2871         },
2872         {
2873                 .label          = "shutdown script",
2874                 .type           = P_STRING,
2875                 .p_class        = P_GLOBAL,
2876                 .offset         = GLOBAL_VAR(szShutdownScript),
2877                 .special        = NULL,
2878                 .enum_list      = NULL,
2879                 .flags          = FLAG_ADVANCED,
2880         },
2881         {
2882                 .label          = "abort shutdown script",
2883                 .type           = P_STRING,
2884                 .p_class        = P_GLOBAL,
2885                 .offset         = GLOBAL_VAR(szAbortShutdownScript),
2886                 .special        = NULL,
2887                 .enum_list      = NULL,
2888                 .flags          = FLAG_ADVANCED,
2889         },
2890         {
2891                 .label          = "username map script",
2892                 .type           = P_STRING,
2893                 .p_class        = P_GLOBAL,
2894                 .offset         = GLOBAL_VAR(szUsernameMapScript),
2895                 .special        = NULL,
2896                 .enum_list      = NULL,
2897                 .flags          = FLAG_ADVANCED,
2898         },
2899         {
2900                 .label          = "username map cache time",
2901                 .type           = P_INTEGER,
2902                 .p_class        = P_GLOBAL,
2903                 .offset         = GLOBAL_VAR(iUsernameMapCacheTime),
2904                 .special        = NULL,
2905                 .enum_list      = NULL,
2906                 .flags          = FLAG_ADVANCED,
2907         },
2908         {
2909                 .label          = "logon script",
2910                 .type           = P_STRING,
2911                 .p_class        = P_GLOBAL,
2912                 .offset         = GLOBAL_VAR(szLogonScript),
2913                 .special        = NULL,
2914                 .enum_list      = NULL,
2915                 .flags          = FLAG_ADVANCED,
2916         },
2917         {
2918                 .label          = "logon path",
2919                 .type           = P_STRING,
2920                 .p_class        = P_GLOBAL,
2921                 .offset         = GLOBAL_VAR(szLogonPath),
2922                 .special        = NULL,
2923                 .enum_list      = NULL,
2924                 .flags          = FLAG_ADVANCED,
2925         },
2926         {
2927                 .label          = "logon drive",
2928                 .type           = P_STRING,
2929                 .p_class        = P_GLOBAL,
2930                 .offset         = GLOBAL_VAR(szLogonDrive),
2931                 .special        = NULL,
2932                 .enum_list      = NULL,
2933                 .flags          = FLAG_ADVANCED,
2934         },
2935         {
2936                 .label          = "logon home",
2937                 .type           = P_STRING,
2938                 .p_class        = P_GLOBAL,
2939                 .offset         = GLOBAL_VAR(szLogonHome),
2940                 .special        = NULL,
2941                 .enum_list      = NULL,
2942                 .flags          = FLAG_ADVANCED,
2943         },
2944         {
2945                 .label          = "domain logons",
2946                 .type           = P_BOOL,
2947                 .p_class        = P_GLOBAL,
2948                 .offset         = GLOBAL_VAR(bDomainLogons),
2949                 .special        = NULL,
2950                 .enum_list      = NULL,
2951                 .flags          = FLAG_ADVANCED,
2952         },
2953
2954         {
2955                 .label          = "init logon delayed hosts",
2956                 .type           = P_LIST,
2957                 .p_class        = P_GLOBAL,
2958                 .offset         = GLOBAL_VAR(szInitLogonDelayedHosts),
2959                 .special        = NULL,
2960                 .enum_list      = NULL,
2961                 .flags          = FLAG_ADVANCED,
2962         },
2963
2964         {
2965                 .label          = "init logon delay",
2966                 .type           = P_INTEGER,
2967                 .p_class        = P_GLOBAL,
2968                 .offset         = GLOBAL_VAR(InitLogonDelay),
2969                 .special        = NULL,
2970                 .enum_list      = NULL,
2971                 .flags          = FLAG_ADVANCED,
2972
2973         },
2974
2975         {N_("Browse Options"), P_SEP, P_SEPARATOR},
2976
2977         {
2978                 .label          = "os level",
2979                 .type           = P_INTEGER,
2980                 .p_class        = P_GLOBAL,
2981                 .offset         = GLOBAL_VAR(os_level),
2982                 .special        = NULL,
2983                 .enum_list      = NULL,
2984                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
2985         },
2986         {
2987                 .label          = "lm announce",
2988                 .type           = P_ENUM,
2989                 .p_class        = P_GLOBAL,
2990                 .offset         = GLOBAL_VAR(lm_announce),
2991                 .special        = NULL,
2992                 .enum_list      = enum_bool_auto,
2993                 .flags          = FLAG_ADVANCED,
2994         },
2995         {
2996                 .label          = "lm interval",
2997                 .type           = P_INTEGER,
2998                 .p_class        = P_GLOBAL,
2999                 .offset         = GLOBAL_VAR(lm_interval),
3000                 .special        = NULL,
3001                 .enum_list      = NULL,
3002                 .flags          = FLAG_ADVANCED,
3003         },
3004         {
3005                 .label          = "preferred master",
3006                 .type           = P_ENUM,
3007                 .p_class        = P_GLOBAL,
3008                 .offset         = GLOBAL_VAR(iPreferredMaster),
3009                 .special        = NULL,
3010                 .enum_list      = enum_bool_auto,
3011                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
3012         },
3013         {
3014                 .label          = "prefered master",
3015                 .type           = P_ENUM,
3016                 .p_class        = P_GLOBAL,
3017                 .offset         = GLOBAL_VAR(iPreferredMaster),
3018                 .special        = NULL,
3019                 .enum_list      = enum_bool_auto,
3020                 .flags          = FLAG_HIDE,
3021         },
3022         {
3023                 .label          = "local master",
3024                 .type           = P_BOOL,
3025                 .p_class        = P_GLOBAL,
3026                 .offset         = GLOBAL_VAR(bLocalMaster),
3027                 .special        = NULL,
3028                 .enum_list      = NULL,
3029                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
3030         },
3031         {
3032                 .label          = "domain master",
3033                 .type           = P_ENUM,
3034                 .p_class        = P_GLOBAL,
3035                 .offset         = GLOBAL_VAR(iDomainMaster),
3036                 .special        = NULL,
3037                 .enum_list      = enum_bool_auto,
3038                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
3039         },
3040         {
3041                 .label          = "browse list",
3042                 .type           = P_BOOL,
3043                 .p_class        = P_GLOBAL,
3044                 .offset         = GLOBAL_VAR(bBrowseList),
3045                 .special        = NULL,
3046                 .enum_list      = NULL,
3047                 .flags          = FLAG_ADVANCED,
3048         },
3049         {
3050                 .label          = "browseable",
3051                 .type           = P_BOOL,
3052                 .p_class        = P_LOCAL,
3053                 .offset         = LOCAL_VAR(bBrowseable),
3054                 .special        = NULL,
3055                 .enum_list      = NULL,
3056                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
3057         },
3058         {
3059                 .label          = "browsable",
3060                 .type           = P_BOOL,
3061                 .p_class        = P_LOCAL,
3062                 .offset         = LOCAL_VAR(bBrowseable),
3063                 .special        = NULL,
3064                 .enum_list      = NULL,
3065                 .flags          = FLAG_HIDE,
3066         },
3067         {
3068                 .label          = "access based share enum",
3069                 .type           = P_BOOL,
3070                 .p_class        = P_LOCAL,
3071                 .offset         = LOCAL_VAR(bAccessBasedShareEnum),
3072                 .special        = NULL,
3073                 .enum_list      = NULL,
3074                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE
3075         },
3076         {
3077                 .label          = "enhanced browsing",
3078                 .type           = P_BOOL,
3079                 .p_class        = P_GLOBAL,
3080                 .offset         = GLOBAL_VAR(enhanced_browsing),
3081                 .special        = NULL,
3082                 .enum_list      = NULL,
3083                 .flags          = FLAG_ADVANCED,
3084         },
3085
3086         {N_("WINS Options"), P_SEP, P_SEPARATOR},
3087
3088         {
3089                 .label          = "dns proxy",
3090                 .type           = P_BOOL,
3091                 .p_class        = P_GLOBAL,
3092                 .offset         = GLOBAL_VAR(bDNSproxy),
3093                 .special        = NULL,
3094                 .enum_list      = NULL,
3095                 .flags          = FLAG_ADVANCED,
3096         },
3097         {
3098                 .label          = "wins proxy",
3099                 .type           = P_BOOL,
3100                 .p_class        = P_GLOBAL,
3101                 .offset         = GLOBAL_VAR(bWINSproxy),
3102                 .special        = NULL,
3103                 .enum_list      = NULL,
3104                 .flags          = FLAG_ADVANCED,
3105         },
3106         {
3107                 .label          = "wins server",
3108                 .type           = P_LIST,
3109                 .p_class        = P_GLOBAL,
3110                 .offset         = GLOBAL_VAR(szWINSservers),
3111                 .special        = NULL,
3112                 .enum_list      = NULL,
3113                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
3114         },
3115         {
3116                 .label          = "wins support",
3117                 .type           = P_BOOL,
3118                 .p_class        = P_GLOBAL,
3119                 .offset         = GLOBAL_VAR(bWINSsupport),
3120                 .special        = NULL,
3121                 .enum_list      = NULL,
3122                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
3123         },
3124         {
3125                 .label          = "wins hook",
3126                 .type           = P_STRING,
3127                 .p_class        = P_GLOBAL,
3128                 .offset         = GLOBAL_VAR(szWINSHook),
3129                 .special        = NULL,
3130                 .enum_list      = NULL,
3131                 .flags          = FLAG_ADVANCED,
3132         },
3133
3134         {N_("Locking Options"), P_SEP, P_SEPARATOR},
3135
3136         {
3137                 .label          = "blocking locks",
3138                 .type           = P_BOOL,
3139                 .p_class        = P_LOCAL,
3140                 .offset         = LOCAL_VAR(bBlockingLocks),
3141                 .special        = NULL,
3142                 .enum_list      = NULL,
3143                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3144         },
3145         {
3146                 .label          = "csc policy",
3147                 .type           = P_ENUM,
3148                 .p_class        = P_LOCAL,
3149                 .offset         = LOCAL_VAR(iCSCPolicy),
3150                 .special        = NULL,
3151                 .enum_list      = enum_csc_policy,
3152                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3153         },
3154         {
3155                 .label          = "fake oplocks",
3156                 .type           = P_BOOL,
3157                 .p_class        = P_LOCAL,
3158                 .offset         = LOCAL_VAR(bFakeOplocks),
3159                 .special        = NULL,
3160                 .enum_list      = NULL,
3161                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
3162         },
3163         {
3164                 .label          = "kernel oplocks",
3165                 .type           = P_BOOL,
3166                 .p_class        = P_GLOBAL,
3167                 .offset         = GLOBAL_VAR(bKernelOplocks),
3168                 .special        = NULL,
3169                 .enum_list      = NULL,
3170                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
3171         },
3172         {
3173                 .label          = "locking",
3174                 .type           = P_BOOL,
3175                 .p_class        = P_LOCAL,
3176                 .offset         = LOCAL_VAR(bLocking),
3177                 .special        = NULL,
3178                 .enum_list      = NULL,
3179                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3180         },
3181         {
3182                 .label          = "lock spin time",
3183                 .type           = P_INTEGER,
3184                 .p_class        = P_GLOBAL,
3185                 .offset         = GLOBAL_VAR(iLockSpinTime),
3186                 .special        = NULL,
3187                 .enum_list      = NULL,
3188                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
3189         },
3190         {
3191                 .label          = "oplocks",
3192                 .type           = P_BOOL,
3193                 .p_class        = P_LOCAL,
3194                 .offset         = LOCAL_VAR(bOpLocks),
3195                 .special        = NULL,
3196                 .enum_list      = NULL,
3197                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3198         },
3199         {
3200                 .label          = "level2 oplocks",
3201                 .type           = P_BOOL,
3202                 .p_class        = P_LOCAL,
3203                 .offset         = LOCAL_VAR(bLevel2OpLocks),
3204                 .special        = NULL,
3205                 .enum_list      = NULL,
3206                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3207         },
3208         {
3209                 .label          = "oplock break wait time",
3210                 .type           = P_INTEGER,
3211                 .p_class        = P_GLOBAL,
3212                 .offset         = GLOBAL_VAR(oplock_break_wait_time),
3213                 .special        = NULL,
3214                 .enum_list      = NULL,
3215                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
3216         },
3217         {
3218                 .label          = "oplock contention limit",
3219                 .type           = P_INTEGER,
3220                 .p_class        = P_LOCAL,
3221                 .offset         = LOCAL_VAR(iOplockContentionLimit),
3222                 .special        = NULL,
3223                 .enum_list      = NULL,
3224                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3225         },
3226         {
3227                 .label          = "posix locking",
3228                 .type           = P_BOOL,
3229                 .p_class        = P_LOCAL,
3230                 .offset         = LOCAL_VAR(bPosixLocking),
3231                 .special        = NULL,
3232                 .enum_list      = NULL,
3233                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3234         },
3235         {
3236                 .label          = "strict locking",
3237                 .type           = P_ENUM,
3238                 .p_class        = P_LOCAL,
3239                 .offset         = LOCAL_VAR(iStrictLocking),
3240                 .special        = NULL,
3241                 .enum_list      = enum_bool_auto,
3242                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
3243         },
3244         {
3245                 .label          = "share modes",
3246                 .type           = P_BOOL,
3247                 .p_class        = P_LOCAL,
3248                 .offset         = LOCAL_VAR(bShareModes),
3249                 .special        = NULL,
3250                 .enum_list      = NULL,
3251                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_DEPRECATED,
3252         },
3253
3254         {N_("Ldap Options"), P_SEP, P_SEPARATOR},
3255
3256         {
3257                 .label          = "ldap admin dn",
3258                 .type           = P_STRING,
3259                 .p_class        = P_GLOBAL,
3260                 .offset         = GLOBAL_VAR(szLdapAdminDn),
3261                 .special        = NULL,
3262                 .enum_list      = NULL,
3263                 .flags          = FLAG_ADVANCED,
3264         },
3265         {
3266                 .label          = "ldap delete dn",
3267                 .type           = P_BOOL,
3268                 .p_class        = P_GLOBAL,
3269                 .offset         = GLOBAL_VAR(ldap_delete_dn),
3270                 .special        = NULL,
3271                 .enum_list      = NULL,
3272                 .flags          = FLAG_ADVANCED,
3273         },
3274         {
3275                 .label          = "ldap group suffix",
3276                 .type           = P_STRING,
3277                 .p_class        = P_GLOBAL,
3278                 .offset         = GLOBAL_VAR(szLdapGroupSuffix),
3279                 .special        = NULL,
3280                 .enum_list      = NULL,
3281                 .flags          = FLAG_ADVANCED,
3282         },
3283         {
3284                 .label          = "ldap idmap suffix",
3285                 .type           = P_STRING,
3286                 .p_class        = P_GLOBAL,
3287                 .offset         = GLOBAL_VAR(szLdapIdmapSuffix),
3288                 .special        = NULL,
3289                 .enum_list      = NULL,
3290                 .flags          = FLAG_ADVANCED,
3291         },
3292         {
3293                 .label          = "ldap machine suffix",
3294                 .type           = P_STRING,
3295                 .p_class        = P_GLOBAL,
3296                 .offset         = GLOBAL_VAR(szLdapMachineSuffix),
3297                 .special        = NULL,
3298                 .enum_list      = NULL,
3299                 .flags          = FLAG_ADVANCED,
3300         },
3301         {
3302                 .label          = "ldap passwd sync",
3303                 .type           = P_ENUM,
3304                 .p_class        = P_GLOBAL,
3305                 .offset         = GLOBAL_VAR(ldap_passwd_sync),
3306                 .special        = NULL,
3307                 .enum_list      = enum_ldap_passwd_sync,
3308                 .flags          = FLAG_ADVANCED,
3309         },
3310         {
3311                 .label          = "ldap password sync",
3312                 .type           = P_ENUM,
3313                 .p_class        = P_GLOBAL,
3314                 .offset         = GLOBAL_VAR(ldap_passwd_sync),
3315                 .special        = NULL,
3316                 .enum_list      = enum_ldap_passwd_sync,
3317                 .flags          = FLAG_HIDE,
3318         },
3319         {
3320                 .label          = "ldap replication sleep",
3321                 .type           = P_INTEGER,
3322                 .p_class        = P_GLOBAL,
3323                 .offset         = GLOBAL_VAR(ldap_replication_sleep),
3324                 .special        = NULL,
3325                 .enum_list      = NULL,
3326                 .flags          = FLAG_ADVANCED,
3327         },
3328         {
3329                 .label          = "ldap suffix",
3330                 .type           = P_STRING,
3331                 .p_class        = P_GLOBAL,
3332                 .offset         = GLOBAL_VAR(szLdapSuffix),
3333                 .special        = NULL,
3334                 .enum_list      = NULL,
3335                 .flags          = FLAG_ADVANCED,
3336         },
3337         {
3338                 .label          = "ldap ssl",
3339                 .type           = P_ENUM,
3340                 .p_class        = P_GLOBAL,
3341                 .offset         = GLOBAL_VAR(ldap_ssl),
3342                 .special        = NULL,
3343                 .enum_list      = enum_ldap_ssl,
3344                 .flags          = FLAG_ADVANCED,
3345         },
3346         {
3347                 .label          = "ldap ssl ads",
3348                 .type           = P_BOOL,
3349                 .p_class        = P_GLOBAL,
3350                 .offset         = GLOBAL_VAR(ldap_ssl_ads),
3351                 .special        = NULL,
3352                 .enum_list      = NULL,
3353                 .flags          = FLAG_ADVANCED,
3354         },
3355         {
3356                 .label          = "ldap deref",
3357                 .type           = P_ENUM,
3358                 .p_class        = P_GLOBAL,
3359                 .offset         = GLOBAL_VAR(ldap_deref),
3360                 .special        = NULL,
3361                 .enum_list      = enum_ldap_deref,
3362                 .flags          = FLAG_ADVANCED,
3363         },
3364         {
3365                 .label          = "ldap follow referral",
3366                 .type           = P_ENUM,
3367                 .p_class        = P_GLOBAL,
3368                 .offset         = GLOBAL_VAR(ldap_follow_referral),
3369                 .special        = NULL,
3370                 .enum_list      = enum_bool_auto,
3371                 .flags          = FLAG_ADVANCED,
3372         },
3373         {
3374                 .label          = "ldap timeout",
3375                 .type           = P_INTEGER,
3376                 .p_class        = P_GLOBAL,
3377                 .offset         = GLOBAL_VAR(ldap_timeout),
3378                 .special        = NULL,
3379                 .enum_list      = NULL,
3380                 .flags          = FLAG_ADVANCED,
3381         },
3382         {
3383                 .label          = "ldap connection timeout",
3384                 .type           = P_INTEGER,
3385                 .p_class        = P_GLOBAL,
3386                 .offset         = GLOBAL_VAR(ldap_connection_timeout),
3387                 .special        = NULL,
3388                 .enum_list      = NULL,
3389                 .flags          = FLAG_ADVANCED,
3390         },
3391         {
3392                 .label          = "ldap page size",
3393                 .type           = P_INTEGER,
3394                 .p_class        = P_GLOBAL,
3395                 .offset         = GLOBAL_VAR(ldap_page_size),
3396                 .special        = NULL,
3397                 .enum_list      = NULL,
3398                 .flags          = FLAG_ADVANCED,
3399         },
3400         {
3401                 .label          = "ldap user suffix",
3402                 .type           = P_STRING,
3403                 .p_class        = P_GLOBAL,
3404                 .offset         = GLOBAL_VAR(szLdapUserSuffix),
3405                 .special        = NULL,
3406                 .enum_list      = NULL,
3407                 .flags          = FLAG_ADVANCED,
3408         },
3409         {
3410                 .label          = "ldap debug level",
3411                 .type           = P_INTEGER,
3412                 .p_class        = P_GLOBAL,
3413                 .offset         = GLOBAL_VAR(ldap_debug_level),
3414                 .special        = handle_ldap_debug_level,
3415                 .enum_list      = NULL,
3416                 .flags          = FLAG_ADVANCED,
3417         },
3418         {
3419                 .label          = "ldap debug threshold",
3420                 .type           = P_INTEGER,
3421                 .p_class        = P_GLOBAL,
3422                 .offset         = GLOBAL_VAR(ldap_debug_threshold),
3423                 .special        = NULL,
3424                 .enum_list      = NULL,
3425                 .flags          = FLAG_ADVANCED,
3426         },
3427
3428         {N_("EventLog Options"), P_SEP, P_SEPARATOR},
3429
3430         {
3431                 .label          = "eventlog list",
3432                 .type           = P_LIST,
3433                 .p_class        = P_GLOBAL,
3434                 .offset