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