[PART4] [PATCHES] generate the param_table (FINALLY)

Michael Adam obnox at samba.org
Fri Jul 24 00:13:07 UTC 2015


So here is finally the last patchset in this series.

It removes our committed param_table and has it
generated from the docs.

I have arranged the patches in such a way that
an intermediate state proves that the generated table
is correct before removing the static one:

- split out the committed struct into param_table_static.c
  and include it in param_table.c
- add the autogeneration to param_table_gen.c
- add a test to verify that the tables are identical
  (modulo order)
- switch the include to use the generated table
- remove all tests that use the static table
- remove the generated table
- update documentation.

One thing that I might imagine autogeneration
in the future is setting of the default values.
This is now the only part that is not generated
from the docs at this point. But usually, we now
only need to touch one xml file to add or change
a parameter. :-)

Review appreciated.

Cheers - Michael


On 2015-07-24 at 02:02 +0200, Michael Adam wrote:
> Update on part3:
> I forgot a patch to update the docs test with
> knowledge about the new types.
> (didn't notice before sending the patches because
> I had a patch on top that only ran one of the tests...;)
> 
> Here is the updated patchset that incorporates this
> additional patch.
> 
> The other patches remain unchanged.
> 
> Thanks for considering - Michael
> 
> 
> On 2015-07-23 at 21:00 +0200, Michael Adam wrote:
> > Attached is, on top of the two previous patchsets,
> > the third patchset.
> > 
> > It contains the final set of consolidations and
> > systematizations, needed to correctly generate
> > the param table.
> > 
> > The changes basically add needed attributes to
> > the metadata in the docs and fill/correct some
> > settings in the param_table, so that my generated
> > param_table is identical to the committed one.
> > 
> > Review appreciated!
> > 
> > The next (and last) set of patches will be
> > the genration of the param_table.
> > 
> > Cheers - Michael
> > 

-------------- next part --------------
From 15c768dc078bc125fde5ef94820d09e717c0e0d6 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 18:37:00 +0200
Subject: [PATCH 01/14] param: move the actual table out into
 param_table_static.c

Signed-off-by: Michael Adam <obnox at samba.org>
---
 lib/param/param_table.c                           | 3734 +--------------------
 lib/param/{param_table.c => param_table_static.c} |  291 +-
 python/samba/tests/docs.py                        |    2 +-
 3 files changed, 5 insertions(+), 4022 deletions(-)
 copy lib/param/{param_table.c => param_table_static.c} (90%)

diff --git a/lib/param/param_table.c b/lib/param/param_table.c
index cefc6ce..372cd37 100644
--- a/lib/param/param_table.c
+++ b/lib/param/param_table.c
@@ -282,3739 +282,7 @@ static const struct enum_list enum_case[] = {
 #define GLOBAL_VAR(name) offsetof(struct loadparm_global, name)
 #define LOCAL_VAR(name) offsetof(struct loadparm_service, name)
 
-
-struct parm_struct parm_table[] = {
-	{
-		.label		= "dos charset",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dos_charset),
-		.special	= handle_dos_charset,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "unix charset",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unix_charset),
-		.special	= handle_charset,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "comment",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(comment),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "path",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(path),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(path),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "workgroup",
-		.type		= P_USTRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(workgroup),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "realm",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(realm),
-		.special	= handle_realm,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "netbios name",
-		.type		= P_USTRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(netbios_name),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "netbios aliases",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(netbios_aliases),
-		.special	= handle_netbios_aliases,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "netbios scope",
-		.type		= P_USTRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(netbios_scope),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "server string",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_string),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "interfaces",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(interfaces),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "bind interfaces only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(bind_interfaces_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "config backend",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(config_backend),
-		.special	= NULL,
-		.enum_list	= enum_config_backend,
-	},
-	{
-		.label		= "server role",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_server_role),
-		.special	= NULL,
-		.enum_list	= enum_server_role,
-	},
-	{
-		.label		= "security",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_security),
-		.special	= NULL,
-		.enum_list	= enum_security,
-	},
-	{
-		.label		= "auth methods",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(auth_methods),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "encrypt passwords",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(encrypt_passwords),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client schannel",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_schannel),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "server schannel",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_schannel),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "allow trusted domains",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_trusted_domains),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map to guest",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(map_to_guest),
-		.special	= NULL,
-		.enum_list	= enum_map_to_guest,
-	},
-	{
-		.label		= "null passwords",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(null_passwords),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "old password allowed period",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(old_password_allowed_period),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "obey pam restrictions",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(obey_pam_restrictions),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "password server",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(password_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb passwd file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb_passwd_file),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "private dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(private_dir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "private directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(private_dir),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "passdb backend",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passdb_backend),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "algorithmic rid base",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(algorithmic_rid_base),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(root_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(root_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "root",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(root_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "guest account",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(guest_account),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enable privileges",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enable_privileges),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-
-	{
-		.label		= "pam password change",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(pam_password_change),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd program",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_program),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd chat",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_chat),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd chat debug",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_chat_debug),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd chat timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_chat_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "check password script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(check_password_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username level",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_level),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "unix password sync",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unix_password_sync),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "restrict anonymous",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(restrict_anonymous),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lanman auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lanman_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ntlm auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ntlm_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client NTLMv2 auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_ntlmv2_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client lanman auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_lanman_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client plaintext auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_plaintext_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client use spnego principal",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_use_spnego_principal),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "username",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(username),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "user",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(username),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "users",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(username),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "invalid users",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(invalid_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "valid users",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(valid_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "admin users",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(admin_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "read list",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write list",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(write_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force user",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_user),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force group",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_group),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "group",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_group),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "read only",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "spotlight",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(spotlight),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write ok",
-		.type		= P_BOOLREV,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "writeable",
-		.type		= P_BOOLREV,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "writable",
-		.type		= P_BOOLREV,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "acl check permissions",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_check_permissions),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "acl group control",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_group_control),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "acl map full control",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_map_full_control),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "acl allow execute always",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_allow_execute_always),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "create mask",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(create_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "create mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(create_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "force create mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_create_mode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory mask",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(directory_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(directory_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "force directory mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_directory_mode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force unknown acl user",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_unknown_acl_user),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "inherit permissions",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(inherit_permissions),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "inherit acls",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(inherit_acls),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "inherit owner",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(inherit_owner),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "guest only",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "only guest",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "administrative share",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(administrative_share),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "guest ok",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_ok),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "public",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_ok),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "only user",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(only_user),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "hosts allow",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_allow),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allow hosts",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_allow),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "hosts deny",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_deny),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "deny hosts",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_deny),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "preload modules",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(preload_modules),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dedicated keytab file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dedicated_keytab_file),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kerberos method",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(kerberos_method),
-		.special	= NULL,
-		.enum_list	= enum_kerberos_method,
-	},
-	{
-		.label		= "map untrusted to domain",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(map_untrusted_to_domain),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "log level",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_level),
-		.special	= handle_debug_list,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debuglevel",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_level),
-		.special	= handle_debug_list,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "syslog",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(syslog),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "syslog only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(syslog_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "log file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logfile),
-		.special	= handle_logfile,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logging",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logging),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max log size",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_log_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug timestamp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(timestamp_logs),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "timestamp logs",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(timestamp_logs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug prefix timestamp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_prefix_timestamp),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug hires timestamp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_hires_timestamp),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug pid",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_pid),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug uid",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_uid),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug class",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_class),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enable core files",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enable_core_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allocation roundup size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(allocation_roundup_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "aio read size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(aio_read_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "aio write size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(aio_write_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "aio write behind",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(aio_write_behind),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb ports",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb_ports),
-		.special	= handle_smb_ports,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "large readwrite",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(large_readwrite),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "server max protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "max protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "server min protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_min_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "min protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_min_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "client max protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_client_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "client min protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_min_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "unicode",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unicode),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "min receivefile size",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(min_receivefile_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "read raw",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(read_raw),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write raw",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(write_raw),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "disable netbios",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(disable_netbios),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "reset on zero vc",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(reset_on_zero_vc),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "log writeable files on exit",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_writeable_files_on_exit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "defer sharing violations",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(defer_sharing_violations),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ea support",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(ea_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nt acl support",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(nt_acl_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nt pipe support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nt_pipe_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nt status support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nt_status_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smbd profiling level",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smbd_profiling_level),
-		.special	= NULL,
-		.enum_list	= enum_smbd_profiling_level,
-	},
-	{
-		.label		= "profile acls",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(profile_acls),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map acl inherit",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_acl_inherit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "afs share",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(afs_share),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max mux",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_mux),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max xmit",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_xmit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "name resolve order",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(name_resolve_order),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max ttl",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_ttl),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max wins ttl",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_wins_ttl),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "min wins ttl",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(min_wins_ttl),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "time server",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(time_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "unix extensions",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unix_extensions),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "use spnego",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(use_spnego),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "client signing",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_signing),
-		.special	= NULL,
-		.enum_list	= enum_smb_signing_vals,
-	},
-	{
-		.label		= "server signing",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_signing),
-		.special	= NULL,
-		.enum_list	= enum_smb_signing_vals,
-	},
-	{
-		.label		= "smb encrypt",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(smb_encrypt),
-		.special	= NULL,
-		.enum_list	= enum_smb_signing_vals,
-	},
-	{
-		.label		= "client use spnego",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_use_spnego),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client ldap sasl wrapping",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_ldap_sasl_wrapping),
-		.special	= NULL,
-		.enum_list	= enum_ldap_sasl_wrapping,
-	},
-	{
-		.label		= "enable asu support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enable_asu_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "svcctl list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(svcctl_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cldap port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cldap_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "dgram port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dgram_port),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags          = FLAG_DEPRECATED
-	},
-	{
-		.label		= "nbt port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nbt_port),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags          = FLAG_DEPRECATED
-	},
-	{
-		.label		= "krb5 port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(krb5_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "kpasswd port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(kpasswd_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "web port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(web_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "rpc big endian",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(rpc_big_endian),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "durable handles",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(durable_handles),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "block size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(block_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "deadtime",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(deadtime),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "getwd cache",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(getwd_cache),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "keepalive",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(keepalive),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "change notify",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(change_notify),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory name cache size",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(directory_name_cache_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kernel change notify",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(kernel_change_notify),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lpq cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lpq_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max smbd processes",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_smbd_processes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max connections",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(max_connections),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max disk size",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_disk_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max open files",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_open_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "min print space",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(min_print_space),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "socket options",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(socket_options),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict allocate",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_allocate),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict rename",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_rename),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict sync",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_sync),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "sync always",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(sync_always),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "use mmap",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(use_mmap),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "use sendfile",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(_use_sendfile),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hostname lookups",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(hostname_lookups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write cache size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(write_cache_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "name cache timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(name_cache_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ctdbd socket",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ctdbd_socket),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cluster addresses",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cluster_addresses),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "clustering",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(clustering),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ctdb timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ctdb_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ctdb locktime warn threshold",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ctdb_locktime_warn_threshold),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max read",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_read),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max write",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_write),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max trans",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_trans),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max credits",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_credits),
-		.special	= handle_smb2_max_credits,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max reported print jobs",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(max_reported_print_jobs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max print jobs",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(max_print_jobs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "load printers",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(load_printers),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printcap cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(printcap_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printcap name",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(printcap_name),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printcap",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(printcap_name),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "printable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printable),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "print notify backchannel",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(print_notify_backchannel),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "print ok",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printable),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "printing",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printing),
-		.special	= handle_printing,
-		.enum_list	= enum_printing,
-	},
-	{
-		.label		= "cups options",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(cups_options),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cups server",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cups_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label          = "cups encrypt",
-		.type           = P_ENUM,
-		.p_class        = P_GLOBAL,
-		.offset         = GLOBAL_VAR(cups_encrypt),
-		.special        = NULL,
-		.enum_list      = enum_bool_auto,
-	},
-	{
-
-		.label		= "cups connection timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cups_connection_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "iprint server",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(iprint_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "print command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(print_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "disable spoolss",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_disable_spoolss),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enable spoolss",
-		.type		= P_BOOLREV,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_disable_spoolss),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "lpq command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lpq_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lprm command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lprm_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lppause command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lppause_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lpresume command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lpresume_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "queuepause command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(queuepause_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "queueresume command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(queueresume_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "addport command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(addport_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enumports command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enumports_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "addprinter command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(addprinter_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "deleteprinter command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(deleteprinter_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "show add printer wizard",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(show_add_printer_wizard),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "os2 driver map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(os2_driver_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "printer name",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(_printername),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printer",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(_printername),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "use client driver",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(use_client_driver),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "default devmode",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(default_devmode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force printername",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_printername),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printjob username",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printjob_username),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "mangling method",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(mangling_method),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "mangle prefix",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(mangle_prefix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "default case",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(default_case),
-		.special	= NULL,
-		.enum_list	= enum_case,
-	},
-	{
-		.label		= "case sensitive",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(case_sensitive),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "casesignames",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(case_sensitive),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "preserve case",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preserve_case),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "short preserve case",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(short_preserve_case),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "mangling char",
-		.type		= P_CHAR,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(mangling_char),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide dot files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_dot_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide special files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_special_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide unreadable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_unreadable),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide unwriteable files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_unwriteable_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete veto files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(delete_veto_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "veto files",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(veto_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide files",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "veto oplock files",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(veto_oplock_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map archive",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_archive),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map hidden",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_hidden),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map system",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_system),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map readonly",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_readonly),
-		.special	= NULL,
-		.enum_list	= enum_map_readonly,
-	},
-	{
-		.label		= "mangled names",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(mangled_names),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max stat cache size",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_stat_cache_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "stat cache",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(stat_cache),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "store dos attributes",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(store_dos_attributes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dmapi support",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dmapi_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "machine password timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(machine_password_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add user script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_user_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "rename user script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(rename_user_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete user script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_user_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add user to group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_user_to_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete user from group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_user_from_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "set primary group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(set_primary_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add machine script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_machine_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "shutdown script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(shutdown_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "abort shutdown script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(abort_shutdown_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username map script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_map_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username map cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_map_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon path",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_path),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon drive",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_drive),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon home",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_home),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "domain logons",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_domain_logons),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "init logon delayed hosts",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(init_logon_delayed_hosts),
-		.special        = NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "init logon delay",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(init_logon_delay),
-		.special        = NULL,
-		.enum_list	= NULL,
-
-	},
-	{
-		.label		= "os level",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(os_level),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lm announce",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lm_announce),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "lm interval",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lm_interval),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "preferred master",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_preferred_master),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "prefered master",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_preferred_master),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "local master",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(local_master),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "domain master",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_domain_master),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "browse list",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(browse_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "browseable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(browseable),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "browsable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(browseable),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "access based share enum",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(access_based_share_enum),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enhanced browsing",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enhanced_browsing),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dns proxy",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_dns_proxy),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins proxy",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_proxy),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins server",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_server_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(we_are_a_wins_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins hook",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_hook),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "blocking locks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(blocking_locks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "csc policy",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(csc_policy),
-		.special	= NULL,
-		.enum_list	= enum_csc_policy,
-	},
-	{
-		.label		= "fake oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(fake_oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kernel oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(kernel_oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kernel share modes",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(kernel_share_modes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 leases",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_leases),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "locking",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(locking),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lock spin time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lock_spin_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "level2 oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(level2_oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "oplock break wait time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(oplock_break_wait_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "oplock contention limit",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(oplock_contention_limit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "posix locking",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(posix_locking),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict locking",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_locking),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "ldap admin dn",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_admin_dn),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap delete dn",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_delete_dn),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap group suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_group_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap idmap suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_idmap_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap machine suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_machine_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap passwd sync",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_passwd_sync),
-		.special	= NULL,
-		.enum_list	= enum_ldap_passwd_sync,
-	},
-	{
-		.label		= "ldap password sync",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_passwd_sync),
-		.special	= NULL,
-		.enum_list	= enum_ldap_passwd_sync,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "ldap replication sleep",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_replication_sleep),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap ssl",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_ssl),
-		.special	= NULL,
-		.enum_list	= enum_ldap_ssl,
-	},
-	{
-		.label		= "ldap ssl ads",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_ssl_ads),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap deref",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_deref),
-		.special	= NULL,
-		.enum_list	= enum_ldap_deref,
-	},
-	{
-		.label		= "ldap follow referral",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_follow_referral),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "ldap timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap connection timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_connection_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap page size",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_page_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap user suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_user_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap debug level",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_debug_level),
-		.special	= handle_ldap_debug_level,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap debug threshold",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_debug_threshold),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "eventlog list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(eventlog_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add share command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_share_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "change share command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(change_share_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete share command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_share_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "config file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(next_configfile),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "preload",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(auto_services),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "auto services",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(auto_services),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lock directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lock_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lock dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lock_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "state directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(state_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cache directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cache_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "pid directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(pid_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ntp signd socket directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ntp_signd_socket_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-#ifdef WITH_UTMP
-	{
-		.label		= "utmp directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(utmp_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wtmp directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wtmp_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "utmp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(utmp),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-#endif
-	{
-		.label		= "default service",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(defaultservice),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "default",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(defaultservice),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "message command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(message_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dfree cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dfree_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dfree command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dfree_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "get quota command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(get_quota_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "set quota command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(set_quota_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "remote announce",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(remote_announce),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "remote browse sync",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(remote_browse_sync),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nbt client socket address",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nbt_client_socket_address),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "socket address",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nbt_client_socket_address),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "nmbd bind explicit broadcast",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nmbd_bind_explicit_broadcast),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "homedir map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(homedir_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "afs username map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(afs_username_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "afs token lifetime",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(afs_token_lifetime),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "log nt token command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_nt_token_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "NIS homedir",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nis_homedir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "-valid",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(valid),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "copy",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(copy),
-		.special	= handle_copy,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "include",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(include),
-		.special	= handle_include,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "preexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "exec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "preexec close",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preexec_close),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "postexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(postexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root preexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(root_preexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root preexec close",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(root_preexec_close),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root postexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(root_postexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "available",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(available),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "registry shares",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(registry_shares),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare allow guests",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_allow_guests),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare max shares",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_max_shares),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare owner only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_owner_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare path",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_path),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare prefix allow list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_prefix_allow_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare prefix deny list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_prefix_deny_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare template share",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_template_share),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "volume",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(volume),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "fstype",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(fstype),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allow insecure wide links",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_insecure_wide_links),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wide links",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(wide_links),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "follow symlinks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(follow_symlinks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dont descend",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dont_descend),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "magic script",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(magic_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "magic output",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(magic_output),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete readonly",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(delete_readonly),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dos filemode",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dos_filemode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dos filetimes",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dos_filetimes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dos filetime resolution",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dos_filetime_resolution),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "fake directory create times",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(fake_directory_create_times),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "async smb echo handler",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(async_smb_echo_handler),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "panic action",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(panic_action),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "perfcount module",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(perfcount_module),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "vfs objects",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(vfs_objects),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "vfs object",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(vfs_objects),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "msdfs root",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(msdfs_root),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "msdfs proxy",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(msdfs_proxy),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "msdfs shuffle referrals",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(msdfs_shuffle_referrals),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "host msdfs",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(host_msdfs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passdb expand explicit",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passdb_expand_explicit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "idmap backend",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_backend),
-		.special	= handle_idmap_backend,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "idmap cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "idmap negative cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_negative_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "idmap uid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_uid),
-		.special	= handle_idmap_uid,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "winbind uid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_uid),
-		.special	= handle_idmap_uid,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "idmap gid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_gid),
-		.special	= handle_idmap_gid,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "winbind gid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_gid),
-		.special	= handle_idmap_gid,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "template homedir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(template_homedir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "template shell",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(template_shell),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind separator",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_separator),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind reconnect delay",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_reconnect_delay),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind request timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_request_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind max clients",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_max_clients),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind enum users",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_enum_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind enum groups",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_enum_groups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind use default domain",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_use_default_domain),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind trusted domains only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_trusted_domains_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind nested groups",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_nested_groups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind expand groups",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_expand_groups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind nss info",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_nss_info),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind refresh tickets",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_refresh_tickets),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind offline logon",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_offline_logon),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind normalize names",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_normalize_names),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind rpc only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_rpc_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "create krb5 conf",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(create_krb5_conf),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ncalrpc dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ncalrpc_dir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind max domain connections",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_winbind_max_domain_connections),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbindd socket directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbindd_socket_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbindd privileged socket directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbindd_privileged_socket_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind sealed pipes",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_sealed_pipes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "neutralize nt4 emulation",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(neutralize_nt4_emulation),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "reject md5 servers",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(reject_md5_servers),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "require strong key",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(require_strong_key),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allow dns updates",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_dns_updates),
-		.special	= NULL,
-		.enum_list	= enum_dns_update_settings,
-	},
-	{
-		.label		= "dns forwarder",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dns_forwarder),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dns update command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dns_update_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nsupdate command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nsupdate_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "rndc command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(rndc_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "multicast dns register",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(multicast_dns_register),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "samba kcc command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(samba_kcc_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "server services",
-		.type		= P_LIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_services),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "dcerpc endpoint servers",
-		.type		= P_LIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dcerpc_endpoint_servers),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "spn update command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(spn_update_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "share backend",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(share_backend),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "ntvfs handler",
-		.type		= P_LIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(ntvfs_handler),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "allow nt4 crypto",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_nt4_crypto),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "reject md5 clients",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(reject_md5_clients),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "tls enabled",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(tls_enabled),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls keyfile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_keyfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls certfile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_certfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls cafile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_cafile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls crlfile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_crlfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls dh params file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_dhpfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls priority",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(tls_priority),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-
-	{NULL,  P_BOOL,  P_NONE,  0,  NULL,  NULL,  0}
-};
+#include "lib/param/param_table_static.c"
 
 int num_parameters(void)
 {
diff --git a/lib/param/param_table.c b/lib/param/param_table_static.c
similarity index 90%
copy from lib/param/param_table.c
copy to lib/param/param_table_static.c
index cefc6ce..fab0cac 100644
--- a/lib/param/param_table.c
+++ b/lib/param/param_table_static.c
@@ -1,287 +1,5 @@
-/*
-   Unix SMB/CIFS implementation.
-   Parameter loading functions
-   Copyright (C) Karl Auer 1993-1998
-
-   Largely re-written by Andrew Tridgell, September 1994
-
-   Copyright (C) Simo Sorce 2001
-   Copyright (C) Alexander Bokovoy 2002
-   Copyright (C) Stefan (metze) Metzmacher 2002
-   Copyright (C) Jim McDonough <jmcd at us.ibm.com> 2003
-   Copyright (C) Michael Adam 2008
-   Copyright (C) Jelmer Vernooij <jelmer at samba.org> 2007
-   Copyright (C) Andrew Bartlett 2011
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "includes.h"
-#include "lib/param/param.h"
-#include "lib/param/loadparm.h"
-#include "lib/param/param_global.h"
-#include "libcli/smb/smb_constants.h"
-
-#ifndef N_
-#define N_(x) x
-#endif
-
-static const struct enum_list enum_protocol[] = {
-	{PROTOCOL_DEFAULT, "default"}, /* the caller decides what this means */
-	{PROTOCOL_SMB2_10, "SMB2"}, /* for now keep PROTOCOL_SMB2_10 */
-	{PROTOCOL_SMB3_11, "SMB3"}, /* for now keep PROTOCOL_SMB3_11 */
-	{PROTOCOL_SMB3_11, "SMB3_11"},
-	{PROTOCOL_SMB3_10, "SMB3_10"},
-	{PROTOCOL_SMB3_02, "SMB3_02"},
-	{PROTOCOL_SMB3_00, "SMB3_00"},
-	{PROTOCOL_SMB2_24, "SMB2_24"},
-	{PROTOCOL_SMB2_22, "SMB2_22"},
-	{PROTOCOL_SMB2_10, "SMB2_10"},
-	{PROTOCOL_SMB2_02, "SMB2_02"},
-	{PROTOCOL_NT1, "NT1"},
-	{PROTOCOL_LANMAN2, "LANMAN2"},
-	{PROTOCOL_LANMAN1, "LANMAN1"},
-	{PROTOCOL_CORE, "CORE"},
-	{PROTOCOL_COREPLUS, "COREPLUS"},
-	{PROTOCOL_COREPLUS, "CORE+"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_security[] = {
-	{SEC_AUTO, "AUTO"},
-	{SEC_USER, "USER"},
-	{SEC_DOMAIN, "DOMAIN"},
-	{SEC_ADS, "ADS"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_bool_auto[] = {
-	{false, "No"},
-	{false, "False"},
-	{false, "0"},
-	{true, "Yes"},
-	{true, "True"},
-	{true, "1"},
-	{Auto, "Auto"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_csc_policy[] = {
-	{CSC_POLICY_MANUAL, "manual"},
-	{CSC_POLICY_DOCUMENTS, "documents"},
-	{CSC_POLICY_PROGRAMS, "programs"},
-	{CSC_POLICY_DISABLE, "disable"},
-	{-1, NULL}
-};
-
-/* Server role options */
-static const struct enum_list enum_server_role[] = {
-	{ROLE_AUTO, "auto"},
-	{ROLE_STANDALONE, "standalone server"},
-	{ROLE_STANDALONE, "standalone"},
-	{ROLE_DOMAIN_MEMBER, "member server"},
-	{ROLE_DOMAIN_MEMBER, "member"},
-	{ROLE_DOMAIN_PDC, "classic primary domain controller"},
-	{ROLE_DOMAIN_BDC, "classic backup domain controller"},
-	{ROLE_ACTIVE_DIRECTORY_DC, "active directory domain controller"},
-	{ROLE_ACTIVE_DIRECTORY_DC, "domain controller"},
-	{ROLE_ACTIVE_DIRECTORY_DC, "dc"},
-	{-1, NULL}
-};
-
-/* SMB signing types. */
-static const struct enum_list enum_smb_signing_vals[] = {
-	{SMB_SIGNING_DEFAULT, "default"},
-	{SMB_SIGNING_OFF, "No"},
-	{SMB_SIGNING_OFF, "False"},
-	{SMB_SIGNING_OFF, "0"},
-	{SMB_SIGNING_OFF, "Off"},
-	{SMB_SIGNING_OFF, "disabled"},
-	{SMB_SIGNING_IF_REQUIRED, "if_required"},
-	{SMB_SIGNING_IF_REQUIRED, "Yes"},
-	{SMB_SIGNING_IF_REQUIRED, "True"},
-	{SMB_SIGNING_IF_REQUIRED, "1"},
-	{SMB_SIGNING_IF_REQUIRED, "On"},
-	{SMB_SIGNING_IF_REQUIRED, "enabled"},
-	{SMB_SIGNING_IF_REQUIRED, "auto"},
-	{SMB_SIGNING_DESIRED, "desired"},
-	{SMB_SIGNING_REQUIRED, "required"},
-	{SMB_SIGNING_REQUIRED, "mandatory"},
-	{SMB_SIGNING_REQUIRED, "force"},
-	{SMB_SIGNING_REQUIRED, "forced"},
-	{SMB_SIGNING_REQUIRED, "enforced"},
-	{-1, NULL}
-};
-
-/* DNS update options. */
-static const struct enum_list enum_dns_update_settings[] = {
-	{DNS_UPDATE_OFF, "disabled"},
-	{DNS_UPDATE_OFF, "No"},
-	{DNS_UPDATE_OFF, "False"},
-	{DNS_UPDATE_OFF, "0"},
-	{DNS_UPDATE_OFF, "Off"},
-	{DNS_UPDATE_ON, "nonsecure and secure"},
-	{DNS_UPDATE_ON, "nonsecure"},
-	{DNS_UPDATE_SIGNED, "secure only"},
-	{DNS_UPDATE_SIGNED, "secure"},
-	{DNS_UPDATE_SIGNED, "signed"},
-	{-1, NULL}
-};
-
-/*
-   Do you want session setups at user level security with a invalid
-   password to be rejected or allowed in as guest? WinNT rejects them
-   but it can be a pain as it means "net view" needs to use a password
-
-   You have 3 choices in the setting of map_to_guest:
-
-   "Never" means session setups with an invalid password
-   are rejected. This is the default.
-
-   "Bad User" means session setups with an invalid password
-   are rejected, unless the username does not exist, in which case it
-   is treated as a guest login
-
-   "Bad Password" means session setups with an invalid password
-   are treated as a guest login
-
-   Note that map_to_guest only has an effect in user or server
-   level security.
-*/
-
-static const struct enum_list enum_map_to_guest[] = {
-	{NEVER_MAP_TO_GUEST, "Never"},
-	{MAP_TO_GUEST_ON_BAD_USER, "Bad User"},
-	{MAP_TO_GUEST_ON_BAD_PASSWORD, "Bad Password"},
-        {MAP_TO_GUEST_ON_BAD_UID, "Bad Uid"},
-	{-1, NULL}
-};
-
-/* Config backend options */
-
-static const struct enum_list enum_config_backend[] = {
-	{CONFIG_BACKEND_FILE, "file"},
-	{CONFIG_BACKEND_REGISTRY, "registry"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_smbd_profiling_level[] = {
-	{0, "off"}, {1, "count"}, {2, "on"}, {-1, NULL}
-};
-
-
-/* ADS kerberos ticket verification options */
-
-static const struct enum_list enum_kerberos_method[] = {
-	{KERBEROS_VERIFY_SECRETS, "default"},
-	{KERBEROS_VERIFY_SECRETS, "secrets only"},
-	{KERBEROS_VERIFY_SYSTEM_KEYTAB, "system keytab"},
-	{KERBEROS_VERIFY_DEDICATED_KEYTAB, "dedicated keytab"},
-	{KERBEROS_VERIFY_SECRETS_AND_KEYTAB, "secrets and keytab"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_printing[] = {
-	{PRINT_SYSV, "sysv"},
-	{PRINT_AIX, "aix"},
-	{PRINT_HPUX, "hpux"},
-	{PRINT_BSD, "bsd"},
-	{PRINT_QNX, "qnx"},
-	{PRINT_PLP, "plp"},
-	{PRINT_LPRNG, "lprng"},
-#ifdef HAVE_CUPS
-	{PRINT_CUPS, "cups"},
-#endif
-#ifdef HAVE_IPRINT
-	{PRINT_IPRINT, "iprint"},
-#endif
-	{PRINT_LPRNT, "nt"},
-	{PRINT_LPROS2, "os2"},
-#if defined(DEVELOPER) || defined(ENABLE_SELFTEST)
-	{PRINT_TEST, "test"},
-	{PRINT_VLP, "vlp"},
-#endif /* DEVELOPER */
-	{-1, NULL}
-};
-
-static const struct enum_list enum_ldap_sasl_wrapping[] = {
-	{0, "plain"},
-	{ADS_AUTH_SASL_SIGN, "sign"},
-	{ADS_AUTH_SASL_SEAL, "seal"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_ldap_ssl[] = {
-	{LDAP_SSL_OFF, "no"},
-	{LDAP_SSL_OFF, "off"},
-	{LDAP_SSL_START_TLS, "start tls"},
-	{LDAP_SSL_START_TLS, "start_tls"},
-	{-1, NULL}
-};
-
-/* LDAP Dereferencing Alias types */
-#define SAMBA_LDAP_DEREF_NEVER		0
-#define SAMBA_LDAP_DEREF_SEARCHING	1
-#define SAMBA_LDAP_DEREF_FINDING	2
-#define SAMBA_LDAP_DEREF_ALWAYS		3
-
-static const struct enum_list enum_ldap_deref[] = {
-	{SAMBA_LDAP_DEREF_NEVER, "never"},
-	{SAMBA_LDAP_DEREF_SEARCHING, "searching"},
-	{SAMBA_LDAP_DEREF_FINDING, "finding"},
-	{SAMBA_LDAP_DEREF_ALWAYS, "always"},
-	{-1, "auto"}
-};
-
-static const struct enum_list enum_ldap_passwd_sync[] = {
-	{LDAP_PASSWD_SYNC_OFF, "no"},
-	{LDAP_PASSWD_SYNC_OFF, "off"},
-	{LDAP_PASSWD_SYNC_ON, "yes"},
-	{LDAP_PASSWD_SYNC_ON, "on"},
-	{LDAP_PASSWD_SYNC_ONLY, "only"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_map_readonly[] = {
-	{MAP_READONLY_NO, "no"},
-	{MAP_READONLY_NO, "false"},
-	{MAP_READONLY_NO, "0"},
-	{MAP_READONLY_YES, "yes"},
-	{MAP_READONLY_YES, "true"},
-	{MAP_READONLY_YES, "1"},
-	{MAP_READONLY_PERMISSIONS, "permissions"},
-	{MAP_READONLY_PERMISSIONS, "perms"},
-	{-1, NULL}
-};
-
-static const struct enum_list enum_case[] = {
-	{CASE_LOWER, "lower"},
-	{CASE_UPPER, "upper"},
-	{-1, NULL}
-};
-
-
-/* Note: We do not initialise the defaults union - it is not allowed in ANSI C
- *
- * NOTE: Handling of duplicated (synonym) parameters:
- *   Parameters that are synonymous are stored in the same variable.
- *   All but the default spelling carry the flag FLAG_SYNONYM.
- */
-
-#define GLOBAL_VAR(name) offsetof(struct loadparm_global, name)
-#define LOCAL_VAR(name) offsetof(struct loadparm_service, name)
-
+#ifndef __PARAM_TABLE_STATIC_C__
+#define __PARAM_TABLE_STATIC_C__
 
 struct parm_struct parm_table[] = {
 	{
@@ -4016,7 +3734,4 @@ struct parm_struct parm_table[] = {
 	{NULL,  P_BOOL,  P_NONE,  0,  NULL,  NULL,  0}
 };
 
-int num_parameters(void)
-{
-	return (sizeof(parm_table) / sizeof(struct parm_struct));
-}
+#endif /* __PARAM_TABLE_STATIC_C__ */
diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index 112f89a..ded0c20 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -60,7 +60,7 @@ def get_documented_parameters(sourcedir):
 
 def get_implementation_parameters(sourcedir):
     # Reading entries from source code
-    f = open(os.path.join(sourcedir, "lib/param/param_table.c"), "r")
+    f = open(os.path.join(sourcedir, "lib/param/param_table_static.c"), "r")
     try:
         # burn through the preceding lines
         while True:
-- 
2.4.3


From bd0ca0823b663dca1145c7f5eadecff595841fc7 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 18 Jun 2015 07:37:24 +0200
Subject: [PATCH 02/14] generate_param: add a means to generate
 param_table_gen.c from the docs

This is triggered by the new argument PARAMTABLE.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 script/generate_param.py | 107 +++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 104 insertions(+), 3 deletions(-)

diff --git a/script/generate_param.py b/script/generate_param.py
index b71d3aa..611bafa 100644
--- a/script/generate_param.py
+++ b/script/generate_param.py
@@ -35,8 +35,8 @@ parser.add_option("-f", "--file", dest="filename",
                   help="input file", metavar="FILE")
 parser.add_option("-o", "--output", dest="output",
                   help='output file', metavar="FILE")
-parser.add_option("--mode", type="choice", metavar="<FUNCTIONS|S3PROTO|LIBPROTO|PARAMDEFS>",
-                 choices=["FUNCTIONS", "S3PROTO", "LIBPROTO", "PARAMDEFS"], default="FUNCTIONS")
+parser.add_option("--mode", type="choice", metavar="<FUNCTIONS|S3PROTO|LIBPROTO|PARAMDEFS|PARAMTABLE>",
+                 choices=["FUNCTIONS", "S3PROTO", "LIBPROTO", "PARAMDEFS", "PARAMTABLE"], default="FUNCTIONS")
 parser.add_option("--scope", metavar="<GLOBAL|LOCAL>",
                   choices = ["GLOBAL", "LOCAL"], default="GLOBAL")
 
@@ -69,6 +69,11 @@ def iterate_all(path):
         synonym = parameter.attrib.get("synonym")
         removed = parameter.attrib.get("removed")
         generated = parameter.attrib.get("generated_function")
+        handler = parameter.attrib.get("handler")
+        enumlist = parameter.attrib.get("enumlist")
+        deprecated = parameter.attrib.get("deprecated")
+        synonyms = parameter.findall('synonym')
+
         if removed == "1":
             continue
 
@@ -78,6 +83,10 @@ def iterate_all(path):
             raise Exception("Error parsing parameter: " + name)
         if func is None:
             func = name.replace(" ", "_").lower()
+        if enumlist is None:
+            enumlist = "NULL"
+        if handler is None:
+            handler = "NULL"
         yield {'name': name,
                'type': param_type,
                'context': context,
@@ -85,7 +94,11 @@ def iterate_all(path):
                'constant': (constant == '1'),
                'parm': (parm == '1'),
                'synonym' : synonym,
-               'generated' : generated }
+               'generated' : generated,
+               'enumlist' : enumlist,
+               'handler' : handler,
+               'deprecated' : deprecated,
+               'synonyms' : synonyms }
 
 # map doc attributes to a section of the generated function
 context_dict = {"G": "_GLOBAL", "S": "_LOCAL"}
@@ -296,6 +309,92 @@ def make_param_defs(path_in, path_out, scope):
     finally:
         file_out.close()
 
+type_dict = {
+              "boolean"      : "P_BOOL",
+              "boolean-rev"  : "P_BOOLREV",
+              "boolean-auto" : "P_ENUM",
+              "list"         : "P_LIST",
+              "string"       : "P_STRING",
+              "integer"      : "P_INTEGER",
+              "enum"         : "P_ENUM",
+              "char"         : "P_CHAR",
+              "cmdlist"      : "P_CMDLIST",
+              "bytes"        : "P_BYTES",
+              "octal"        : "P_OCTAL",
+              "ustring"      : "P_USTRING",
+            }
+
+def make_param_table(path_in, path_out):
+    file_out = open(path_out, 'w')
+    try:
+        file_out.write('/* This file was automatically generated by generate_param.py. DO NOT EDIT */\n\n')
+        header = get_header(path_out)
+        file_out.write("#ifndef %s\n" % header)
+        file_out.write("#define %s\n\n" % header)
+
+        file_out.write("struct parm_struct parm_table[] = {\n")
+
+        for parameter in iterate_all(path_in):
+            # filter out parameteric options
+            if ':' in parameter['name']:
+                continue
+            if parameter['context'] == 'G':
+                p_class = "P_GLOBAL"
+            else:
+                p_class = "P_LOCAL"
+
+            p_type = type_dict.get(parameter['type'])
+
+            if parameter['context'] == 'G':
+                temp = "GLOBAL"
+            else:
+                temp = "LOCAL"
+            offset = "%s_VAR(%s)" % (temp, parameter['function'])
+
+            enumlist = parameter['enumlist']
+            handler = parameter['handler']
+            synonym = parameter['synonym']
+            deprecated = parameter['deprecated']
+            flags_list = []
+            if synonym == "1":
+                flags_list.append("FLAG_SYNONYM")
+            if deprecated == "1":
+                flags_list.append("FLAG_DEPRECATED")
+            flags = "|".join(flags_list)
+            synonyms = parameter['synonyms']
+
+            file_out.write("\t{\n")
+            file_out.write("\t\t.label\t\t= \"%s\",\n" % parameter['name'])
+            file_out.write("\t\t.type\t\t= %s,\n" % p_type)
+            file_out.write("\t\t.p_class\t= %s,\n" % p_class)
+            file_out.write("\t\t.offset\t\t= %s,\n" % offset)
+            file_out.write("\t\t.special\t= %s,\n" % handler)
+            file_out.write("\t\t.enum_list\t= %s,\n" % enumlist)
+            if flags != "":
+                file_out.write("\t\t.flags\t\t= %s,\n" % flags)
+            file_out.write("\t},\n")
+
+            if synonyms is not None:
+                # for synonyms, we only list the synonym flag:
+                flags = "FLAG_SYNONYM"
+                for syn in synonyms:
+                    file_out.write("\t{\n")
+                    file_out.write("\t\t.label\t\t= \"%s\",\n" % syn.text)
+                    file_out.write("\t\t.type\t\t= %s,\n" % p_type)
+                    file_out.write("\t\t.p_class\t= %s,\n" % p_class)
+                    file_out.write("\t\t.offset\t\t= %s,\n" % offset)
+                    file_out.write("\t\t.special\t= %s,\n" % handler)
+                    file_out.write("\t\t.enum_list\t= %s,\n" % enumlist)
+                    if flags != "":
+                        file_out.write("\t\t.flags\t\t= %s,\n" % flags)
+                    file_out.write("\t},\n")
+
+        file_out.write("\n\t{NULL,  P_BOOL,  P_NONE,  0,  NULL,  NULL,  0}\n");
+        file_out.write("};\n")
+        file_out.write("\n#endif /* %s */\n\n" % header)
+    finally:
+        file_out.close()
+
 if options.mode == 'FUNCTIONS':
     generate_functions(options.filename, options.output)
 elif options.mode == 'S3PROTO':
@@ -304,3 +403,5 @@ elif options.mode == 'LIBPROTO':
     make_lib_proto(options.filename, options.output)
 elif options.mode == 'PARAMDEFS':
     make_param_defs(options.filename, options.output, options.scope)
+elif options.mode == 'PARAMTABLE':
+    make_param_table(options.filename, options.output)
-- 
2.4.3


From deb429cc1fe5c77faa7fbd2dcc9e6c64ad36bf36 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Tue, 28 Apr 2015 11:45:43 +0200
Subject: [PATCH 03/14] build: generate param_table_gen.c from docs in the
 build

Signed-off-by: Michael Adam <obnox at samba.org>
---
 lib/param/wscript_build | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/param/wscript_build b/lib/param/wscript_build
index 66003e9..c7fe577 100644
--- a/lib/param/wscript_build
+++ b/lib/param/wscript_build
@@ -24,6 +24,12 @@ bld.SAMBA_GENERATOR('param_global.h',
                     group='build_source',
                     rule='${PYTHON} ${SRC[0].abspath(env)} --file ${SRC[1].abspath(env)} --output ${TGT} --mode=PARAMDEFS --scope=GLOBAL')
 
+bld.SAMBA_GENERATOR('param_table_gen.c',
+                    source='../../script/generate_param.py ../../docs-xml/smbdotconf/parameters.all.xml',
+                    target='param_table_gen.c',
+                    group='build_source',
+                    rule='${PYTHON} ${SRC[0].abspath(env)} --file ${SRC[1].abspath(env)} --output ${TGT} --mode=PARAMTABLE')
+
 bld.SAMBA_LIBRARY('server-role',
                   source='loadparm_server_role.c',
                   deps='samba-util',
-- 
2.4.3


From 22cfb192363d05cf0d50c20afc6b6cc5f7489808 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Wed, 22 Jul 2015 15:16:16 +0200
Subject: [PATCH 04/14] tests:docs: common initialization in docs test.

Just load the structures once at startup.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 78 +++++++++++++++++++++-------------------------
 1 file changed, 35 insertions(+), 43 deletions(-)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index ded0c20..4e5f1fc 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -151,34 +151,45 @@ class SmbDotConfTests(TestCase):
         finally:
             f.close()
 
+        self.topdir = os.path.abspath(samba.source_tree_topdir())
+
+        try:
+            self.documented = set(get_documented_parameters(self.topdir))
+        except:
+            self.fail("Unable to load documented parameters")
+
+        try:
+            self.parameters = set(get_implementation_parameters(self.topdir))
+        except:
+            self.fail("Unable to load implemented parameters")
+
+        try:
+            self.defaults = set(get_documented_tuples(self.topdir))
+        except:
+            self.fail("Unable to load parameters")
+
+        try:
+            self.defaults_all = set(get_documented_tuples(self.topdir, False))
+        except:
+            self.fail("Unable to load parameters")
+
+
     def tearDown(self):
         super(SmbDotConfTests, self).tearDown()
         os.unlink(self.smbconf)
         os.unlink(self.blankconf)
 
     def test_unknown(self):
-        topdir = os.path.abspath(samba.source_tree_topdir())
-        try:
-            documented = set(get_documented_parameters(topdir))
-        except e:
-            self.fail("Unable to load parameters")
-        parameters = set(get_implementation_parameters(topdir))
         # Filter out parametric options, since we can't find them in the parm
         # table
-        documented = set([p for p in documented if not ":" in p])
-        unknown = documented.difference(parameters)
+        documented = set([p for p in self.documented if not ":" in p])
+        unknown = documented.difference(self.parameters)
         if len(unknown) > 0:
             self.fail(self._format_message(unknown,
                 "Parameters that are documented but not in the implementation:"))
 
     def test_undocumented(self):
-        topdir = os.path.abspath(samba.source_tree_topdir())
-        try:
-            documented = set(get_documented_parameters(topdir))
-        except:
-            self.fail("Unable to load parameters")
-        parameters = set(get_implementation_parameters(topdir))
-        undocumented = parameters.difference(documented)
+        undocumented = self.parameters.difference(self.documented)
         if len(undocumented) > 0:
             self.fail(self._format_message(undocumented,
                 "Parameters that are in the implementation but undocumented:"))
@@ -203,16 +214,10 @@ class SmbDotConfTests(TestCase):
         self._test_empty(['bin/samba-tool', 'testparm'])
 
     def _test_default(self, program):
-        topdir = os.path.abspath(samba.source_tree_topdir())
-        try:
-            defaults = set(get_documented_tuples(topdir))
-        except:
-            self.fail("Unable to load parameters")
-        bindir = os.path.join(topdir, "bin")
         failset = set()
         count = 0
 
-        for tuples in defaults:
+        for tuples in self.defaults:
             param, default, context, param_type = tuples
             if param in self.special_cases:
                 continue
@@ -225,7 +230,7 @@ class SmbDotConfTests(TestCase):
                  self.fail("%s has no valid context" % param)
             p = subprocess.Popen(program + ["-s", self.smbconf,
                     "--section-name", section, "--parameter-name", param],
-                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=topdir).communicate()
+                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=self.topdir).communicate()
             if p[0].upper().strip() != default.upper():
                 if not (p[0].upper().strip() == "" and default == '""'):
                     doc_triple = "%s\n      Expected: %s" % (param, default)
@@ -236,16 +241,10 @@ class SmbDotConfTests(TestCase):
                 "Parameters that do not have matching defaults:"))
 
     def _set_defaults(self, program):
-        topdir = os.path.abspath(samba.source_tree_topdir())
-        try:
-            defaults = set(get_documented_tuples(topdir))
-        except:
-            self.fail("Unable to load parameters")
-        bindir = os.path.join(topdir, "bin")
         failset = set()
         count = 0
 
-        for tuples in defaults:
+        for tuples in self.defaults:
             param, default, context, param_type = tuples
 
             if param in ['printing']:
@@ -261,7 +260,7 @@ class SmbDotConfTests(TestCase):
             p = subprocess.Popen(program + ["-s", self.smbconf,
                     "--section-name", section, "--parameter-name", param,
                     "--option", "%s = %s" % (param, default)],
-                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=topdir).communicate()
+                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=self.topdir).communicate()
             if p[0].upper().strip() != default.upper():
                 if not (p[0].upper().strip() == "" and default == '""'):
                     doc_triple = "%s\n      Expected: %s" % (param, default)
@@ -286,16 +285,11 @@ class SmbDotConfTests(TestCase):
                               'octal': '0567',
                               'ustring': 'ustring2',
                               'enum':'', 'boolean-auto': '', 'char': 'b', 'list': 'd, e, f'}
-        topdir = os.path.abspath(samba.source_tree_topdir())
-        try:
-            defaults = set(get_documented_tuples(topdir, False))
-        except Exception,e:
-            self.fail("Unable to load parameters" + e)
-        bindir = os.path.join(topdir, "bin")
+
         failset = set()
         count = 0
 
-        for tuples in defaults:
+        for tuples in self.defaults_all:
             param, default, context, param_type = tuples
 
             if param in ['printing', 'copy', 'include', 'log level']:
@@ -324,7 +318,7 @@ class SmbDotConfTests(TestCase):
             p = subprocess.Popen(program + ["-s", self.smbconf,
                     "--section-name", section, "--parameter-name", param,
                     "--option", "%s = %s" % (param, value_to_use)],
-                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=topdir).communicate()
+                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=self.topdir).communicate()
             if p[0].upper().strip() != value_to_use.upper():
                 # currently no way to distinguish command lists
                 if param_type == 'list':
@@ -354,7 +348,7 @@ class SmbDotConfTests(TestCase):
 
             p = subprocess.Popen(program + ["-s", tempconf, "--suppress-prompt",
                     "--option", "%s = %s" % (param, value_to_use)],
-                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=topdir).communicate()
+                    stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=self.topdir).communicate()
 
             os.unlink(tempconf)
 
@@ -388,10 +382,8 @@ class SmbDotConfTests(TestCase):
                 "Parameters that were unexpectedly not set:"))
 
     def _test_empty(self, program):
-        topdir = os.path.abspath(samba.source_tree_topdir())
-
         p = subprocess.Popen(program + ["-s", self.blankconf, "--suppress-prompt"],
-                stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=topdir).communicate()
+                stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=self.topdir).communicate()
         output = ""
 
         for line in p[0].splitlines():
-- 
2.4.3


From 191d004986b21a0f2d1b5c6d29c43ddbd117e470 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 16:25:45 +0200
Subject: [PATCH 05/14] tests:docs: print more complicated structures than
 strings in the message.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index 4e5f1fc..ab105e0 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -31,6 +31,7 @@ class TestCase(samba.tests.TestCaseInTempDir):
 
     def _format_message(self, parameters, message):
         parameters = list(parameters)
+        parameters = map(str, parameters)
         parameters.sort()
         return message + '\n\n    %s' % ('\n    '.join(parameters))
 
-- 
2.4.3


From 6519649a78995b233dfa4b8944672ec8279a66e7 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 23:10:16 +0200
Subject: [PATCH 06/14] tests:docs: add a function to load the full data
 structures from the table

instead of just loading the list of parameter names.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index ab105e0..cf12b54 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -82,6 +82,64 @@ def get_implementation_parameters(sourcedir):
     finally:
         f.close()
 
+def get_param_table_full(sourcedir, filename="lib/param/param_table_static.c"):
+    # Reading entries from source code
+    f = open(os.path.join(sourcedir, filename), "r")
+    try:
+        # burn through the preceding lines
+        while True:
+            l = f.readline()
+            if l.startswith("struct parm_struct parm_table"):
+                break
+
+        for l in f.readlines():
+
+            if re.match("^\s*\}\;\s*$", l):
+                # end of the table reached
+                break
+
+            if re.match("^\s*\{\s*$", l):
+                # start a new entry
+                _label = ""
+                _type = ""
+                _class = ""
+                _offset = ""
+                _special = ""
+                _enum_list = ""
+                _flags = ""
+                continue
+
+            if re.match("^\s*\},\s*$", l):
+                # finish the entry
+                yield _label, _type, _class, _offset, _special, _enum_list, _flags
+                continue
+
+            m = re.match("^\s*\.([^\s]+)\s*=\s*(.*),.*", l)
+            if not m:
+                continue
+
+            attrib = m.group(1)
+            value = m.group(2)
+
+            if attrib == "label":
+                _label = value
+            elif attrib == "type":
+                _type = value
+            elif attrib == "p_class":
+                _class = value
+            elif attrib == "offset":
+                _offset = value
+            elif attrib == "special":
+                _special = value
+            elif attrib == "enum_list":
+                _special = value
+            elif attrib == "flags":
+                _flags = value
+
+    finally:
+        f.close()
+
+
 def get_documented_tuples(sourcedir, omit_no_default=True):
     path = os.path.join(sourcedir, "bin", "default", "docs-xml", "smbdotconf")
     if not os.path.exists(os.path.join(path, "parameters.all.xml")):
-- 
2.4.3


From cf7343509f95264b6ef7c9cfee90dd1c60b06489 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 23:15:07 +0200
Subject: [PATCH 07/14] tests:docs: load the full data from the existing
 param_table.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index cf12b54..fbe783b 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -223,6 +223,12 @@ class SmbDotConfTests(TestCase):
             self.fail("Unable to load implemented parameters")
 
         try:
+            self.table_static = set(get_param_table_full(self.topdir,
+                                   "lib/param/param_table_static.c"))
+        except:
+            self.fail("Unable to load static parameter table")
+
+        try:
             self.defaults = set(get_documented_tuples(self.topdir))
         except:
             self.fail("Unable to load parameters")
-- 
2.4.3


From 8c719553693753e3e9954911392d7937ee60e754 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 23:15:38 +0200
Subject: [PATCH 08/14] tests:docs: load the full data from the generated
 param_table

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index fbe783b..dc5e212 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -229,6 +229,12 @@ class SmbDotConfTests(TestCase):
             self.fail("Unable to load static parameter table")
 
         try:
+            self.table_gen = set(get_param_table_full(self.topdir,
+                                 "bin/default/lib/param/param_table_gen.c"))
+        except:
+            self.fail("Unable to load generated parameter table")
+
+        try:
             self.defaults = set(get_documented_tuples(self.topdir))
         except:
             self.fail("Unable to load parameters")
-- 
2.4.3


From e73e154e3af8275be26eb53794678ec8ec4173ee Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 16:29:23 +0200
Subject: [PATCH 09/14] tests:docs: test the diff between the static and
 generated table

This proves that the committed and the generated parameter tables
are identical (modulo order).

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index dc5e212..510dafa 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -265,6 +265,25 @@ class SmbDotConfTests(TestCase):
             self.fail(self._format_message(undocumented,
                 "Parameters that are in the implementation but undocumented:"))
 
+    def test_generated(self):
+        diff1 = self.table_static.difference(self.table_gen)
+        diff1_txt = ""
+        if len(diff1) > 0:
+            diff1_txt = self._format_message(diff1,
+                "Parameter diff viewed from static (%d entries):"
+                % (len(diff1)))
+
+        diff2 = self.table_gen.difference(self.table_static)
+        diff2_txt = ""
+        if len(diff2) > 0:
+            diff2_txt = self._format_message(diff2,
+                "Parameter diff viewed from generated (%d entries):" %
+                (len(diff2)))
+
+        if len(diff1) > 0 or len(diff2) > 0:
+            self.fail("Parameter tables are different.\n%s\n%s" %
+                      (diff1_txt, diff2_txt))
+
     def test_default_s3(self):
         self._test_default(['bin/testparm'])
         self._set_defaults(['bin/testparm'])
-- 
2.4.3


From 73cc0f9f6f400655e02d19fe88174a309c149064 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 18:40:27 +0200
Subject: [PATCH 10/14] param: use the generated parameter table.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 lib/param/param_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/param/param_table.c b/lib/param/param_table.c
index 372cd37..92a7619 100644
--- a/lib/param/param_table.c
+++ b/lib/param/param_table.c
@@ -282,7 +282,7 @@ static const struct enum_list enum_case[] = {
 #define GLOBAL_VAR(name) offsetof(struct loadparm_global, name)
 #define LOCAL_VAR(name) offsetof(struct loadparm_service, name)
 
-#include "lib/param/param_table_static.c"
+#include "lib/param/param_table_gen.c"
 
 int num_parameters(void)
 {
-- 
2.4.3


From df4e6b50678033aadfefaa54f17f39e8729319c9 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Thu, 23 Jul 2015 23:56:11 +0200
Subject: [PATCH 11/14] tests:docs: remove testing the diff between the static
 and generated table

This reverts commit 380e0769ad3563dc762fb0c9ebe57d8131846519.

This is in preparation of the removal of the committed param_table_static.c

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index 510dafa..dc5e212 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -265,25 +265,6 @@ class SmbDotConfTests(TestCase):
             self.fail(self._format_message(undocumented,
                 "Parameters that are in the implementation but undocumented:"))
 
-    def test_generated(self):
-        diff1 = self.table_static.difference(self.table_gen)
-        diff1_txt = ""
-        if len(diff1) > 0:
-            diff1_txt = self._format_message(diff1,
-                "Parameter diff viewed from static (%d entries):"
-                % (len(diff1)))
-
-        diff2 = self.table_gen.difference(self.table_static)
-        diff2_txt = ""
-        if len(diff2) > 0:
-            diff2_txt = self._format_message(diff2,
-                "Parameter diff viewed from generated (%d entries):" %
-                (len(diff2)))
-
-        if len(diff1) > 0 or len(diff2) > 0:
-            self.fail("Parameter tables are different.\n%s\n%s" %
-                      (diff1_txt, diff2_txt))
-
     def test_default_s3(self):
         self._test_default(['bin/testparm'])
         self._set_defaults(['bin/testparm'])
-- 
2.4.3


From 349cc22ff445c53d16a2b4d8463f75584b68cb1b Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Fri, 24 Jul 2015 01:29:37 +0200
Subject: [PATCH 12/14] tests:docs: don't load or test the static param_table.

It is going to be removed for the generated table.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 python/samba/tests/docs.py | 49 ----------------------------------------------
 1 file changed, 49 deletions(-)

diff --git a/python/samba/tests/docs.py b/python/samba/tests/docs.py
index dc5e212..e7123b6 100644
--- a/python/samba/tests/docs.py
+++ b/python/samba/tests/docs.py
@@ -59,29 +59,6 @@ def get_documented_parameters(sourcedir):
     p.close()
 
 
-def get_implementation_parameters(sourcedir):
-    # Reading entries from source code
-    f = open(os.path.join(sourcedir, "lib/param/param_table_static.c"), "r")
-    try:
-        # burn through the preceding lines
-        while True:
-            l = f.readline()
-            if l.startswith("struct parm_struct parm_table"):
-                break
-
-        for l in f.readlines():
-            if re.match("^\s*\}\;\s*$", l):
-                break
-            # pull in the param names only
-            m = re.match("\s*\.label\s*=\s*\"(.*)\".*", l)
-            if not m:
-                continue
-
-            name = m.group(1)
-            yield name
-    finally:
-        f.close()
-
 def get_param_table_full(sourcedir, filename="lib/param/param_table_static.c"):
     # Reading entries from source code
     f = open(os.path.join(sourcedir, filename), "r")
@@ -218,17 +195,6 @@ class SmbDotConfTests(TestCase):
             self.fail("Unable to load documented parameters")
 
         try:
-            self.parameters = set(get_implementation_parameters(self.topdir))
-        except:
-            self.fail("Unable to load implemented parameters")
-
-        try:
-            self.table_static = set(get_param_table_full(self.topdir,
-                                   "lib/param/param_table_static.c"))
-        except:
-            self.fail("Unable to load static parameter table")
-
-        try:
             self.table_gen = set(get_param_table_full(self.topdir,
                                  "bin/default/lib/param/param_table_gen.c"))
         except:
@@ -250,21 +216,6 @@ class SmbDotConfTests(TestCase):
         os.unlink(self.smbconf)
         os.unlink(self.blankconf)
 
-    def test_unknown(self):
-        # Filter out parametric options, since we can't find them in the parm
-        # table
-        documented = set([p for p in self.documented if not ":" in p])
-        unknown = documented.difference(self.parameters)
-        if len(unknown) > 0:
-            self.fail(self._format_message(unknown,
-                "Parameters that are documented but not in the implementation:"))
-
-    def test_undocumented(self):
-        undocumented = self.parameters.difference(self.documented)
-        if len(undocumented) > 0:
-            self.fail(self._format_message(undocumented,
-                "Parameters that are in the implementation but undocumented:"))
-
     def test_default_s3(self):
         self._test_default(['bin/testparm'])
         self._set_defaults(['bin/testparm'])
-- 
2.4.3


From c73450692c5ba8e2d098542c1bbe4164f9f2308c Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Fri, 24 Jul 2015 00:31:27 +0200
Subject: [PATCH 13/14] param: remove the static param_table.

It is now auto-generated.

Signed-off-by: Michael Adam <obnox at samba.org>
---
 lib/param/param_table_static.c | 3737 ----------------------------------------
 1 file changed, 3737 deletions(-)
 delete mode 100644 lib/param/param_table_static.c

diff --git a/lib/param/param_table_static.c b/lib/param/param_table_static.c
deleted file mode 100644
index fab0cac..0000000
--- a/lib/param/param_table_static.c
+++ /dev/null
@@ -1,3737 +0,0 @@
-#ifndef __PARAM_TABLE_STATIC_C__
-#define __PARAM_TABLE_STATIC_C__
-
-struct parm_struct parm_table[] = {
-	{
-		.label		= "dos charset",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dos_charset),
-		.special	= handle_dos_charset,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "unix charset",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unix_charset),
-		.special	= handle_charset,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "comment",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(comment),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "path",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(path),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(path),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "workgroup",
-		.type		= P_USTRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(workgroup),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "realm",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(realm),
-		.special	= handle_realm,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "netbios name",
-		.type		= P_USTRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(netbios_name),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "netbios aliases",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(netbios_aliases),
-		.special	= handle_netbios_aliases,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "netbios scope",
-		.type		= P_USTRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(netbios_scope),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "server string",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_string),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "interfaces",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(interfaces),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "bind interfaces only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(bind_interfaces_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "config backend",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(config_backend),
-		.special	= NULL,
-		.enum_list	= enum_config_backend,
-	},
-	{
-		.label		= "server role",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_server_role),
-		.special	= NULL,
-		.enum_list	= enum_server_role,
-	},
-	{
-		.label		= "security",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_security),
-		.special	= NULL,
-		.enum_list	= enum_security,
-	},
-	{
-		.label		= "auth methods",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(auth_methods),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "encrypt passwords",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(encrypt_passwords),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client schannel",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_schannel),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "server schannel",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_schannel),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "allow trusted domains",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_trusted_domains),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map to guest",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(map_to_guest),
-		.special	= NULL,
-		.enum_list	= enum_map_to_guest,
-	},
-	{
-		.label		= "null passwords",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(null_passwords),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "old password allowed period",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(old_password_allowed_period),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "obey pam restrictions",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(obey_pam_restrictions),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "password server",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(password_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb passwd file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb_passwd_file),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "private dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(private_dir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "private directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(private_dir),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "passdb backend",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passdb_backend),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "algorithmic rid base",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(algorithmic_rid_base),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(root_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(root_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "root",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(root_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "guest account",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(guest_account),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enable privileges",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enable_privileges),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-
-	{
-		.label		= "pam password change",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(pam_password_change),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd program",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_program),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd chat",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_chat),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd chat debug",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_chat_debug),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passwd chat timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passwd_chat_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "check password script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(check_password_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username level",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_level),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "unix password sync",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unix_password_sync),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "restrict anonymous",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(restrict_anonymous),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lanman auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lanman_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ntlm auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ntlm_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client NTLMv2 auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_ntlmv2_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client lanman auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_lanman_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client plaintext auth",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_plaintext_auth),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client use spnego principal",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_use_spnego_principal),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "username",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(username),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "user",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(username),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "users",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(username),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "invalid users",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(invalid_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "valid users",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(valid_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "admin users",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(admin_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "read list",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write list",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(write_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force user",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_user),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force group",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_group),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "group",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_group),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "read only",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "spotlight",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(spotlight),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write ok",
-		.type		= P_BOOLREV,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "writeable",
-		.type		= P_BOOLREV,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "writable",
-		.type		= P_BOOLREV,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(read_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "acl check permissions",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_check_permissions),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "acl group control",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_group_control),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "acl map full control",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_map_full_control),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "acl allow execute always",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(acl_allow_execute_always),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "create mask",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(create_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "create mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(create_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "force create mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_create_mode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory mask",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(directory_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(directory_mask),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "force directory mode",
-		.type		= P_OCTAL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_directory_mode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force unknown acl user",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_unknown_acl_user),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "inherit permissions",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(inherit_permissions),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "inherit acls",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(inherit_acls),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "inherit owner",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(inherit_owner),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "guest only",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "only guest",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "administrative share",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(administrative_share),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "guest ok",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_ok),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "public",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(guest_ok),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "only user",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(only_user),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "hosts allow",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_allow),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allow hosts",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_allow),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "hosts deny",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_deny),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "deny hosts",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hosts_deny),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "preload modules",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(preload_modules),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dedicated keytab file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dedicated_keytab_file),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kerberos method",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(kerberos_method),
-		.special	= NULL,
-		.enum_list	= enum_kerberos_method,
-	},
-	{
-		.label		= "map untrusted to domain",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(map_untrusted_to_domain),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "log level",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_level),
-		.special	= handle_debug_list,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debuglevel",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_level),
-		.special	= handle_debug_list,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "syslog",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(syslog),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "syslog only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(syslog_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "log file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logfile),
-		.special	= handle_logfile,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logging",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logging),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max log size",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_log_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug timestamp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(timestamp_logs),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "timestamp logs",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(timestamp_logs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug prefix timestamp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_prefix_timestamp),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug hires timestamp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_hires_timestamp),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug pid",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_pid),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug uid",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_uid),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "debug class",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(debug_class),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enable core files",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enable_core_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allocation roundup size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(allocation_roundup_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "aio read size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(aio_read_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "aio write size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(aio_write_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "aio write behind",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(aio_write_behind),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb ports",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb_ports),
-		.special	= handle_smb_ports,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "large readwrite",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(large_readwrite),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "server max protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "max protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "server min protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_min_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "min protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_min_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "client max protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_client_max_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "client min protocol",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_min_protocol),
-		.special	= NULL,
-		.enum_list	= enum_protocol,
-	},
-	{
-		.label		= "unicode",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unicode),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "min receivefile size",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(min_receivefile_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "read raw",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(read_raw),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write raw",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(write_raw),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "disable netbios",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(disable_netbios),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "reset on zero vc",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(reset_on_zero_vc),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "log writeable files on exit",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_writeable_files_on_exit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "defer sharing violations",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(defer_sharing_violations),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ea support",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(ea_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nt acl support",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(nt_acl_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nt pipe support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nt_pipe_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nt status support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nt_status_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smbd profiling level",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smbd_profiling_level),
-		.special	= NULL,
-		.enum_list	= enum_smbd_profiling_level,
-	},
-	{
-		.label		= "profile acls",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(profile_acls),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map acl inherit",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_acl_inherit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "afs share",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(afs_share),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max mux",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_mux),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max xmit",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_xmit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "name resolve order",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(name_resolve_order),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max ttl",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_ttl),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max wins ttl",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_wins_ttl),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "min wins ttl",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(min_wins_ttl),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "time server",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(time_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "unix extensions",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(unix_extensions),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "use spnego",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(use_spnego),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "client signing",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_signing),
-		.special	= NULL,
-		.enum_list	= enum_smb_signing_vals,
-	},
-	{
-		.label		= "server signing",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_signing),
-		.special	= NULL,
-		.enum_list	= enum_smb_signing_vals,
-	},
-	{
-		.label		= "smb encrypt",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(smb_encrypt),
-		.special	= NULL,
-		.enum_list	= enum_smb_signing_vals,
-	},
-	{
-		.label		= "client use spnego",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_use_spnego),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "client ldap sasl wrapping",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(client_ldap_sasl_wrapping),
-		.special	= NULL,
-		.enum_list	= enum_ldap_sasl_wrapping,
-	},
-	{
-		.label		= "enable asu support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enable_asu_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "svcctl list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(svcctl_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cldap port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cldap_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "dgram port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dgram_port),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags          = FLAG_DEPRECATED
-	},
-	{
-		.label		= "nbt port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nbt_port),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags          = FLAG_DEPRECATED
-	},
-	{
-		.label		= "krb5 port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(krb5_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "kpasswd port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(kpasswd_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "web port",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(web_port),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "rpc big endian",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(rpc_big_endian),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "durable handles",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(durable_handles),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "block size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(block_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "deadtime",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(deadtime),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "getwd cache",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(getwd_cache),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "keepalive",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(keepalive),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "change notify",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(change_notify),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "directory name cache size",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(directory_name_cache_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kernel change notify",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(kernel_change_notify),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lpq cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lpq_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max smbd processes",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_smbd_processes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max connections",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(max_connections),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max disk size",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_disk_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max open files",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_open_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "min print space",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(min_print_space),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "socket options",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(socket_options),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict allocate",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_allocate),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict rename",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_rename),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict sync",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_sync),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "sync always",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(sync_always),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "use mmap",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(use_mmap),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "use sendfile",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(_use_sendfile),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hostname lookups",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(hostname_lookups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "write cache size",
-		.type		= P_BYTES,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(write_cache_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "name cache timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(name_cache_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ctdbd socket",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ctdbd_socket),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cluster addresses",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cluster_addresses),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "clustering",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(clustering),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ctdb timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ctdb_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ctdb locktime warn threshold",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ctdb_locktime_warn_threshold),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max read",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_read),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max write",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_write),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max trans",
-		.type		= P_BYTES,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_trans),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 max credits",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_max_credits),
-		.special	= handle_smb2_max_credits,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max reported print jobs",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(max_reported_print_jobs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max print jobs",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(max_print_jobs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "load printers",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(load_printers),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printcap cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(printcap_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printcap name",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(printcap_name),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printcap",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(printcap_name),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "printable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printable),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "print notify backchannel",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(print_notify_backchannel),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "print ok",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printable),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "printing",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printing),
-		.special	= handle_printing,
-		.enum_list	= enum_printing,
-	},
-	{
-		.label		= "cups options",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(cups_options),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cups server",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cups_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label          = "cups encrypt",
-		.type           = P_ENUM,
-		.p_class        = P_GLOBAL,
-		.offset         = GLOBAL_VAR(cups_encrypt),
-		.special        = NULL,
-		.enum_list      = enum_bool_auto,
-	},
-	{
-
-		.label		= "cups connection timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cups_connection_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "iprint server",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(iprint_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "print command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(print_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "disable spoolss",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_disable_spoolss),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enable spoolss",
-		.type		= P_BOOLREV,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_disable_spoolss),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "lpq command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lpq_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lprm command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lprm_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lppause command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lppause_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lpresume command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(lpresume_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "queuepause command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(queuepause_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "queueresume command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(queueresume_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "addport command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(addport_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enumports command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enumports_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "addprinter command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(addprinter_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "deleteprinter command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(deleteprinter_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "show add printer wizard",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(show_add_printer_wizard),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "os2 driver map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(os2_driver_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "printer name",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(_printername),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printer",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(_printername),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "use client driver",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(use_client_driver),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "default devmode",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(default_devmode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "force printername",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(force_printername),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "printjob username",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(printjob_username),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "mangling method",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(mangling_method),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "mangle prefix",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(mangle_prefix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "default case",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(default_case),
-		.special	= NULL,
-		.enum_list	= enum_case,
-	},
-	{
-		.label		= "case sensitive",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(case_sensitive),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "casesignames",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(case_sensitive),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "preserve case",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preserve_case),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "short preserve case",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(short_preserve_case),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "mangling char",
-		.type		= P_CHAR,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(mangling_char),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide dot files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_dot_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide special files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_special_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide unreadable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_unreadable),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide unwriteable files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_unwriteable_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete veto files",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(delete_veto_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "veto files",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(veto_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "hide files",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(hide_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "veto oplock files",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(veto_oplock_files),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map archive",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_archive),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map hidden",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_hidden),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map system",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_system),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "map readonly",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(map_readonly),
-		.special	= NULL,
-		.enum_list	= enum_map_readonly,
-	},
-	{
-		.label		= "mangled names",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(mangled_names),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "max stat cache size",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(max_stat_cache_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "stat cache",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(stat_cache),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "store dos attributes",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(store_dos_attributes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dmapi support",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dmapi_support),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "machine password timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(machine_password_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add user script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_user_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "rename user script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(rename_user_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete user script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_user_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add user to group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_user_to_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete user from group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_user_from_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "set primary group script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(set_primary_group_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add machine script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_machine_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "shutdown script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(shutdown_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "abort shutdown script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(abort_shutdown_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username map script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_map_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "username map cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(username_map_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon script",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon path",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_path),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon drive",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_drive),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "logon home",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(logon_home),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "domain logons",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_domain_logons),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "init logon delayed hosts",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(init_logon_delayed_hosts),
-		.special        = NULL,
-		.enum_list	= NULL,
-	},
-
-	{
-		.label		= "init logon delay",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(init_logon_delay),
-		.special        = NULL,
-		.enum_list	= NULL,
-
-	},
-	{
-		.label		= "os level",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(os_level),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lm announce",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lm_announce),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "lm interval",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lm_interval),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "preferred master",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_preferred_master),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "prefered master",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_preferred_master),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "local master",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(local_master),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "domain master",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_domain_master),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "browse list",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(browse_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "browseable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(browseable),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "browsable",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(browseable),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "access based share enum",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(access_based_share_enum),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "enhanced browsing",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(enhanced_browsing),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dns proxy",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_dns_proxy),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins proxy",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_proxy),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins server",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_server_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins support",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(we_are_a_wins_server),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wins hook",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wins_hook),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "blocking locks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(blocking_locks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "csc policy",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(csc_policy),
-		.special	= NULL,
-		.enum_list	= enum_csc_policy,
-	},
-	{
-		.label		= "fake oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(fake_oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kernel oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(kernel_oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "kernel share modes",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(kernel_share_modes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "smb2 leases",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(smb2_leases),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "locking",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(locking),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lock spin time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lock_spin_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "level2 oplocks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(level2_oplocks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "oplock break wait time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(oplock_break_wait_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "oplock contention limit",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(oplock_contention_limit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "posix locking",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(posix_locking),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "strict locking",
-		.type		= P_ENUM,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(strict_locking),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "ldap admin dn",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_admin_dn),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap delete dn",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_delete_dn),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap group suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_group_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap idmap suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_idmap_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap machine suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_machine_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap passwd sync",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_passwd_sync),
-		.special	= NULL,
-		.enum_list	= enum_ldap_passwd_sync,
-	},
-	{
-		.label		= "ldap password sync",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_passwd_sync),
-		.special	= NULL,
-		.enum_list	= enum_ldap_passwd_sync,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "ldap replication sleep",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_replication_sleep),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap ssl",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_ssl),
-		.special	= NULL,
-		.enum_list	= enum_ldap_ssl,
-	},
-	{
-		.label		= "ldap ssl ads",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_ssl_ads),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap deref",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_deref),
-		.special	= NULL,
-		.enum_list	= enum_ldap_deref,
-	},
-	{
-		.label		= "ldap follow referral",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_follow_referral),
-		.special	= NULL,
-		.enum_list	= enum_bool_auto,
-	},
-	{
-		.label		= "ldap timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap connection timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_connection_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap page size",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_page_size),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap user suffix",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_ldap_user_suffix),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap debug level",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_debug_level),
-		.special	= handle_ldap_debug_level,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ldap debug threshold",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ldap_debug_threshold),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "eventlog list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(eventlog_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "add share command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(add_share_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "change share command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(change_share_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete share command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(delete_share_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "config file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(next_configfile),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "preload",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(auto_services),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "auto services",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(auto_services),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lock directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lock_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "lock dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(lock_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "state directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(state_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "cache directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(cache_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "pid directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(pid_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ntp signd socket directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ntp_signd_socket_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-
-#ifdef WITH_UTMP
-	{
-		.label		= "utmp directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(utmp_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wtmp directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(wtmp_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "utmp",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(utmp),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-#endif
-	{
-		.label		= "default service",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(defaultservice),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "default",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(defaultservice),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "message command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(message_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dfree cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dfree_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dfree command",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dfree_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "get quota command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(get_quota_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "set quota command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(set_quota_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "remote announce",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(remote_announce),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "remote browse sync",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(remote_browse_sync),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nbt client socket address",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nbt_client_socket_address),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "socket address",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nbt_client_socket_address),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "nmbd bind explicit broadcast",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nmbd_bind_explicit_broadcast),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "homedir map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(homedir_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "afs username map",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(afs_username_map),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "afs token lifetime",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(afs_token_lifetime),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "log nt token command",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(log_nt_token_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "NIS homedir",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nis_homedir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "-valid",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(valid),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "copy",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(copy),
-		.special	= handle_copy,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "include",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(include),
-		.special	= handle_include,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "preexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "exec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "preexec close",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(preexec_close),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "postexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(postexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root preexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(root_preexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root preexec close",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(root_preexec_close),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "root postexec",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(root_postexec),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "available",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(available),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "registry shares",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(registry_shares),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare allow guests",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_allow_guests),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare max shares",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_max_shares),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare owner only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_owner_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare path",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_path),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare prefix allow list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_prefix_allow_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare prefix deny list",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_prefix_deny_list),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "usershare template share",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(usershare_template_share),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "volume",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(volume),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "fstype",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(fstype),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allow insecure wide links",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_insecure_wide_links),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "wide links",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(wide_links),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "follow symlinks",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(follow_symlinks),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dont descend",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dont_descend),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "magic script",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(magic_script),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "magic output",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(magic_output),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "delete readonly",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(delete_readonly),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dos filemode",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dos_filemode),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dos filetimes",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dos_filetimes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dos filetime resolution",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(dos_filetime_resolution),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "fake directory create times",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(fake_directory_create_times),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "async smb echo handler",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(async_smb_echo_handler),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "panic action",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(panic_action),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "perfcount module",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(perfcount_module),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "vfs objects",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(vfs_objects),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "vfs object",
-		.type		= P_CMDLIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(vfs_objects),
-		.special	= NULL,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "msdfs root",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(msdfs_root),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "msdfs proxy",
-		.type		= P_STRING,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(msdfs_proxy),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "msdfs shuffle referrals",
-		.type		= P_BOOL,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(msdfs_shuffle_referrals),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "host msdfs",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(host_msdfs),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "passdb expand explicit",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(passdb_expand_explicit),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "idmap backend",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_backend),
-		.special	= handle_idmap_backend,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "idmap cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "idmap negative cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_negative_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "idmap uid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_uid),
-		.special	= handle_idmap_uid,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "winbind uid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_uid),
-		.special	= handle_idmap_uid,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "idmap gid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_gid),
-		.special	= handle_idmap_gid,
-		.enum_list	= NULL,
-		.flags		= FLAG_DEPRECATED,
-	},
-	{
-		.label		= "winbind gid",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(idmap_gid),
-		.special	= handle_idmap_gid,
-		.enum_list	= NULL,
-		.flags		= FLAG_SYNONYM,
-	},
-	{
-		.label		= "template homedir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(template_homedir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "template shell",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(template_shell),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind separator",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_separator),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind cache time",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_cache_time),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind reconnect delay",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_reconnect_delay),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind request timeout",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_request_timeout),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind max clients",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_max_clients),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind enum users",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_enum_users),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind enum groups",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_enum_groups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind use default domain",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_use_default_domain),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind trusted domains only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_trusted_domains_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind nested groups",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_nested_groups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind expand groups",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_expand_groups),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind nss info",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_nss_info),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind refresh tickets",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_refresh_tickets),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind offline logon",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_offline_logon),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind normalize names",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_normalize_names),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind rpc only",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_rpc_only),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "create krb5 conf",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(create_krb5_conf),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "ncalrpc dir",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(ncalrpc_dir),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind max domain connections",
-		.type		= P_INTEGER,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_winbind_max_domain_connections),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbindd socket directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbindd_socket_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbindd privileged socket directory",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbindd_privileged_socket_directory),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "winbind sealed pipes",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(winbind_sealed_pipes),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "neutralize nt4 emulation",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(neutralize_nt4_emulation),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "reject md5 servers",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(reject_md5_servers),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "require strong key",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(require_strong_key),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "allow dns updates",
-		.type		= P_ENUM,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_dns_updates),
-		.special	= NULL,
-		.enum_list	= enum_dns_update_settings,
-	},
-	{
-		.label		= "dns forwarder",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dns_forwarder),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "dns update command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dns_update_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "nsupdate command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(nsupdate_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "rndc command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(rndc_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "multicast dns register",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(multicast_dns_register),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "samba kcc command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(samba_kcc_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "server services",
-		.type		= P_LIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(server_services),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "dcerpc endpoint servers",
-		.type		= P_LIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(dcerpc_endpoint_servers),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "spn update command",
-		.type		= P_CMDLIST,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(spn_update_command),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "share backend",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(share_backend),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "ntvfs handler",
-		.type		= P_LIST,
-		.p_class	= P_LOCAL,
-		.offset		= LOCAL_VAR(ntvfs_handler),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "allow nt4 crypto",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(allow_nt4_crypto),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "reject md5 clients",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(reject_md5_clients),
-		.special	= NULL,
-		.enum_list	= NULL,
-	},
-	{
-		.label		= "tls enabled",
-		.type		= P_BOOL,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(tls_enabled),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls keyfile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_keyfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls certfile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_certfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls cafile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_cafile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls crlfile",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_crlfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls dh params file",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(_tls_dhpfile),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-	{
-		.label		= "tls priority",
-		.type		= P_STRING,
-		.p_class	= P_GLOBAL,
-		.offset		= GLOBAL_VAR(tls_priority),
-		.special	= NULL,
-		.enum_list	= NULL
-	},
-
-	{NULL,  P_BOOL,  P_NONE,  0,  NULL,  NULL,  0}
-};
-
-#endif /* __PARAM_TABLE_STATIC_C__ */
-- 
2.4.3


From 81bf6aae489c956d158d55bf7734ec86067eff68 Mon Sep 17 00:00:00 2001
From: Michael Adam <obnox at samba.org>
Date: Fri, 24 Jul 2015 01:56:39 +0200
Subject: [PATCH 14/14] param: update the README with instructions for adding a
 parameter

Signed-off-by: Michael Adam <obnox at samba.org>
---
 lib/param/README | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/lib/param/README b/lib/param/README
index 6a53a45..d83fe9a 100644
--- a/lib/param/README
+++ b/lib/param/README
@@ -10,13 +10,23 @@ such as the configured shares, default parameter values and host secret keys.
 Adding a parameter
 ------------------
 
-To add or change an smb.conf option, you only have to modify
-lib/param/param_table.c and add the documentation to docs-xml/smbdotconf.
-If special defaults are needed, the functions loadparm_int() in
-lib/param/loadparm.c and/or init_globals() in source3/param/loadparm.c
-need to be adapted accordingly.
+To add or change an smb.conf option, in general you only have to add
+the documentation to docs-xml/smbdotconf, or change it.
+In addition to that, if special defaults are needed, the functions
+loadparm_init() in lib/param/loadparm.c and/or init_globals() in
+source3/param/loadparm.c need to be adapted accordingly.
 The rest is generated for you.
 
+It is important to get the attributes right in the <samba:parameter ...>
+tag of the xml files.  These determine the details of the generated code.
+
+- Supported attributes are name, context, type, constant, function,
+  generated_function, synonym, parm, enumlist, handler, and deprecated.
+- Supported contexts are 'G' (for global) and 'S' (for share).
+- Supported types are boolean, boolean-rev, boolean-auto, list,
+  cmdlist, string, ustring, char, integer, bytes, octal, and enum.
+
+
 
 Using smb.conf parameters in the code
 -------------------------------------
-- 
2.4.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150724/ac17ff09/attachment-0001.sig>


More information about the samba-technical mailing list