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