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