s3-param use Auto define for lm_announce default
[kai/samba-autobuild/.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/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 static void free_param_opts(struct parmlist_entry **popts);
314
315 static const struct enum_list enum_protocol[] = {
316         {PROTOCOL_SMB2_02, "SMB2"}, /* for now keep PROTOCOL_SMB2_02 */
317         {PROTOCOL_SMB2_10, "SMB2_10"},
318         {PROTOCOL_SMB2_02, "SMB2_02"},
319         {PROTOCOL_NT1, "NT1"},
320         {PROTOCOL_LANMAN2, "LANMAN2"},
321         {PROTOCOL_LANMAN1, "LANMAN1"},
322         {PROTOCOL_CORE, "CORE"},
323         {PROTOCOL_COREPLUS, "COREPLUS"},
324         {PROTOCOL_COREPLUS, "CORE+"},
325         {-1, NULL}
326 };
327
328 static const struct enum_list enum_security[] = {
329         {SEC_SHARE, "SHARE"},
330         {SEC_USER, "USER"},
331         {SEC_SERVER, "SERVER"},
332         {SEC_DOMAIN, "DOMAIN"},
333 #ifdef HAVE_ADS
334         {SEC_ADS, "ADS"},
335 #endif
336         {-1, NULL}
337 };
338
339 static const struct enum_list enum_printing[] = {
340         {PRINT_SYSV, "sysv"},
341         {PRINT_AIX, "aix"},
342         {PRINT_HPUX, "hpux"},
343         {PRINT_BSD, "bsd"},
344         {PRINT_QNX, "qnx"},
345         {PRINT_PLP, "plp"},
346         {PRINT_LPRNG, "lprng"},
347         {PRINT_CUPS, "cups"},
348         {PRINT_IPRINT, "iprint"},
349         {PRINT_LPRNT, "nt"},
350         {PRINT_LPROS2, "os2"},
351 #if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
352         {PRINT_TEST, "test"},
353         {PRINT_VLP, "vlp"},
354 #endif /* DEVELOPER */
355         {-1, NULL}
356 };
357
358 static const struct enum_list enum_ldap_sasl_wrapping[] = {
359         {0, "plain"},
360         {ADS_AUTH_SASL_SIGN, "sign"},
361         {ADS_AUTH_SASL_SEAL, "seal"},
362         {-1, NULL}
363 };
364
365 static const struct enum_list enum_ldap_ssl[] = {
366         {LDAP_SSL_OFF, "no"},
367         {LDAP_SSL_OFF, "off"},
368         {LDAP_SSL_START_TLS, "start tls"},
369         {LDAP_SSL_START_TLS, "start_tls"},
370         {-1, NULL}
371 };
372
373 /* LDAP Dereferencing Alias types */
374 #define SAMBA_LDAP_DEREF_NEVER          0
375 #define SAMBA_LDAP_DEREF_SEARCHING      1
376 #define SAMBA_LDAP_DEREF_FINDING        2
377 #define SAMBA_LDAP_DEREF_ALWAYS         3
378
379 static const struct enum_list enum_ldap_deref[] = {
380         {SAMBA_LDAP_DEREF_NEVER, "never"},
381         {SAMBA_LDAP_DEREF_SEARCHING, "searching"},
382         {SAMBA_LDAP_DEREF_FINDING, "finding"},
383         {SAMBA_LDAP_DEREF_ALWAYS, "always"},
384         {-1, "auto"}
385 };
386
387 static const struct enum_list enum_ldap_passwd_sync[] = {
388         {LDAP_PASSWD_SYNC_OFF, "no"},
389         {LDAP_PASSWD_SYNC_OFF, "off"},
390         {LDAP_PASSWD_SYNC_ON, "yes"},
391         {LDAP_PASSWD_SYNC_ON, "on"},
392         {LDAP_PASSWD_SYNC_ONLY, "only"},
393         {-1, NULL}
394 };
395
396 static const struct enum_list enum_map_readonly[] = {
397         {MAP_READONLY_NO, "no"},
398         {MAP_READONLY_NO, "false"},
399         {MAP_READONLY_NO, "0"},
400         {MAP_READONLY_YES, "yes"},
401         {MAP_READONLY_YES, "true"},
402         {MAP_READONLY_YES, "1"},
403         {MAP_READONLY_PERMISSIONS, "permissions"},
404         {MAP_READONLY_PERMISSIONS, "perms"},
405         {-1, NULL}
406 };
407
408 static const struct enum_list enum_case[] = {
409         {CASE_LOWER, "lower"},
410         {CASE_UPPER, "upper"},
411         {-1, NULL}
412 };
413
414
415
416 static const struct enum_list enum_bool_auto[] = {
417         {false, "No"},
418         {false, "False"},
419         {false, "0"},
420         {true, "Yes"},
421         {true, "True"},
422         {true, "1"},
423         {Auto, "Auto"},
424         {-1, NULL}
425 };
426
427 static const struct enum_list enum_csc_policy[] = {
428         {CSC_POLICY_MANUAL, "manual"},
429         {CSC_POLICY_DOCUMENTS, "documents"},
430         {CSC_POLICY_PROGRAMS, "programs"},
431         {CSC_POLICY_DISABLE, "disable"},
432         {-1, NULL}
433 };
434
435 /* SMB signing types. */
436 static const struct enum_list enum_smb_signing_vals[] = {
437         {false, "No"},
438         {false, "False"},
439         {false, "0"},
440         {false, "Off"},
441         {false, "disabled"},
442         {true, "Yes"},
443         {true, "True"},
444         {true, "1"},
445         {true, "On"},
446         {true, "enabled"},
447         {Auto, "auto"},
448         {Required, "required"},
449         {Required, "mandatory"},
450         {Required, "force"},
451         {Required, "forced"},
452         {Required, "enforced"},
453         {-1, NULL}
454 };
455
456 /* ACL compatibility options. */
457 static const struct enum_list enum_acl_compat_vals[] = {
458     { ACL_COMPAT_AUTO, "auto" },
459     { ACL_COMPAT_WINNT, "winnt" },
460     { ACL_COMPAT_WIN2K, "win2k" },
461     { -1, NULL}
462 };
463
464 /* 
465    Do you want session setups at user level security with a invalid
466    password to be rejected or allowed in as guest? WinNT rejects them
467    but it can be a pain as it means "net view" needs to use a password
468
469    You have 3 choices in the setting of map_to_guest:
470
471    "Never" means session setups with an invalid password
472    are rejected. This is the default.
473
474    "Bad User" means session setups with an invalid password
475    are rejected, unless the username does not exist, in which case it
476    is treated as a guest login
477
478    "Bad Password" means session setups with an invalid password
479    are treated as a guest login
480
481    Note that map_to_guest only has an effect in user or server
482    level security.
483 */
484
485 static const struct enum_list enum_map_to_guest[] = {
486         {NEVER_MAP_TO_GUEST, "Never"},
487         {MAP_TO_GUEST_ON_BAD_USER, "Bad User"},
488         {MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"},
489         {MAP_TO_GUEST_ON_BAD_UID, "Bad Uid"},
490         {-1, NULL}
491 };
492
493 /* Config backend options */
494
495 static const struct enum_list enum_config_backend[] = {
496         {CONFIG_BACKEND_FILE, "file"},
497         {CONFIG_BACKEND_REGISTRY, "registry"},
498         {-1, NULL}
499 };
500
501 /* ADS kerberos ticket verification options */
502
503 static const struct enum_list enum_kerberos_method[] = {
504         {KERBEROS_VERIFY_SECRETS, "default"},
505         {KERBEROS_VERIFY_SECRETS, "secrets only"},
506         {KERBEROS_VERIFY_SYSTEM_KEYTAB, "system keytab"},
507         {KERBEROS_VERIFY_DEDICATED_KEYTAB, "dedicated keytab"},
508         {KERBEROS_VERIFY_SECRETS_AND_KEYTAB, "secrets and keytab"},
509         {-1, NULL}
510 };
511
512 /* Note: We do not initialise the defaults union - it is not allowed in ANSI C
513  *
514  * The FLAG_HIDE is explicit. Parameters set this way do NOT appear in any edit
515  * screen in SWAT. This is used to exclude parameters as well as to squash all
516  * parameters that have been duplicated by pseudonyms.
517  *
518  * NOTE: To display a parameter in BASIC view set FLAG_BASIC
519  *       Any parameter that does NOT have FLAG_ADVANCED will not disply at all
520  *       Set FLAG_SHARE and FLAG_PRINT to specifically display parameters in
521  *        respective views.
522  *
523  * NOTE2: Handling of duplicated (synonym) parameters:
524  *      Only the first occurance of a parameter should be enabled by FLAG_BASIC
525  *      and/or FLAG_ADVANCED. All duplicates following the first mention should be
526  *      set to FLAG_HIDE. ie: Make you must place the parameter that has the preferred
527  *      name first, and all synonyms must follow it with the FLAG_HIDE attribute.
528  */
529
530 #define GLOBAL_VAR(name) offsetof(struct loadparm_global, name)
531 #define LOCAL_VAR(name) offsetof(struct loadparm_service, name)
532
533 static struct parm_struct parm_table[] = {
534         {N_("Base Options"), P_SEP, P_SEPARATOR},
535
536         {
537                 .label          = "dos charset",
538                 .type           = P_STRING,
539                 .p_class        = P_GLOBAL,
540                 .offset         = GLOBAL_VAR(dos_charset),
541                 .special        = handle_dos_charset,
542                 .enum_list      = NULL,
543                 .flags          = FLAG_ADVANCED
544         },
545         {
546                 .label          = "unix charset",
547                 .type           = P_STRING,
548                 .p_class        = P_GLOBAL,
549                 .offset         = GLOBAL_VAR(unix_charset),
550                 .special        = handle_charset,
551                 .enum_list      = NULL,
552                 .flags          = FLAG_ADVANCED
553         },
554         {
555                 .label          = "comment",
556                 .type           = P_STRING,
557                 .p_class        = P_LOCAL,
558                 .offset         = LOCAL_VAR(comment),
559                 .special        = NULL,
560                 .enum_list      = NULL,
561                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT
562         },
563         {
564                 .label          = "path",
565                 .type           = P_STRING,
566                 .p_class        = P_LOCAL,
567                 .offset         = LOCAL_VAR(szPath),
568                 .special        = NULL,
569                 .enum_list      = NULL,
570                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
571         },
572         {
573                 .label          = "directory",
574                 .type           = P_STRING,
575                 .p_class        = P_LOCAL,
576                 .offset         = LOCAL_VAR(szPath),
577                 .special        = NULL,
578                 .enum_list      = NULL,
579                 .flags          = FLAG_HIDE,
580         },
581         {
582                 .label          = "workgroup",
583                 .type           = P_USTRING,
584                 .p_class        = P_GLOBAL,
585                 .offset         = GLOBAL_VAR(szWorkgroup),
586                 .special        = NULL,
587                 .enum_list      = NULL,
588                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
589         },
590         {
591                 .label          = "realm",
592                 .type           = P_USTRING,
593                 .p_class        = P_GLOBAL,
594                 .offset         = GLOBAL_VAR(szRealm),
595                 .special        = handle_realm,
596                 .enum_list      = NULL,
597                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
598         },
599         {
600                 .label          = "netbios name",
601                 .type           = P_USTRING,
602                 .p_class        = P_GLOBAL,
603                 .offset         = GLOBAL_VAR(szNetbiosName),
604                 .special        = NULL,
605                 .enum_list      = NULL,
606                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
607         },
608         {
609                 .label          = "netbios aliases",
610                 .type           = P_LIST,
611                 .p_class        = P_GLOBAL,
612                 .offset         = GLOBAL_VAR(szNetbiosAliases),
613                 .special        = handle_netbios_aliases,
614                 .enum_list      = NULL,
615                 .flags          = FLAG_ADVANCED,
616         },
617         {
618                 .label          = "netbios scope",
619                 .type           = P_USTRING,
620                 .p_class        = P_GLOBAL,
621                 .offset         = GLOBAL_VAR(szNetbiosScope),
622                 .special        = NULL,
623                 .enum_list      = NULL,
624                 .flags          = FLAG_ADVANCED,
625         },
626         {
627                 .label          = "server string",
628                 .type           = P_STRING,
629                 .p_class        = P_GLOBAL,
630                 .offset         = GLOBAL_VAR(szServerString),
631                 .special        = NULL,
632                 .enum_list      = NULL,
633                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
634         },
635         {
636                 .label          = "interfaces",
637                 .type           = P_LIST,
638                 .p_class        = P_GLOBAL,
639                 .offset         = GLOBAL_VAR(szInterfaces),
640                 .special        = NULL,
641                 .enum_list      = NULL,
642                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
643         },
644         {
645                 .label          = "bind interfaces only",
646                 .type           = P_BOOL,
647                 .p_class        = P_GLOBAL,
648                 .offset         = GLOBAL_VAR(bBindInterfacesOnly),
649                 .special        = NULL,
650                 .enum_list      = NULL,
651                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
652         },
653         {
654                 .label          = "config backend",
655                 .type           = P_ENUM,
656                 .p_class        = P_GLOBAL,
657                 .offset         = GLOBAL_VAR(ConfigBackend),
658                 .special        = NULL,
659                 .enum_list      = enum_config_backend,
660                 .flags          = FLAG_HIDE|FLAG_ADVANCED|FLAG_META,
661         },
662
663         {N_("Security Options"), P_SEP, P_SEPARATOR},
664
665         {
666                 .label          = "security",
667                 .type           = P_ENUM,
668                 .p_class        = P_GLOBAL,
669                 .offset         = GLOBAL_VAR(security),
670                 .special        = NULL,
671                 .enum_list      = enum_security,
672                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
673         },
674         {
675                 .label          = "auth methods",
676                 .type           = P_LIST,
677                 .p_class        = P_GLOBAL,
678                 .offset         = GLOBAL_VAR(AuthMethods),
679                 .special        = NULL,
680                 .enum_list      = NULL,
681                 .flags          = FLAG_ADVANCED,
682         },
683         {
684                 .label          = "encrypt passwords",
685                 .type           = P_BOOL,
686                 .p_class        = P_GLOBAL,
687                 .offset         = GLOBAL_VAR(bEncryptPasswords),
688                 .special        = NULL,
689                 .enum_list      = NULL,
690                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_WIZARD,
691         },
692         {
693                 .label          = "client schannel",
694                 .type           = P_ENUM,
695                 .p_class        = P_GLOBAL,
696                 .offset         = GLOBAL_VAR(clientSchannel),
697                 .special        = NULL,
698                 .enum_list      = enum_bool_auto,
699                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
700         },
701         {
702                 .label          = "server schannel",
703                 .type           = P_ENUM,
704                 .p_class        = P_GLOBAL,
705                 .offset         = GLOBAL_VAR(serverSchannel),
706                 .special        = NULL,
707                 .enum_list      = enum_bool_auto,
708                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
709         },
710         {
711                 .label          = "allow trusted domains",
712                 .type           = P_BOOL,
713                 .p_class        = P_GLOBAL,
714                 .offset         = GLOBAL_VAR(bAllowTrustedDomains),
715                 .special        = NULL,
716                 .enum_list      = NULL,
717                 .flags          = FLAG_ADVANCED,
718         },
719         {
720                 .label          = "map to guest",
721                 .type           = P_ENUM,
722                 .p_class        = P_GLOBAL,
723                 .offset         = GLOBAL_VAR(map_to_guest),
724                 .special        = NULL,
725                 .enum_list      = enum_map_to_guest,
726                 .flags          = FLAG_ADVANCED,
727         },
728         {
729                 .label          = "null passwords",
730                 .type           = P_BOOL,
731                 .p_class        = P_GLOBAL,
732                 .offset         = GLOBAL_VAR(bNullPasswords),
733                 .special        = NULL,
734                 .enum_list      = NULL,
735                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
736         },
737         {
738                 .label          = "obey pam restrictions",
739                 .type           = P_BOOL,
740                 .p_class        = P_GLOBAL,
741                 .offset         = GLOBAL_VAR(bObeyPamRestrictions),
742                 .special        = NULL,
743                 .enum_list      = NULL,
744                 .flags          = FLAG_ADVANCED,
745         },
746         {
747                 .label          = "password server",
748                 .type           = P_STRING,
749                 .p_class        = P_GLOBAL,
750                 .offset         = GLOBAL_VAR(szPasswordServer),
751                 .special        = NULL,
752                 .enum_list      = NULL,
753                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
754         },
755         {
756                 .label          = "smb passwd file",
757                 .type           = P_STRING,
758                 .p_class        = P_GLOBAL,
759                 .offset         = GLOBAL_VAR(szSMBPasswdFile),
760                 .special        = NULL,
761                 .enum_list      = NULL,
762                 .flags          = FLAG_ADVANCED,
763         },
764         {
765                 .label          = "private dir",
766                 .type           = P_STRING,
767                 .p_class        = P_GLOBAL,
768                 .offset         = GLOBAL_VAR(szPrivateDir),
769                 .special        = NULL,
770                 .enum_list      = NULL,
771                 .flags          = FLAG_ADVANCED,
772         },
773         {
774                 .label          = "passdb backend",
775                 .type           = P_STRING,
776                 .p_class        = P_GLOBAL,
777                 .offset         = GLOBAL_VAR(szPassdbBackend),
778                 .special        = NULL,
779                 .enum_list      = NULL,
780                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
781         },
782         {
783                 .label          = "algorithmic rid base",
784                 .type           = P_INTEGER,
785                 .p_class        = P_GLOBAL,
786                 .offset         = GLOBAL_VAR(AlgorithmicRidBase),
787                 .special        = NULL,
788                 .enum_list      = NULL,
789                 .flags          = FLAG_ADVANCED,
790         },
791         {
792                 .label          = "root directory",
793                 .type           = P_STRING,
794                 .p_class        = P_GLOBAL,
795                 .offset         = GLOBAL_VAR(szRootdir),
796                 .special        = NULL,
797                 .enum_list      = NULL,
798                 .flags          = FLAG_ADVANCED,
799         },
800         {
801                 .label          = "root dir",
802                 .type           = P_STRING,
803                 .p_class        = P_GLOBAL,
804                 .offset         = GLOBAL_VAR(szRootdir),
805                 .special        = NULL,
806                 .enum_list      = NULL,
807                 .flags          = FLAG_HIDE,
808         },
809         {
810                 .label          = "root",
811                 .type           = P_STRING,
812                 .p_class        = P_GLOBAL,
813                 .offset         = GLOBAL_VAR(szRootdir),
814                 .special        = NULL,
815                 .enum_list      = NULL,
816                 .flags          = FLAG_HIDE,
817         },
818         {
819                 .label          = "guest account",
820                 .type           = P_STRING,
821                 .p_class        = P_GLOBAL,
822                 .offset         = GLOBAL_VAR(szGuestaccount),
823                 .special        = NULL,
824                 .enum_list      = NULL,
825                 .flags          = FLAG_BASIC | FLAG_ADVANCED,
826         },
827         {
828                 .label          = "enable privileges",
829                 .type           = P_BOOL,
830                 .p_class        = P_GLOBAL,
831                 .offset         = GLOBAL_VAR(bEnablePrivileges),
832                 .special        = NULL,
833                 .enum_list      = NULL,
834                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
835         },
836
837         {
838                 .label          = "pam password change",
839                 .type           = P_BOOL,
840                 .p_class        = P_GLOBAL,
841                 .offset         = GLOBAL_VAR(bPamPasswordChange),
842                 .special        = NULL,
843                 .enum_list      = NULL,
844                 .flags          = FLAG_ADVANCED,
845         },
846         {
847                 .label          = "passwd program",
848                 .type           = P_STRING,
849                 .p_class        = P_GLOBAL,
850                 .offset         = GLOBAL_VAR(szPasswdProgram),
851                 .special        = NULL,
852                 .enum_list      = NULL,
853                 .flags          = FLAG_ADVANCED,
854         },
855         {
856                 .label          = "passwd chat",
857                 .type           = P_STRING,
858                 .p_class        = P_GLOBAL,
859                 .offset         = GLOBAL_VAR(szPasswdChat),
860                 .special        = NULL,
861                 .enum_list      = NULL,
862                 .flags          = FLAG_ADVANCED,
863         },
864         {
865                 .label          = "passwd chat debug",
866                 .type           = P_BOOL,
867                 .p_class        = P_GLOBAL,
868                 .offset         = GLOBAL_VAR(bPasswdChatDebug),
869                 .special        = NULL,
870                 .enum_list      = NULL,
871                 .flags          = FLAG_ADVANCED,
872         },
873         {
874                 .label          = "passwd chat timeout",
875                 .type           = P_INTEGER,
876                 .p_class        = P_GLOBAL,
877                 .offset         = GLOBAL_VAR(iPasswdChatTimeout),
878                 .special        = NULL,
879                 .enum_list      = NULL,
880                 .flags          = FLAG_ADVANCED,
881         },
882         {
883                 .label          = "check password script",
884                 .type           = P_STRING,
885                 .p_class        = P_GLOBAL,
886                 .offset         = GLOBAL_VAR(szCheckPasswordScript),
887                 .special        = NULL,
888                 .enum_list      = NULL,
889                 .flags          = FLAG_ADVANCED,
890         },
891         {
892                 .label          = "username map",
893                 .type           = P_STRING,
894                 .p_class        = P_GLOBAL,
895                 .offset         = GLOBAL_VAR(szUsernameMap),
896                 .special        = NULL,
897                 .enum_list      = NULL,
898                 .flags          = FLAG_ADVANCED,
899         },
900         {
901                 .label          = "password level",
902                 .type           = P_INTEGER,
903                 .p_class        = P_GLOBAL,
904                 .offset         = GLOBAL_VAR(pwordlevel),
905                 .special        = NULL,
906                 .enum_list      = NULL,
907                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
908         },
909         {
910                 .label          = "username level",
911                 .type           = P_INTEGER,
912                 .p_class        = P_GLOBAL,
913                 .offset         = GLOBAL_VAR(unamelevel),
914                 .special        = NULL,
915                 .enum_list      = NULL,
916                 .flags          = FLAG_ADVANCED,
917         },
918         {
919                 .label          = "unix password sync",
920                 .type           = P_BOOL,
921                 .p_class        = P_GLOBAL,
922                 .offset         = GLOBAL_VAR(bUnixPasswdSync),
923                 .special        = NULL,
924                 .enum_list      = NULL,
925                 .flags          = FLAG_ADVANCED,
926         },
927         {
928                 .label          = "restrict anonymous",
929                 .type           = P_INTEGER,
930                 .p_class        = P_GLOBAL,
931                 .offset         = GLOBAL_VAR(restrict_anonymous),
932                 .special        = NULL,
933                 .enum_list      = NULL,
934                 .flags          = FLAG_ADVANCED,
935         },
936         {
937                 .label          = "lanman auth",
938                 .type           = P_BOOL,
939                 .p_class        = P_GLOBAL,
940                 .offset         = GLOBAL_VAR(bLanmanAuth),
941                 .special        = NULL,
942                 .enum_list      = NULL,
943                 .flags          = FLAG_ADVANCED,
944         },
945         {
946                 .label          = "ntlm auth",
947                 .type           = P_BOOL,
948                 .p_class        = P_GLOBAL,
949                 .offset         = GLOBAL_VAR(bNTLMAuth),
950                 .special        = NULL,
951                 .enum_list      = NULL,
952                 .flags          = FLAG_ADVANCED,
953         },
954         {
955                 .label          = "client NTLMv2 auth",
956                 .type           = P_BOOL,
957                 .p_class        = P_GLOBAL,
958                 .offset         = GLOBAL_VAR(bClientNTLMv2Auth),
959                 .special        = NULL,
960                 .enum_list      = NULL,
961                 .flags          = FLAG_ADVANCED,
962         },
963         {
964                 .label          = "client lanman auth",
965                 .type           = P_BOOL,
966                 .p_class        = P_GLOBAL,
967                 .offset         = GLOBAL_VAR(bClientLanManAuth),
968                 .special        = NULL,
969                 .enum_list      = NULL,
970                 .flags          = FLAG_ADVANCED,
971         },
972         {
973                 .label          = "client plaintext auth",
974                 .type           = P_BOOL,
975                 .p_class        = P_GLOBAL,
976                 .offset         = GLOBAL_VAR(bClientPlaintextAuth),
977                 .special        = NULL,
978                 .enum_list      = NULL,
979                 .flags          = FLAG_ADVANCED,
980         },
981         {
982                 .label          = "client use spnego principal",
983                 .type           = P_BOOL,
984                 .p_class        = P_GLOBAL,
985                 .offset         = GLOBAL_VAR(client_use_spnego_principal),
986                 .special        = NULL,
987                 .enum_list      = NULL,
988                 .flags          = FLAG_ADVANCED,
989         },
990         {
991                 .label          = "send spnego principal",
992                 .type           = P_BOOL,
993                 .p_class        = P_GLOBAL,
994                 .offset         = GLOBAL_VAR(send_spnego_principal),
995                 .special        = NULL,
996                 .enum_list      = NULL,
997                 .flags          = FLAG_ADVANCED,
998         },
999         {
1000                 .label          = "username",
1001                 .type           = P_STRING,
1002                 .p_class        = P_LOCAL,
1003                 .offset         = LOCAL_VAR(szUsername),
1004                 .special        = NULL,
1005                 .enum_list      = NULL,
1006                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE | FLAG_DEPRECATED,
1007         },
1008         {
1009                 .label          = "user",
1010                 .type           = P_STRING,
1011                 .p_class        = P_LOCAL,
1012                 .offset         = LOCAL_VAR(szUsername),
1013                 .special        = NULL,
1014                 .enum_list      = NULL,
1015                 .flags          = FLAG_HIDE,
1016         },
1017         {
1018                 .label          = "users",
1019                 .type           = P_STRING,
1020                 .p_class        = P_LOCAL,
1021                 .offset         = LOCAL_VAR(szUsername),
1022                 .special        = NULL,
1023                 .enum_list      = NULL,
1024                 .flags          = FLAG_HIDE,
1025         },
1026         {
1027                 .label          = "invalid users",
1028                 .type           = P_LIST,
1029                 .p_class        = P_LOCAL,
1030                 .offset         = LOCAL_VAR(szInvalidUsers),
1031                 .special        = NULL,
1032                 .enum_list      = NULL,
1033                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1034         },
1035         {
1036                 .label          = "valid users",
1037                 .type           = P_LIST,
1038                 .p_class        = P_LOCAL,
1039                 .offset         = LOCAL_VAR(szValidUsers),
1040                 .special        = NULL,
1041                 .enum_list      = NULL,
1042                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1043         },
1044         {
1045                 .label          = "admin users",
1046                 .type           = P_LIST,
1047                 .p_class        = P_LOCAL,
1048                 .offset         = LOCAL_VAR(szAdminUsers),
1049                 .special        = NULL,
1050                 .enum_list      = NULL,
1051                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1052         },
1053         {
1054                 .label          = "read list",
1055                 .type           = P_LIST,
1056                 .p_class        = P_LOCAL,
1057                 .offset         = LOCAL_VAR(readlist),
1058                 .special        = NULL,
1059                 .enum_list      = NULL,
1060                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1061         },
1062         {
1063                 .label          = "write list",
1064                 .type           = P_LIST,
1065                 .p_class        = P_LOCAL,
1066                 .offset         = LOCAL_VAR(writelist),
1067                 .special        = NULL,
1068                 .enum_list      = NULL,
1069                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1070         },
1071         {
1072                 .label          = "printer admin",
1073                 .type           = P_LIST,
1074                 .p_class        = P_LOCAL,
1075                 .offset         = LOCAL_VAR(printer_admin),
1076                 .special        = NULL,
1077                 .enum_list      = NULL,
1078                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_PRINT | FLAG_DEPRECATED,
1079         },
1080         {
1081                 .label          = "force user",
1082                 .type           = P_STRING,
1083                 .p_class        = P_LOCAL,
1084                 .offset         = LOCAL_VAR(force_user),
1085                 .special        = NULL,
1086                 .enum_list      = NULL,
1087                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1088         },
1089         {
1090                 .label          = "force group",
1091                 .type           = P_STRING,
1092                 .p_class        = P_LOCAL,
1093                 .offset         = LOCAL_VAR(force_group),
1094                 .special        = NULL,
1095                 .enum_list      = NULL,
1096                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1097         },
1098         {
1099                 .label          = "group",
1100                 .type           = P_STRING,
1101                 .p_class        = P_LOCAL,
1102                 .offset         = LOCAL_VAR(force_group),
1103                 .special        = NULL,
1104                 .enum_list      = NULL,
1105                 .flags          = FLAG_ADVANCED,
1106         },
1107         {
1108                 .label          = "read only",
1109                 .type           = P_BOOL,
1110                 .p_class        = P_LOCAL,
1111                 .offset         = LOCAL_VAR(bRead_only),
1112                 .special        = NULL,
1113                 .enum_list      = NULL,
1114                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE,
1115         },
1116         {
1117                 .label          = "write ok",
1118                 .type           = P_BOOLREV,
1119                 .p_class        = P_LOCAL,
1120                 .offset         = LOCAL_VAR(bRead_only),
1121                 .special        = NULL,
1122                 .enum_list      = NULL,
1123                 .flags          = FLAG_HIDE,
1124         },
1125         {
1126                 .label          = "writeable",
1127                 .type           = P_BOOLREV,
1128                 .p_class        = P_LOCAL,
1129                 .offset         = LOCAL_VAR(bRead_only),
1130                 .special        = NULL,
1131                 .enum_list      = NULL,
1132                 .flags          = FLAG_HIDE,
1133         },
1134         {
1135                 .label          = "writable",
1136                 .type           = P_BOOLREV,
1137                 .p_class        = P_LOCAL,
1138                 .offset         = LOCAL_VAR(bRead_only),
1139                 .special        = NULL,
1140                 .enum_list      = NULL,
1141                 .flags          = FLAG_HIDE,
1142         },
1143         {
1144                 .label          = "acl check permissions",
1145                 .type           = P_BOOL,
1146                 .p_class        = P_LOCAL,
1147                 .offset         = LOCAL_VAR(bAclCheckPermissions),
1148                 .special        = NULL,
1149                 .enum_list      = NULL,
1150                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1151         },
1152         {
1153                 .label          = "acl group control",
1154                 .type           = P_BOOL,
1155                 .p_class        = P_LOCAL,
1156                 .offset         = LOCAL_VAR(bAclGroupControl),
1157                 .special        = NULL,
1158                 .enum_list      = NULL,
1159                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1160         },
1161         {
1162                 .label          = "acl map full control",
1163                 .type           = P_BOOL,
1164                 .p_class        = P_LOCAL,
1165                 .offset         = LOCAL_VAR(bAclMapFullControl),
1166                 .special        = NULL,
1167                 .enum_list      = NULL,
1168                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1169         },
1170         {
1171                 .label          = "create mask",
1172                 .type           = P_OCTAL,
1173                 .p_class        = P_LOCAL,
1174                 .offset         = LOCAL_VAR(iCreate_mask),
1175                 .special        = NULL,
1176                 .enum_list      = NULL,
1177                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1178         },
1179         {
1180                 .label          = "create mode",
1181                 .type           = P_OCTAL,
1182                 .p_class        = P_LOCAL,
1183                 .offset         = LOCAL_VAR(iCreate_mask),
1184                 .special        = NULL,
1185                 .enum_list      = NULL,
1186                 .flags          = FLAG_HIDE,
1187         },
1188         {
1189                 .label          = "force create mode",
1190                 .type           = P_OCTAL,
1191                 .p_class        = P_LOCAL,
1192                 .offset         = LOCAL_VAR(iCreate_force_mode),
1193                 .special        = NULL,
1194                 .enum_list      = NULL,
1195                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1196         },
1197         {
1198                 .label          = "security mask",
1199                 .type           = P_OCTAL,
1200                 .p_class        = P_LOCAL,
1201                 .offset         = LOCAL_VAR(iSecurity_mask),
1202                 .special        = NULL,
1203                 .enum_list      = NULL,
1204                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1205         },
1206         {
1207                 .label          = "force security mode",
1208                 .type           = P_OCTAL,
1209                 .p_class        = P_LOCAL,
1210                 .offset         = LOCAL_VAR(iSecurity_force_mode),
1211                 .special        = NULL,
1212                 .enum_list      = NULL,
1213                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1214         },
1215         {
1216                 .label          = "directory mask",
1217                 .type           = P_OCTAL,
1218                 .p_class        = P_LOCAL,
1219                 .offset         = LOCAL_VAR(iDir_mask),
1220                 .special        = NULL,
1221                 .enum_list      = NULL,
1222                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1223         },
1224         {
1225                 .label          = "directory mode",
1226                 .type           = P_OCTAL,
1227                 .p_class        = P_LOCAL,
1228                 .offset         = LOCAL_VAR(iDir_mask),
1229                 .special        = NULL,
1230                 .enum_list      = NULL,
1231                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1232         },
1233         {
1234                 .label          = "force directory mode",
1235                 .type           = P_OCTAL,
1236                 .p_class        = P_LOCAL,
1237                 .offset         = LOCAL_VAR(iDir_force_mode),
1238                 .special        = NULL,
1239                 .enum_list      = NULL,
1240                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1241         },
1242         {
1243                 .label          = "directory security mask",
1244                 .type           = P_OCTAL,
1245                 .p_class        = P_LOCAL,
1246                 .offset         = LOCAL_VAR(iDir_Security_mask),
1247                 .special        = NULL,
1248                 .enum_list      = NULL,
1249                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1250         },
1251         {
1252                 .label          = "force directory security mode",
1253                 .type           = P_OCTAL,
1254                 .p_class        = P_LOCAL,
1255                 .offset         = LOCAL_VAR(iDir_Security_force_mode),
1256                 .special        = NULL,
1257                 .enum_list      = NULL,
1258                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1259         },
1260         {
1261                 .label          = "force unknown acl user",
1262                 .type           = P_BOOL,
1263                 .p_class        = P_LOCAL,
1264                 .offset         = LOCAL_VAR(bForceUnknownAclUser),
1265                 .special        = NULL,
1266                 .enum_list      = NULL,
1267                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1268         },
1269         {
1270                 .label          = "inherit permissions",
1271                 .type           = P_BOOL,
1272                 .p_class        = P_LOCAL,
1273                 .offset         = LOCAL_VAR(bInheritPerms),
1274                 .special        = NULL,
1275                 .enum_list      = NULL,
1276                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1277         },
1278         {
1279                 .label          = "inherit acls",
1280                 .type           = P_BOOL,
1281                 .p_class        = P_LOCAL,
1282                 .offset         = LOCAL_VAR(bInheritACLS),
1283                 .special        = NULL,
1284                 .enum_list      = NULL,
1285                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1286         },
1287         {
1288                 .label          = "inherit owner",
1289                 .type           = P_BOOL,
1290                 .p_class        = P_LOCAL,
1291                 .offset         = LOCAL_VAR(bInheritOwner),
1292                 .special        = NULL,
1293                 .enum_list      = NULL,
1294                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1295         },
1296         {
1297                 .label          = "guest only",
1298                 .type           = P_BOOL,
1299                 .p_class        = P_LOCAL,
1300                 .offset         = LOCAL_VAR(bGuest_only),
1301                 .special        = NULL,
1302                 .enum_list      = NULL,
1303                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1304         },
1305         {
1306                 .label          = "only guest",
1307                 .type           = P_BOOL,
1308                 .p_class        = P_LOCAL,
1309                 .offset         = LOCAL_VAR(bGuest_only),
1310                 .special        = NULL,
1311                 .enum_list      = NULL,
1312                 .flags          = FLAG_HIDE,
1313         },
1314         {
1315                 .label          = "administrative share",
1316                 .type           = P_BOOL,
1317                 .p_class        = P_LOCAL,
1318                 .offset         = LOCAL_VAR(bAdministrative_share),
1319                 .special        = NULL,
1320                 .enum_list      = NULL,
1321                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1322         },
1323
1324         {
1325                 .label          = "guest ok",
1326                 .type           = P_BOOL,
1327                 .p_class        = P_LOCAL,
1328                 .offset         = LOCAL_VAR(bGuest_ok),
1329                 .special        = NULL,
1330                 .enum_list      = NULL,
1331                 .flags          = FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1332         },
1333         {
1334                 .label          = "public",
1335                 .type           = P_BOOL,
1336                 .p_class        = P_LOCAL,
1337                 .offset         = LOCAL_VAR(bGuest_ok),
1338                 .special        = NULL,
1339                 .enum_list      = NULL,
1340                 .flags          = FLAG_HIDE,
1341         },
1342         {
1343                 .label          = "only user",
1344                 .type           = P_BOOL,
1345                 .p_class        = P_LOCAL,
1346                 .offset         = LOCAL_VAR(bOnlyUser),
1347                 .special        = NULL,
1348                 .enum_list      = NULL,
1349                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_DEPRECATED,
1350         },
1351         {
1352                 .label          = "hosts allow",
1353                 .type           = P_LIST,
1354                 .p_class        = P_LOCAL,
1355                 .offset         = LOCAL_VAR(szHostsallow),
1356                 .special        = NULL,
1357                 .enum_list      = NULL,
1358                 .flags          = FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1359         },
1360         {
1361                 .label          = "allow hosts",
1362                 .type           = P_LIST,
1363                 .p_class        = P_LOCAL,
1364                 .offset         = LOCAL_VAR(szHostsallow),
1365                 .special        = NULL,
1366                 .enum_list      = NULL,
1367                 .flags          = FLAG_HIDE,
1368         },
1369         {
1370                 .label          = "hosts deny",
1371                 .type           = P_LIST,
1372                 .p_class        = P_LOCAL,
1373                 .offset         = LOCAL_VAR(szHostsdeny),
1374                 .special        = NULL,
1375                 .enum_list      = NULL,
1376                 .flags          = FLAG_GLOBAL | FLAG_BASIC | FLAG_ADVANCED | FLAG_SHARE | FLAG_PRINT,
1377         },
1378         {
1379                 .label          = "deny hosts",
1380                 .type           = P_LIST,
1381                 .p_class        = P_LOCAL,
1382                 .offset         = LOCAL_VAR(szHostsdeny),
1383                 .special        = NULL,
1384                 .enum_list      = NULL,
1385                 .flags          = FLAG_HIDE,
1386         },
1387         {
1388                 .label          = "preload modules",
1389                 .type           = P_LIST,
1390                 .p_class        = P_GLOBAL,
1391                 .offset         = GLOBAL_VAR(szPreloadModules),
1392                 .special        = NULL,
1393                 .enum_list      = NULL,
1394                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1395         },
1396         {
1397                 .label          = "dedicated keytab file",
1398                 .type           = P_STRING,
1399                 .p_class        = P_GLOBAL,
1400                 .offset         = GLOBAL_VAR(szDedicatedKeytabFile),
1401                 .special        = NULL,
1402                 .enum_list      = NULL,
1403                 .flags          = FLAG_ADVANCED,
1404         },
1405         {
1406                 .label          = "kerberos method",
1407                 .type           = P_ENUM,
1408                 .p_class        = P_GLOBAL,
1409                 .offset         = GLOBAL_VAR(iKerberosMethod),
1410                 .special        = NULL,
1411                 .enum_list      = enum_kerberos_method,
1412                 .flags          = FLAG_ADVANCED,
1413         },
1414         {
1415                 .label          = "map untrusted to domain",
1416                 .type           = P_BOOL,
1417                 .p_class        = P_GLOBAL,
1418                 .offset         = GLOBAL_VAR(bMapUntrustedToDomain),
1419                 .special        = NULL,
1420                 .enum_list      = NULL,
1421                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1422         },
1423
1424
1425         {N_("Logging Options"), P_SEP, P_SEPARATOR},
1426
1427         {
1428                 .label          = "log level",
1429                 .type           = P_STRING,
1430                 .p_class        = P_GLOBAL,
1431                 .offset         = GLOBAL_VAR(szLogLevel),
1432                 .special        = handle_debug_list,
1433                 .enum_list      = NULL,
1434                 .flags          = FLAG_ADVANCED,
1435         },
1436         {
1437                 .label          = "debuglevel",
1438                 .type           = P_STRING,
1439                 .p_class        = P_GLOBAL,
1440                 .offset         = GLOBAL_VAR(szLogLevel),
1441                 .special        = handle_debug_list,
1442                 .enum_list      = NULL,
1443                 .flags          = FLAG_HIDE,
1444         },
1445         {
1446                 .label          = "syslog",
1447                 .type           = P_INTEGER,
1448                 .p_class        = P_GLOBAL,
1449                 .offset         = GLOBAL_VAR(syslog),
1450                 .special        = NULL,
1451                 .enum_list      = NULL,
1452                 .flags          = FLAG_ADVANCED,
1453         },
1454         {
1455                 .label          = "syslog only",
1456                 .type           = P_BOOL,
1457                 .p_class        = P_GLOBAL,
1458                 .offset         = GLOBAL_VAR(bSyslogOnly),
1459                 .special        = NULL,
1460                 .enum_list      = NULL,
1461                 .flags          = FLAG_ADVANCED,
1462         },
1463         {
1464                 .label          = "log file",
1465                 .type           = P_STRING,
1466                 .p_class        = P_GLOBAL,
1467                 .offset         = GLOBAL_VAR(szLogFile),
1468                 .special        = NULL,
1469                 .enum_list      = NULL,
1470                 .flags          = FLAG_ADVANCED,
1471         },
1472         {
1473                 .label          = "max log size",
1474                 .type           = P_INTEGER,
1475                 .p_class        = P_GLOBAL,
1476                 .offset         = GLOBAL_VAR(max_log_size),
1477                 .special        = NULL,
1478                 .enum_list      = NULL,
1479                 .flags          = FLAG_ADVANCED,
1480         },
1481         {
1482                 .label          = "debug timestamp",
1483                 .type           = P_BOOL,
1484                 .p_class        = P_GLOBAL,
1485                 .offset         = GLOBAL_VAR(bTimestampLogs),
1486                 .special        = NULL,
1487                 .enum_list      = NULL,
1488                 .flags          = FLAG_ADVANCED,
1489         },
1490         {
1491                 .label          = "timestamp logs",
1492                 .type           = P_BOOL,
1493                 .p_class        = P_GLOBAL,
1494                 .offset         = GLOBAL_VAR(bTimestampLogs),
1495                 .special        = NULL,
1496                 .enum_list      = NULL,
1497                 .flags          = FLAG_ADVANCED,
1498         },
1499         {
1500                 .label          = "debug prefix timestamp",
1501                 .type           = P_BOOL,
1502                 .p_class        = P_GLOBAL,
1503                 .offset         = GLOBAL_VAR(bDebugPrefixTimestamp),
1504                 .special        = NULL,
1505                 .enum_list      = NULL,
1506                 .flags          = FLAG_ADVANCED,
1507         },
1508         {
1509                 .label          = "debug hires timestamp",
1510                 .type           = P_BOOL,
1511                 .p_class        = P_GLOBAL,
1512                 .offset         = GLOBAL_VAR(bDebugHiresTimestamp),
1513                 .special        = NULL,
1514                 .enum_list      = NULL,
1515                 .flags          = FLAG_ADVANCED,
1516         },
1517         {
1518                 .label          = "debug pid",
1519                 .type           = P_BOOL,
1520                 .p_class        = P_GLOBAL,
1521                 .offset         = GLOBAL_VAR(bDebugPid),
1522                 .special        = NULL,
1523                 .enum_list      = NULL,
1524                 .flags          = FLAG_ADVANCED,
1525         },
1526         {
1527                 .label          = "debug uid",
1528                 .type           = P_BOOL,
1529                 .p_class        = P_GLOBAL,
1530                 .offset         = GLOBAL_VAR(bDebugUid),
1531                 .special        = NULL,
1532                 .enum_list      = NULL,
1533                 .flags          = FLAG_ADVANCED,
1534         },
1535         {
1536                 .label          = "debug class",
1537                 .type           = P_BOOL,
1538                 .p_class        = P_GLOBAL,
1539                 .offset         = GLOBAL_VAR(bDebugClass),
1540                 .special        = NULL,
1541                 .enum_list      = NULL,
1542                 .flags          = FLAG_ADVANCED,
1543         },
1544         {
1545                 .label          = "enable core files",
1546                 .type           = P_BOOL,
1547                 .p_class        = P_GLOBAL,
1548                 .offset         = GLOBAL_VAR(bEnableCoreFiles),
1549                 .special        = NULL,
1550                 .enum_list      = NULL,
1551                 .flags          = FLAG_ADVANCED,
1552         },
1553
1554         {N_("Protocol Options"), P_SEP, P_SEPARATOR},
1555
1556         {
1557                 .label          = "allocation roundup size",
1558                 .type           = P_INTEGER,
1559                 .p_class        = P_LOCAL,
1560                 .offset         = LOCAL_VAR(iallocation_roundup_size),
1561                 .special        = NULL,
1562                 .enum_list      = NULL,
1563                 .flags          = FLAG_ADVANCED,
1564         },
1565         {
1566                 .label          = "aio read size",
1567                 .type           = P_INTEGER,
1568                 .p_class        = P_LOCAL,
1569                 .offset         = LOCAL_VAR(iAioReadSize),
1570                 .special        = NULL,
1571                 .enum_list      = NULL,
1572                 .flags          = FLAG_ADVANCED,
1573         },
1574         {
1575                 .label          = "aio write size",
1576                 .type           = P_INTEGER,
1577                 .p_class        = P_LOCAL,
1578                 .offset         = LOCAL_VAR(iAioWriteSize),
1579                 .special        = NULL,
1580                 .enum_list      = NULL,
1581                 .flags          = FLAG_ADVANCED,
1582         },
1583         {
1584                 .label          = "aio write behind",
1585                 .type           = P_STRING,
1586                 .p_class        = P_LOCAL,
1587                 .offset         = LOCAL_VAR(szAioWriteBehind),
1588                 .special        = NULL,
1589                 .enum_list      = NULL,
1590                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1591         },
1592         {
1593                 .label          = "smb ports",
1594                 .type           = P_STRING,
1595                 .p_class        = P_GLOBAL,
1596                 .offset         = GLOBAL_VAR(smb_ports),
1597                 .special        = NULL,
1598                 .enum_list      = NULL,
1599                 .flags          = FLAG_ADVANCED,
1600         },
1601         {
1602                 .label          = "large readwrite",
1603                 .type           = P_BOOL,
1604                 .p_class        = P_GLOBAL,
1605                 .offset         = GLOBAL_VAR(bLargeReadwrite),
1606                 .special        = NULL,
1607                 .enum_list      = NULL,
1608                 .flags          = FLAG_ADVANCED,
1609         },
1610         {
1611                 .label          = "max protocol",
1612                 .type           = P_ENUM,
1613                 .p_class        = P_GLOBAL,
1614                 .offset         = GLOBAL_VAR(maxprotocol),
1615                 .special        = NULL,
1616                 .enum_list      = enum_protocol,
1617                 .flags          = FLAG_ADVANCED,
1618         },
1619         {
1620                 .label          = "protocol",
1621                 .type           = P_ENUM,
1622                 .p_class        = P_GLOBAL,
1623                 .offset         = GLOBAL_VAR(maxprotocol),
1624                 .special        = NULL,
1625                 .enum_list      = enum_protocol,
1626                 .flags          = FLAG_ADVANCED,
1627         },
1628         {
1629                 .label          = "min protocol",
1630                 .type           = P_ENUM,
1631                 .p_class        = P_GLOBAL,
1632                 .offset         = GLOBAL_VAR(minprotocol),
1633                 .special        = NULL,
1634                 .enum_list      = enum_protocol,
1635                 .flags          = FLAG_ADVANCED,
1636         },
1637         {
1638                 .label          = "min receivefile size",
1639                 .type           = P_INTEGER,
1640                 .p_class        = P_GLOBAL,
1641                 .offset         = GLOBAL_VAR(iminreceivefile),
1642                 .special        = NULL,
1643                 .enum_list      = NULL,
1644                 .flags          = FLAG_ADVANCED,
1645         },
1646         {
1647                 .label          = "read raw",
1648                 .type           = P_BOOL,
1649                 .p_class        = P_GLOBAL,
1650                 .offset         = GLOBAL_VAR(bReadRaw),
1651                 .special        = NULL,
1652                 .enum_list      = NULL,
1653                 .flags          = FLAG_ADVANCED,
1654         },
1655         {
1656                 .label          = "write raw",
1657                 .type           = P_BOOL,
1658                 .p_class        = P_GLOBAL,
1659                 .offset         = GLOBAL_VAR(bWriteRaw),
1660                 .special        = NULL,
1661                 .enum_list      = NULL,
1662                 .flags          = FLAG_ADVANCED,
1663         },
1664         {
1665                 .label          = "disable netbios",
1666                 .type           = P_BOOL,
1667                 .p_class        = P_GLOBAL,
1668                 .offset         = GLOBAL_VAR(bDisableNetbios),
1669                 .special        = NULL,
1670                 .enum_list      = NULL,
1671                 .flags          = FLAG_ADVANCED,
1672         },
1673         {
1674                 .label          = "reset on zero vc",
1675                 .type           = P_BOOL,
1676                 .p_class        = P_GLOBAL,
1677                 .offset         = GLOBAL_VAR(bResetOnZeroVC),
1678                 .special        = NULL,
1679                 .enum_list      = NULL,
1680                 .flags          = FLAG_ADVANCED,
1681         },
1682         {
1683                 .label          = "log writeable files on exit",
1684                 .type           = P_BOOL,
1685                 .p_class        = P_GLOBAL,
1686                 .offset         = GLOBAL_VAR(bLogWriteableFilesOnExit),
1687                 .special        = NULL,
1688                 .enum_list      = NULL,
1689                 .flags          = FLAG_ADVANCED,
1690         },
1691         {
1692                 .label          = "acl compatibility",
1693                 .type           = P_ENUM,
1694                 .p_class        = P_GLOBAL,
1695                 .offset         = GLOBAL_VAR(iAclCompat),
1696                 .special        = NULL,
1697                 .enum_list      = enum_acl_compat_vals,
1698                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1699         },
1700         {
1701                 .label          = "defer sharing violations",
1702                 .type           = P_BOOL,
1703                 .p_class        = P_GLOBAL,
1704                 .offset         = GLOBAL_VAR(bDeferSharingViolations),
1705                 .special        = NULL,
1706                 .enum_list      = NULL,
1707                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
1708         },
1709         {
1710                 .label          = "ea support",
1711                 .type           = P_BOOL,
1712                 .p_class        = P_LOCAL,
1713                 .offset         = LOCAL_VAR(bEASupport),
1714                 .special        = NULL,
1715                 .enum_list      = NULL,
1716                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1717         },
1718         {
1719                 .label          = "nt acl support",
1720                 .type           = P_BOOL,
1721                 .p_class        = P_LOCAL,
1722                 .offset         = LOCAL_VAR(bNTAclSupport),
1723                 .special        = NULL,
1724                 .enum_list      = NULL,
1725                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1726         },
1727         {
1728                 .label          = "nt pipe support",
1729                 .type           = P_BOOL,
1730                 .p_class        = P_GLOBAL,
1731                 .offset         = GLOBAL_VAR(bNTPipeSupport),
1732                 .special        = NULL,
1733                 .enum_list      = NULL,
1734                 .flags          = FLAG_ADVANCED,
1735         },
1736         {
1737                 .label          = "nt status support",
1738                 .type           = P_BOOL,
1739                 .p_class        = P_GLOBAL,
1740                 .offset         = GLOBAL_VAR(bNTStatusSupport),
1741                 .special        = NULL,
1742                 .enum_list      = NULL,
1743                 .flags          = FLAG_ADVANCED,
1744         },
1745         {
1746                 .label          = "profile acls",
1747                 .type           = P_BOOL,
1748                 .p_class        = P_LOCAL,
1749                 .offset         = LOCAL_VAR(bProfileAcls),
1750                 .special        = NULL,
1751                 .enum_list      = NULL,
1752                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL | FLAG_SHARE,
1753         },
1754         {
1755                 .label          = "map acl inherit",
1756                 .type           = P_BOOL,
1757                 .p_class        = P_LOCAL,
1758                 .offset         = LOCAL_VAR(bMap_acl_inherit),
1759                 .special        = NULL,
1760                 .enum_list      = NULL,
1761                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1762         },
1763         {
1764                 .label          = "afs share",
1765                 .type           = P_BOOL,
1766                 .p_class        = P_LOCAL,
1767                 .offset         = LOCAL_VAR(bAfs_Share),
1768                 .special        = NULL,
1769                 .enum_list      = NULL,
1770                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1771         },
1772         {
1773                 .label          = "max mux",
1774                 .type           = P_INTEGER,
1775                 .p_class        = P_GLOBAL,
1776                 .offset         = GLOBAL_VAR(max_mux),
1777                 .special        = NULL,
1778                 .enum_list      = NULL,
1779                 .flags          = FLAG_ADVANCED,
1780         },
1781         {
1782                 .label          = "max xmit",
1783                 .type           = P_INTEGER,
1784                 .p_class        = P_GLOBAL,
1785                 .offset         = GLOBAL_VAR(max_xmit),
1786                 .special        = NULL,
1787                 .enum_list      = NULL,
1788                 .flags          = FLAG_ADVANCED,
1789         },
1790         {
1791                 .label          = "name resolve order",
1792                 .type           = P_STRING,
1793                 .p_class        = P_GLOBAL,
1794                 .offset         = GLOBAL_VAR(szNameResolveOrder),
1795                 .special        = NULL,
1796                 .enum_list      = NULL,
1797                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
1798         },
1799         {
1800                 .label          = "max ttl",
1801                 .type           = P_INTEGER,
1802                 .p_class        = P_GLOBAL,
1803                 .offset         = GLOBAL_VAR(max_ttl),
1804                 .special        = NULL,
1805                 .enum_list      = NULL,
1806                 .flags          = FLAG_ADVANCED,
1807         },
1808         {
1809                 .label          = "max wins ttl",
1810                 .type           = P_INTEGER,
1811                 .p_class        = P_GLOBAL,
1812                 .offset         = GLOBAL_VAR(max_wins_ttl),
1813                 .special        = NULL,
1814                 .enum_list      = NULL,
1815                 .flags          = FLAG_ADVANCED,
1816         },
1817         {
1818                 .label          = "min wins ttl",
1819                 .type           = P_INTEGER,
1820                 .p_class        = P_GLOBAL,
1821                 .offset         = GLOBAL_VAR(min_wins_ttl),
1822                 .special        = NULL,
1823                 .enum_list      = NULL,
1824                 .flags          = FLAG_ADVANCED,
1825         },
1826         {
1827                 .label          = "time server",
1828                 .type           = P_BOOL,
1829                 .p_class        = P_GLOBAL,
1830                 .offset         = GLOBAL_VAR(bTimeServer),
1831                 .special        = NULL,
1832                 .enum_list      = NULL,
1833                 .flags          = FLAG_ADVANCED,
1834         },
1835         {
1836                 .label          = "unix extensions",
1837                 .type           = P_BOOL,
1838                 .p_class        = P_GLOBAL,
1839                 .offset         = GLOBAL_VAR(bUnixExtensions),
1840                 .special        = NULL,
1841                 .enum_list      = NULL,
1842                 .flags          = FLAG_ADVANCED,
1843         },
1844         {
1845                 .label          = "use spnego",
1846                 .type           = P_BOOL,
1847                 .p_class        = P_GLOBAL,
1848                 .offset         = GLOBAL_VAR(bUseSpnego),
1849                 .special        = NULL,
1850                 .enum_list      = NULL,
1851                 .flags          = FLAG_ADVANCED | FLAG_DEPRECATED,
1852         },
1853         {
1854                 .label          = "client signing",
1855                 .type           = P_ENUM,
1856                 .p_class        = P_GLOBAL,
1857                 .offset         = GLOBAL_VAR(client_signing),
1858                 .special        = NULL,
1859                 .enum_list      = enum_smb_signing_vals,
1860                 .flags          = FLAG_ADVANCED,
1861         },
1862         {
1863                 .label          = "server signing",
1864                 .type           = P_ENUM,
1865                 .p_class        = P_GLOBAL,
1866                 .offset         = GLOBAL_VAR(server_signing),
1867                 .special        = NULL,
1868                 .enum_list      = enum_smb_signing_vals,
1869                 .flags          = FLAG_ADVANCED,
1870         },
1871         {
1872                 .label          = "smb encrypt",
1873                 .type           = P_ENUM,
1874                 .p_class        = P_LOCAL,
1875                 .offset         = LOCAL_VAR(ismb_encrypt),
1876                 .special        = NULL,
1877                 .enum_list      = enum_smb_signing_vals,
1878                 .flags          = FLAG_ADVANCED,
1879         },
1880         {
1881                 .label          = "client use spnego",
1882                 .type           = P_BOOL,
1883                 .p_class        = P_GLOBAL,
1884                 .offset         = GLOBAL_VAR(bClientUseSpnego),
1885                 .special        = NULL,
1886                 .enum_list      = NULL,
1887                 .flags          = FLAG_ADVANCED,
1888         },
1889         {
1890                 .label          = "client ldap sasl wrapping",
1891                 .type           = P_ENUM,
1892                 .p_class        = P_GLOBAL,
1893                 .offset         = GLOBAL_VAR(client_ldap_sasl_wrapping),
1894                 .special        = NULL,
1895                 .enum_list      = enum_ldap_sasl_wrapping,
1896                 .flags          = FLAG_ADVANCED,
1897         },
1898         {
1899                 .label          = "enable asu support",
1900                 .type           = P_BOOL,
1901                 .p_class        = P_GLOBAL,
1902                 .offset         = GLOBAL_VAR(bASUSupport),
1903                 .special        = NULL,
1904                 .enum_list      = NULL,
1905                 .flags          = FLAG_ADVANCED,
1906         },
1907         {
1908                 .label          = "svcctl list",
1909                 .type           = P_LIST,
1910                 .p_class        = P_GLOBAL,
1911                 .offset         = GLOBAL_VAR(szServicesList),
1912                 .special        = NULL,
1913                 .enum_list      = NULL,
1914                 .flags          = FLAG_ADVANCED,
1915         },
1916
1917         {N_("Tuning Options"), P_SEP, P_SEPARATOR},
1918
1919         {
1920                 .label          = "block size",
1921                 .type           = P_INTEGER,
1922                 .p_class        = P_LOCAL,
1923                 .offset         = LOCAL_VAR(iBlock_size),
1924                 .special        = NULL,
1925                 .enum_list      = NULL,
1926                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
1927         },
1928         {
1929                 .label          = "deadtime",
1930                 .type           = P_INTEGER,
1931                 .p_class        = P_GLOBAL,
1932                 .offset         = GLOBAL_VAR(deadtime),
1933                 .special        = NULL,
1934                 .enum_list      = NULL,
1935                 .flags          = FLAG_ADVANCED,
1936         },
1937         {
1938                 .label          = "getwd cache",
1939                 .type           = P_BOOL,
1940                 .p_class        = P_GLOBAL,
1941                 .offset         = GLOBAL_VAR(getwd_cache),
1942                 .special        = NULL,
1943                 .enum_list      = NULL,
1944                 .flags          = FLAG_ADVANCED,
1945         },
1946         {
1947                 .label          = "keepalive",
1948                 .type           = P_INTEGER,
1949                 .p_class        = P_GLOBAL,
1950                 .offset         = GLOBAL_VAR(iKeepalive),
1951                 .special        = NULL,
1952                 .enum_list      = NULL,
1953                 .flags          = FLAG_ADVANCED,
1954         },
1955         {
1956                 .label          = "change notify",
1957                 .type           = P_BOOL,
1958                 .p_class        = P_LOCAL,
1959                 .offset         = LOCAL_VAR(bChangeNotify),
1960                 .special        = NULL,
1961                 .enum_list      = NULL,
1962                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1963         },
1964         {
1965                 .label          = "directory name cache size",
1966                 .type           = P_INTEGER,
1967                 .p_class        = P_LOCAL,
1968                 .offset         = LOCAL_VAR(iDirectoryNameCacheSize),
1969                 .special        = NULL,
1970                 .enum_list      = NULL,
1971                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1972         },
1973         {
1974                 .label          = "kernel change notify",
1975                 .type           = P_BOOL,
1976                 .p_class        = P_LOCAL,
1977                 .offset         = LOCAL_VAR(bKernelChangeNotify),
1978                 .special        = NULL,
1979                 .enum_list      = NULL,
1980                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
1981         },
1982         {
1983                 .label          = "lpq cache time",
1984                 .type           = P_INTEGER,
1985                 .p_class        = P_GLOBAL,
1986                 .offset         = GLOBAL_VAR(lpqcachetime),
1987                 .special        = NULL,
1988                 .enum_list      = NULL,
1989                 .flags          = FLAG_ADVANCED,
1990         },
1991         {
1992                 .label          = "max smbd processes",
1993                 .type           = P_INTEGER,
1994                 .p_class        = P_GLOBAL,
1995                 .offset         = GLOBAL_VAR(iMaxSmbdProcesses),
1996                 .special        = NULL,
1997                 .enum_list      = NULL,
1998                 .flags          = FLAG_ADVANCED,
1999         },
2000         {
2001                 .label          = "max connections",
2002                 .type           = P_INTEGER,
2003                 .p_class        = P_LOCAL,
2004                 .offset         = LOCAL_VAR(iMaxConnections),
2005                 .special        = NULL,
2006                 .enum_list      = NULL,
2007                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2008         },
2009         {
2010                 .label          = "paranoid server security",
2011                 .type           = P_BOOL,
2012                 .p_class        = P_GLOBAL,
2013                 .offset         = GLOBAL_VAR(paranoid_server_security),
2014                 .special        = NULL,
2015                 .enum_list      = NULL,
2016                 .flags          = FLAG_ADVANCED,
2017         },
2018         {
2019                 .label          = "max disk size",
2020                 .type           = P_INTEGER,
2021                 .p_class        = P_GLOBAL,
2022                 .offset         = GLOBAL_VAR(maxdisksize),
2023                 .special        = NULL,
2024                 .enum_list      = NULL,
2025                 .flags          = FLAG_ADVANCED,
2026         },
2027         {
2028                 .label          = "max open files",
2029                 .type           = P_INTEGER,
2030                 .p_class        = P_GLOBAL,
2031                 .offset         = GLOBAL_VAR(max_open_files),
2032                 .special        = NULL,
2033                 .enum_list      = NULL,
2034                 .flags          = FLAG_ADVANCED,
2035         },
2036         {
2037                 .label          = "min print space",
2038                 .type           = P_INTEGER,
2039                 .p_class        = P_LOCAL,
2040                 .offset         = LOCAL_VAR(iMinPrintSpace),
2041                 .special        = NULL,
2042                 .enum_list      = NULL,
2043                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2044         },
2045         {
2046                 .label          = "socket options",
2047                 .type           = P_STRING,
2048                 .p_class        = P_GLOBAL,
2049                 .offset         = GLOBAL_VAR(szSocketOptions),
2050                 .special        = NULL,
2051                 .enum_list      = NULL,
2052                 .flags          = FLAG_ADVANCED,
2053         },
2054         {
2055                 .label          = "strict allocate",
2056                 .type           = P_BOOL,
2057                 .p_class        = P_LOCAL,
2058                 .offset         = LOCAL_VAR(bStrictAllocate),
2059                 .special        = NULL,
2060                 .enum_list      = NULL,
2061                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2062         },
2063         {
2064                 .label          = "strict sync",
2065                 .type           = P_BOOL,
2066                 .p_class        = P_LOCAL,
2067                 .offset         = LOCAL_VAR(bStrictSync),
2068                 .special        = NULL,
2069                 .enum_list      = NULL,
2070                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2071         },
2072         {
2073                 .label          = "sync always",
2074                 .type           = P_BOOL,
2075                 .p_class        = P_LOCAL,
2076                 .offset         = LOCAL_VAR(bSyncAlways),
2077                 .special        = NULL,
2078                 .enum_list      = NULL,
2079                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2080         },
2081         {
2082                 .label          = "use mmap",
2083                 .type           = P_BOOL,
2084                 .p_class        = P_GLOBAL,
2085                 .offset         = GLOBAL_VAR(bUseMmap),
2086                 .special        = NULL,
2087                 .enum_list      = NULL,
2088                 .flags          = FLAG_ADVANCED,
2089         },
2090         {
2091                 .label          = "use sendfile",
2092                 .type           = P_BOOL,
2093                 .p_class        = P_LOCAL,
2094                 .offset         = LOCAL_VAR(bUseSendfile),
2095                 .special        = NULL,
2096                 .enum_list      = NULL,
2097                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2098         },
2099         {
2100                 .label          = "hostname lookups",
2101                 .type           = P_BOOL,
2102                 .p_class        = P_GLOBAL,
2103                 .offset         = GLOBAL_VAR(bHostnameLookups),
2104                 .special        = NULL,
2105                 .enum_list      = NULL,
2106                 .flags          = FLAG_ADVANCED,
2107         },
2108         {
2109                 .label          = "write cache size",
2110                 .type           = P_INTEGER,
2111                 .p_class        = P_LOCAL,
2112                 .offset         = LOCAL_VAR(iWriteCacheSize),
2113                 .special        = NULL,
2114                 .enum_list      = NULL,
2115                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2116         },
2117         {
2118                 .label          = "name cache timeout",
2119                 .type           = P_INTEGER,
2120                 .p_class        = P_GLOBAL,
2121                 .offset         = GLOBAL_VAR(name_cache_timeout),
2122                 .special        = NULL,
2123                 .enum_list      = NULL,
2124                 .flags          = FLAG_ADVANCED,
2125         },
2126         {
2127                 .label          = "ctdbd socket",
2128                 .type           = P_STRING,
2129                 .p_class        = P_GLOBAL,
2130                 .offset         = GLOBAL_VAR(ctdbdSocket),
2131                 .special        = NULL,
2132                 .enum_list      = NULL,
2133                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2134         },
2135         {
2136                 .label          = "cluster addresses",
2137                 .type           = P_LIST,
2138                 .p_class        = P_GLOBAL,
2139                 .offset         = GLOBAL_VAR(szClusterAddresses),
2140                 .special        = NULL,
2141                 .enum_list      = NULL,
2142                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2143         },
2144         {
2145                 .label          = "clustering",
2146                 .type           = P_BOOL,
2147                 .p_class        = P_GLOBAL,
2148                 .offset         = GLOBAL_VAR(clustering),
2149                 .special        = NULL,
2150                 .enum_list      = NULL,
2151                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2152         },
2153         {
2154                 .label          = "ctdb timeout",
2155                 .type           = P_INTEGER,
2156                 .p_class        = P_GLOBAL,
2157                 .offset         = GLOBAL_VAR(ctdb_timeout),
2158                 .special        = NULL,
2159                 .enum_list      = NULL,
2160                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2161         },
2162         {
2163                 .label          = "ctdb locktime warn threshold",
2164                 .type           = P_INTEGER,
2165                 .p_class        = P_GLOBAL,
2166                 .offset         = GLOBAL_VAR(ctdb_locktime_warn_threshold),
2167                 .special        = NULL,
2168                 .enum_list      = NULL,
2169                 .flags          = FLAG_ADVANCED | FLAG_GLOBAL,
2170         },
2171         {
2172                 .label          = "smb2 max read",
2173                 .type           = P_INTEGER,
2174                 .p_class        = P_GLOBAL,
2175                 .offset         = GLOBAL_VAR(ismb2_max_read),
2176                 .special        = NULL,
2177                 .enum_list      = NULL,
2178                 .flags          = FLAG_ADVANCED,
2179         },
2180         {
2181                 .label          = "smb2 max write",
2182                 .type           = P_INTEGER,
2183                 .p_class        = P_GLOBAL,
2184                 .offset         = GLOBAL_VAR(ismb2_max_write),
2185                 .special        = NULL,
2186                 .enum_list      = NULL,
2187                 .flags          = FLAG_ADVANCED,
2188         },
2189         {
2190                 .label          = "smb2 max trans",
2191                 .type           = P_INTEGER,
2192                 .p_class        = P_GLOBAL,
2193                 .offset         = GLOBAL_VAR(ismb2_max_trans),
2194                 .special        = NULL,
2195                 .enum_list      = NULL,
2196                 .flags          = FLAG_ADVANCED,
2197         },
2198         {
2199                 .label          = "smb2 max credits",
2200                 .type           = P_INTEGER,
2201                 .p_class        = P_GLOBAL,
2202                 .offset         = GLOBAL_VAR(ismb2_max_credits),
2203                 .special        = NULL,
2204                 .enum_list      = NULL,
2205                 .flags          = FLAG_ADVANCED,
2206         },
2207
2208         {N_("Printing Options"), P_SEP, P_SEPARATOR},
2209
2210         {
2211                 .label          = "max reported print jobs",
2212                 .type           = P_INTEGER,
2213                 .p_class        = P_LOCAL,
2214                 .offset         = LOCAL_VAR(iMaxReportedPrintJobs),
2215                 .special        = NULL,
2216                 .enum_list      = NULL,
2217                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2218         },
2219         {
2220                 .label          = "max print jobs",
2221                 .type           = P_INTEGER,
2222                 .p_class        = P_LOCAL,
2223                 .offset         = LOCAL_VAR(iMaxPrintJobs),
2224                 .special        = NULL,
2225                 .enum_list      = NULL,
2226                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2227         },
2228         {
2229                 .label          = "load printers",
2230                 .type           = P_BOOL,
2231                 .p_class        = P_GLOBAL,
2232                 .offset         = GLOBAL_VAR(bLoadPrinters),
2233                 .special        = NULL,
2234                 .enum_list      = NULL,
2235                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2236         },
2237         {
2238                 .label          = "printcap cache time",
2239                 .type           = P_INTEGER,
2240                 .p_class        = P_GLOBAL,
2241                 .offset         = GLOBAL_VAR(PrintcapCacheTime),
2242                 .special        = NULL,
2243                 .enum_list      = NULL,
2244                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2245         },
2246         {
2247                 .label          = "printcap name",
2248                 .type           = P_STRING,
2249                 .p_class        = P_GLOBAL,
2250                 .offset         = GLOBAL_VAR(szPrintcapname),
2251                 .special        = NULL,
2252                 .enum_list      = NULL,
2253                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2254         },
2255         {
2256                 .label          = "printcap",
2257                 .type           = P_STRING,
2258                 .p_class        = P_GLOBAL,
2259                 .offset         = GLOBAL_VAR(szPrintcapname),
2260                 .special        = NULL,
2261                 .enum_list      = NULL,
2262                 .flags          = FLAG_HIDE,
2263         },
2264         {
2265                 .label          = "printable",
2266                 .type           = P_BOOL,
2267                 .p_class        = P_LOCAL,
2268                 .offset         = LOCAL_VAR(bPrint_ok),
2269                 .special        = NULL,
2270                 .enum_list      = NULL,
2271                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2272         },
2273         {
2274                 .label          = "print notify backchannel",
2275                 .type           = P_BOOL,
2276                 .p_class        = P_LOCAL,
2277                 .offset         = LOCAL_VAR(bPrintNotifyBackchannel),
2278                 .special        = NULL,
2279                 .enum_list      = NULL,
2280                 .flags          = FLAG_ADVANCED,
2281         },
2282         {
2283                 .label          = "print ok",
2284                 .type           = P_BOOL,
2285                 .p_class        = P_LOCAL,
2286                 .offset         = LOCAL_VAR(bPrint_ok),
2287                 .special        = NULL,
2288                 .enum_list      = NULL,
2289                 .flags          = FLAG_HIDE,
2290         },
2291         {
2292                 .label          = "printing",
2293                 .type           = P_ENUM,
2294                 .p_class        = P_LOCAL,
2295                 .offset         = LOCAL_VAR(iPrinting),
2296                 .special        = handle_printing,
2297                 .enum_list      = enum_printing,
2298                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2299         },
2300         {
2301                 .label          = "cups options",
2302                 .type           = P_STRING,
2303                 .p_class        = P_LOCAL,
2304                 .offset         = LOCAL_VAR(szCupsOptions),
2305                 .special        = NULL,
2306                 .enum_list      = NULL,
2307                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2308         },
2309         {
2310                 .label          = "cups server",
2311                 .type           = P_STRING,
2312                 .p_class        = P_GLOBAL,
2313                 .offset         = GLOBAL_VAR(szCupsServer),
2314                 .special        = NULL,
2315                 .enum_list      = NULL,
2316                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2317         },
2318         {
2319                 .label          = "cups encrypt",
2320                 .type           = P_ENUM,
2321                 .p_class        = P_GLOBAL,
2322                 .offset            = GLOBAL_VAR(CupsEncrypt),
2323                 .special        = NULL,
2324                 .enum_list      = enum_bool_auto,
2325                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2326         },
2327         {
2328
2329                 .label          = "cups connection timeout",
2330                 .type           = P_INTEGER,
2331                 .p_class        = P_GLOBAL,
2332                 .offset         = GLOBAL_VAR(cups_connection_timeout),
2333                 .special        = NULL,
2334                 .enum_list      = NULL,
2335                 .flags          = FLAG_ADVANCED,
2336         },
2337         {
2338                 .label          = "iprint server",
2339                 .type           = P_STRING,
2340                 .p_class        = P_GLOBAL,
2341                 .offset         = GLOBAL_VAR(szIPrintServer),
2342                 .special        = NULL,
2343                 .enum_list      = NULL,
2344                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2345         },
2346         {
2347                 .label          = "print command",
2348                 .type           = P_STRING,
2349                 .p_class        = P_LOCAL,
2350                 .offset         = LOCAL_VAR(szPrintcommand),
2351                 .special        = NULL,
2352                 .enum_list      = NULL,
2353                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2354         },
2355         {
2356                 .label          = "disable spoolss",
2357                 .type           = P_BOOL,
2358                 .p_class        = P_GLOBAL,
2359                 .offset         = GLOBAL_VAR(bDisableSpoolss),
2360                 .special        = NULL,
2361                 .enum_list      = NULL,
2362                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2363         },
2364         {
2365                 .label          = "enable spoolss",
2366                 .type           = P_BOOLREV,
2367                 .p_class        = P_GLOBAL,
2368                 .offset         = GLOBAL_VAR(bDisableSpoolss),
2369                 .special        = NULL,
2370                 .enum_list      = NULL,
2371                 .flags          = FLAG_HIDE,
2372         },
2373         {
2374                 .label          = "lpq command",
2375                 .type           = P_STRING,
2376                 .p_class        = P_LOCAL,
2377                 .offset         = LOCAL_VAR(szLpqcommand),
2378                 .special        = NULL,
2379                 .enum_list      = NULL,
2380                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2381         },
2382         {
2383                 .label          = "lprm command",
2384                 .type           = P_STRING,
2385                 .p_class        = P_LOCAL,
2386                 .offset         = LOCAL_VAR(szLprmcommand),
2387                 .special        = NULL,
2388                 .enum_list      = NULL,
2389                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2390         },
2391         {
2392                 .label          = "lppause command",
2393                 .type           = P_STRING,
2394                 .p_class        = P_LOCAL,
2395                 .offset         = LOCAL_VAR(szLppausecommand),
2396                 .special        = NULL,
2397                 .enum_list      = NULL,
2398                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2399         },
2400         {
2401                 .label          = "lpresume command",
2402                 .type           = P_STRING,
2403                 .p_class        = P_LOCAL,
2404                 .offset         = LOCAL_VAR(szLpresumecommand),
2405                 .special        = NULL,
2406                 .enum_list      = NULL,
2407                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2408         },
2409         {
2410                 .label          = "queuepause command",
2411                 .type           = P_STRING,
2412                 .p_class        = P_LOCAL,
2413                 .offset         = LOCAL_VAR(szQueuepausecommand),
2414                 .special        = NULL,
2415                 .enum_list      = NULL,
2416                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2417         },
2418         {
2419                 .label          = "queueresume command",
2420                 .type           = P_STRING,
2421                 .p_class        = P_LOCAL,
2422                 .offset         = LOCAL_VAR(szQueueresumecommand),
2423                 .special        = NULL,
2424                 .enum_list      = NULL,
2425                 .flags          = FLAG_ADVANCED | FLAG_PRINT | FLAG_GLOBAL,
2426         },
2427         {
2428                 .label          = "addport command",
2429                 .type           = P_STRING,
2430                 .p_class        = P_GLOBAL,
2431                 .offset         = GLOBAL_VAR(szAddPortCommand),
2432                 .special        = NULL,
2433                 .enum_list      = NULL,
2434                 .flags          = FLAG_ADVANCED,
2435         },
2436         {
2437                 .label          = "enumports command",
2438                 .type           = P_STRING,
2439                 .p_class        = P_GLOBAL,
2440                 .offset         = GLOBAL_VAR(szEnumPortsCommand),
2441                 .special        = NULL,
2442                 .enum_list      = NULL,
2443                 .flags          = FLAG_ADVANCED,
2444         },
2445         {
2446                 .label          = "addprinter command",
2447                 .type           = P_STRING,
2448                 .p_class        = P_GLOBAL,
2449                 .offset         = GLOBAL_VAR(szAddPrinterCommand),
2450                 .special        = NULL,
2451                 .enum_list      = NULL,
2452                 .flags          = FLAG_ADVANCED,
2453         },
2454         {
2455                 .label          = "deleteprinter command",
2456                 .type           = P_STRING,
2457                 .p_class        = P_GLOBAL,
2458                 .offset         = GLOBAL_VAR(szDeletePrinterCommand),
2459                 .special        = NULL,
2460                 .enum_list      = NULL,
2461                 .flags          = FLAG_ADVANCED,
2462         },
2463         {
2464                 .label          = "show add printer wizard",
2465                 .type           = P_BOOL,
2466                 .p_class        = P_GLOBAL,
2467                 .offset         = GLOBAL_VAR(bMsAddPrinterWizard),
2468                 .special        = NULL,
2469                 .enum_list      = NULL,
2470                 .flags          = FLAG_ADVANCED,
2471         },
2472         {
2473                 .label          = "os2 driver map",
2474                 .type           = P_STRING,
2475                 .p_class        = P_GLOBAL,
2476                 .offset         = GLOBAL_VAR(szOs2DriverMap),
2477                 .special        = NULL,
2478                 .enum_list      = NULL,
2479                 .flags          = FLAG_ADVANCED,
2480         },
2481
2482         {
2483                 .label          = "printer name",
2484                 .type           = P_STRING,
2485                 .p_class        = P_LOCAL,
2486                 .offset         = LOCAL_VAR(szPrintername),
2487                 .special        = NULL,
2488                 .enum_list      = NULL,
2489                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2490         },
2491         {
2492                 .label          = "printer",
2493                 .type           = P_STRING,
2494                 .p_class        = P_LOCAL,
2495                 .offset         = LOCAL_VAR(szPrintername),
2496                 .special        = NULL,
2497                 .enum_list      = NULL,
2498                 .flags          = FLAG_HIDE,
2499         },
2500         {
2501                 .label          = "use client driver",
2502                 .type           = P_BOOL,
2503                 .p_class        = P_LOCAL,
2504                 .offset         = LOCAL_VAR(bUseClientDriver),
2505                 .special        = NULL,
2506                 .enum_list      = NULL,
2507                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2508         },
2509         {
2510                 .label          = "default devmode",
2511                 .type           = P_BOOL,
2512                 .p_class        = P_LOCAL,
2513                 .offset         = LOCAL_VAR(bDefaultDevmode),
2514                 .special        = NULL,
2515                 .enum_list      = NULL,
2516                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2517         },
2518         {
2519                 .label          = "force printername",
2520                 .type           = P_BOOL,
2521                 .p_class        = P_LOCAL,
2522                 .offset         = LOCAL_VAR(bForcePrintername),
2523                 .special        = NULL,
2524                 .enum_list      = NULL,
2525                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2526         },
2527         {
2528                 .label          = "printjob username",
2529                 .type           = P_STRING,
2530                 .p_class        = P_LOCAL,
2531                 .offset         = LOCAL_VAR(szPrintjobUsername),
2532                 .special        = NULL,
2533                 .enum_list      = NULL,
2534                 .flags          = FLAG_ADVANCED | FLAG_PRINT,
2535         },
2536
2537         {N_("Filename Handling"), P_SEP, P_SEPARATOR},
2538
2539         {
2540                 .label          = "mangling method",
2541                 .type           = P_STRING,
2542                 .p_class        = P_GLOBAL,
2543                 .offset         = GLOBAL_VAR(szManglingMethod),
2544                 .special        = NULL,
2545                 .enum_list      = NULL,
2546                 .flags          = FLAG_ADVANCED,
2547         },
2548         {
2549                 .label          = "mangle prefix",
2550                 .type           = P_INTEGER,
2551                 .p_class        = P_GLOBAL,
2552                 .offset         = GLOBAL_VAR(mangle_prefix),
2553                 .special        = NULL,
2554                 .enum_list      = NULL,
2555                 .flags          = FLAG_ADVANCED,
2556         },
2557
2558         {
2559                 .label          = "default case",
2560                 .type           = P_ENUM,
2561                 .p_class        = P_LOCAL,
2562                 .offset         = LOCAL_VAR(iDefaultCase),
2563                 .special        = NULL,
2564                 .enum_list      = enum_case,
2565                 .flags          = FLAG_ADVANCED | FLAG_SHARE,
2566         },
2567         {
2568                 .label          = "case sensitive",
2569                 .type           = P_ENUM,
2570                 .p_class        = P_LOCAL,
2571                 .offset         = LOCAL_VAR(iCaseSensitive),
2572                 .special        = NULL,
2573                 .enum_list      = enum_bool_auto,
2574                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2575         },
2576         {
2577                 .label          = "casesignames",
2578                 .type           = P_ENUM,
2579                 .p_class        = P_LOCAL,
2580                 .offset         = LOCAL_VAR(iCaseSensitive),
2581                 .special        = NULL,
2582                 .enum_list      = enum_bool_auto,
2583                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL | FLAG_HIDE,
2584         },
2585         {
2586                 .label          = "preserve case",
2587                 .type           = P_BOOL,
2588                 .p_class        = P_LOCAL,
2589                 .offset         = LOCAL_VAR(bCasePreserve),
2590                 .special        = NULL,
2591                 .enum_list      = NULL,
2592                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2593         },
2594         {
2595                 .label          = "short preserve case",
2596                 .type           = P_BOOL,
2597                 .p_class        = P_LOCAL,
2598                 .offset         = LOCAL_VAR(bShortCasePreserve),
2599                 .special        = NULL,
2600                 .enum_list      = NULL,
2601                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2602         },
2603         {
2604                 .label          = "mangling char",
2605                 .type           = P_CHAR,
2606                 .p_class        = P_LOCAL,
2607                 .offset         = LOCAL_VAR(magic_char),
2608                 .special        = NULL,
2609                 .enum_list      = NULL,
2610                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2611         },
2612         {
2613                 .label          = "hide dot files",
2614                 .type           = P_BOOL,
2615                 .p_class        = P_LOCAL,
2616                 .offset         = LOCAL_VAR(bHideDotFiles),
2617                 .special        = NULL,
2618                 .enum_list      = NULL,
2619                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2620         },
2621         {
2622                 .label          = "hide special files",
2623                 .type           = P_BOOL,
2624                 .p_class        = P_LOCAL,
2625                 .offset         = LOCAL_VAR(bHideSpecialFiles),
2626                 .special        = NULL,
2627                 .enum_list      = NULL,
2628                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2629         },
2630         {
2631                 .label          = "hide unreadable",
2632                 .type           = P_BOOL,
2633                 .p_class        = P_LOCAL,
2634                 .offset         = LOCAL_VAR(bHideUnReadable),
2635                 .special        = NULL,
2636                 .enum_list      = NULL,
2637                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2638         },
2639         {
2640                 .label          = "hide unwriteable files",
2641                 .type           = P_BOOL,
2642                 .p_class        = P_LOCAL,
2643                 .offset         = LOCAL_VAR(bHideUnWriteableFiles),
2644                 .special        = NULL,
2645                 .enum_list      = NULL,
2646                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2647         },
2648         {
2649                 .label          = "delete veto files",
2650                 .type           = P_BOOL,
2651                 .p_class        = P_LOCAL,
2652                 .offset         = LOCAL_VAR(bDeleteVetoFiles),
2653                 .special        = NULL,
2654                 .enum_list      = NULL,
2655                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2656         },
2657         {
2658                 .label          = "veto files",
2659                 .type           = P_STRING,
2660                 .p_class        = P_LOCAL,
2661                 .offset         = LOCAL_VAR(szVetoFiles),
2662                 .special        = NULL,
2663                 .enum_list      = NULL,
2664                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2665         },
2666         {
2667                 .label          = "hide files",
2668                 .type           = P_STRING,
2669                 .p_class        = P_LOCAL,
2670                 .offset         = LOCAL_VAR(szHideFiles),
2671                 .special        = NULL,
2672                 .enum_list      = NULL,
2673                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2674         },
2675         {
2676                 .label          = "veto oplock files",
2677                 .type           = P_STRING,
2678                 .p_class        = P_LOCAL,
2679                 .offset         = LOCAL_VAR(szVetoOplockFiles),
2680                 .special        = NULL,
2681                 .enum_list      = NULL,
2682                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2683         },
2684         {
2685                 .label          = "map archive",
2686                 .type           = P_BOOL,
2687                 .p_class        = P_LOCAL,
2688                 .offset         = LOCAL_VAR(bMap_archive),
2689                 .special        = NULL,
2690                 .enum_list      = NULL,
2691                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2692         },
2693         {
2694                 .label          = "map hidden",
2695                 .type           = P_BOOL,
2696                 .p_class        = P_LOCAL,
2697                 .offset         = LOCAL_VAR(bMap_hidden),
2698                 .special        = NULL,
2699                 .enum_list      = NULL,
2700                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2701         },
2702         {
2703                 .label          = "map system",
2704                 .type           = P_BOOL,
2705                 .p_class        = P_LOCAL,
2706                 .offset         = LOCAL_VAR(bMap_system),
2707                 .special        = NULL,
2708                 .enum_list      = NULL,
2709                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2710         },
2711         {
2712                 .label          = "map readonly",
2713                 .type           = P_ENUM,
2714                 .p_class        = P_LOCAL,
2715                 .offset         = LOCAL_VAR(iMap_readonly),
2716                 .special        = NULL,
2717                 .enum_list      = enum_map_readonly,
2718                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2719         },
2720         {
2721                 .label          = "mangled names",
2722                 .type           = P_BOOL,
2723                 .p_class        = P_LOCAL,
2724                 .offset         = LOCAL_VAR(bMangledNames),
2725                 .special        = NULL,
2726                 .enum_list      = NULL,
2727                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2728         },
2729         {
2730                 .label          = "max stat cache size",
2731                 .type           = P_INTEGER,
2732                 .p_class        = P_GLOBAL,
2733                 .offset         = GLOBAL_VAR(iMaxStatCacheSize),
2734                 .special        = NULL,
2735                 .enum_list      = NULL,
2736                 .flags          = FLAG_ADVANCED,
2737         },
2738         {
2739                 .label          = "stat cache",
2740                 .type           = P_BOOL,
2741                 .p_class        = P_GLOBAL,
2742                 .offset         = GLOBAL_VAR(bStatCache),
2743                 .special        = NULL,
2744                 .enum_list      = NULL,
2745                 .flags          = FLAG_ADVANCED,
2746         },
2747         {
2748                 .label          = "store dos attributes",
2749                 .type           = P_BOOL,
2750                 .p_class        = P_LOCAL,
2751                 .offset         = LOCAL_VAR(bStoreDosAttributes),
2752                 .special        = NULL,
2753                 .enum_list      = NULL,
2754                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2755         },
2756         {
2757                 .label          = "dmapi support",
2758                 .type           = P_BOOL,
2759                 .p_class        = P_LOCAL,
2760                 .offset         = LOCAL_VAR(bDmapiSupport),
2761                 .special        = NULL,
2762                 .enum_list      = NULL,
2763                 .flags          = FLAG_ADVANCED | FLAG_SHARE | FLAG_GLOBAL,
2764         },
2765
2766
2767         {N_("Domain Options"), P_SEP, P_SEPARATOR},
2768
2769         {
2770                 .label          = "machine password timeout",
2771                 .type           = P_INTEGER,
2772                 .p_class        = P_GLOBAL,
2773                 .offset         = GLOBAL_VAR(machine_password_timeout),
2774                 .special        = NULL,
2775                 .enum_list      = NULL,
2776                 .flags          = FLAG_ADVANCED | FLAG_WIZARD,
2777         },
2778
2779         {N_("Logon Options"), P_SEP, P_SEPARATOR},
2780
2781         {
2782                 .label          = "add user script",
2783                 .type           = P_STRING,
2784                 .p_class        = P_GLOBAL,
2785                 .offset         = GLOBAL_VAR(szAddUserScript),
2786                 .special        = NULL,
2787                 .enum_list      = NULL,
2788                 .flags          = FLAG_ADVANCED,
2789         },
2790         {
2791                 .label          = "rename user script",
2792                 .type           = P_STRING,
2793                 .p_class        = P_GLOBAL,
2794                 .offset         = GLOBAL_VAR(szRenameUserScript),
2795                 .special        = NULL,
2796                 .enum_list      = NULL,
2797                 .flags          = FLAG_ADVANCED,
2798         },
2799         {
2800                 .label          = "delete user script",
2801                 .type           = P_STRING,
2802                 .p_class        = P_GLOBAL,
2803                 .offset         = GLOBAL_VAR(szDelUserScript),
2804                 .special        = NULL,
2805                 .enum_list      = NULL,
2806                 .flags          = FLAG_ADVANCED,
2807         },
2808         {
2809                 .label          = "add group script",
2810                 .type           = P_STRING,
2811                 .p_class        = P_GLOBAL,
2812                 .offset         = GLOBAL_VAR(szAddGroupScript),
2813                 .special        = NULL,
2814                 .enum_list      = NULL,
2815                 .flags          = FLAG_ADVANCED,