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