From 280d1877fdc9c481f1cfc6e62c74ed398da97d01 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 23 Jul 2012 12:35:02 +1000 Subject: lib/param: Rename param_enums.c to param_table.c This is in preperation for the parameter table being merged into this file. Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Tue Jul 24 09:16:44 CEST 2012 on sn-devel-104 --- lib/param/loadparm.c | 2 +- lib/param/param_enums.c | 120 ----------------------------------------------- lib/param/param_table.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++ source3/param/loadparm.c | 2 +- 4 files changed, 122 insertions(+), 122 deletions(-) delete mode 100644 lib/param/param_enums.c create mode 100644 lib/param/param_table.c diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 407b942dc9..e744e79206 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -105,7 +105,7 @@ static bool handle_debuglevel(struct loadparm_context *lp_ctx, int unused, static bool handle_logfile(struct loadparm_context *lp_ctx, int unused, const char *pszParmValue, char **ptr); -#include "lib/param/param_enums.c" +#include "lib/param/param_table.c" #define GLOBAL_VAR(name) offsetof(struct loadparm_global, name) #define LOCAL_VAR(name) offsetof(struct loadparm_service, name) diff --git a/lib/param/param_enums.c b/lib/param/param_enums.c deleted file mode 100644 index 922b147871..0000000000 --- a/lib/param/param_enums.c +++ /dev/null @@ -1,120 +0,0 @@ -/* - 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 2003 - Copyright (C) Michael Adam 2008 - Copyright (C) Jelmer Vernooij 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 . -*/ - -static const struct enum_list enum_protocol[] = { - {PROTOCOL_SMB2_10, "SMB2"}, /* for now keep PROTOCOL_SMB2_10 */ - {PROTOCOL_SMB3_00, "SMB3"}, /* for now keep PROTOCOL_SMB3_00 */ - {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"}, -#if (defined(HAVE_ADS) || _SAMBA_BUILD_ >= 4) - {SEC_ADS, "ADS"}, -#endif - {-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_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, "False"}, - {DNS_UPDATE_ON, "True"}, - {DNS_UPDATE_SIGNED, "signed"}, - {-1, NULL} -}; diff --git a/lib/param/param_table.c b/lib/param/param_table.c new file mode 100644 index 0000000000..922b147871 --- /dev/null +++ b/lib/param/param_table.c @@ -0,0 +1,120 @@ +/* + 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 2003 + Copyright (C) Michael Adam 2008 + Copyright (C) Jelmer Vernooij 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 . +*/ + +static const struct enum_list enum_protocol[] = { + {PROTOCOL_SMB2_10, "SMB2"}, /* for now keep PROTOCOL_SMB2_10 */ + {PROTOCOL_SMB3_00, "SMB3"}, /* for now keep PROTOCOL_SMB3_00 */ + {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"}, +#if (defined(HAVE_ADS) || _SAMBA_BUILD_ >= 4) + {SEC_ADS, "ADS"}, +#endif + {-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_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, "False"}, + {DNS_UPDATE_ON, "True"}, + {DNS_UPDATE_SIGNED, "signed"}, + {-1, NULL} +}; diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index cbabdf7cc8..a116531ebd 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -324,7 +324,7 @@ static void add_to_file_list(const char *fname, const char *subfname); static bool lp_set_cmdline_helper(const char *pszParmName, const char *pszParmValue, bool store_values); static void free_param_opts(struct parmlist_entry **popts); -#include "lib/param/param_enums.c" +#include "lib/param/param_table.c" static const struct enum_list enum_printing[] = { {PRINT_SYSV, "sysv"}, -- cgit