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