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