lib/param: Move all enum declarations to lib/param
authorAndrew Bartlett <abartlet@samba.org>
Mon, 23 Jul 2012 02:47:01 +0000 (12:47 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 24 Jul 2012 09:01:17 +0000 (11:01 +0200)
This is in preperation for the parameter table being made common.

Andrew Bartlett

Pair-Programmed-With: Andrew Tridgell <tridge@samba.org>

29 files changed:
lib/param/loadparm.h
lib/param/param_table.c
libgpo/gpo_ldap.c
source3/auth/auth_generic.c
source3/auth/auth_util.c
source3/auth/user_krb5.c
source3/include/ads.h
source3/include/includes.h
source3/include/printing.h
source3/include/smb.h
source3/lib/smbldap.c
source3/lib/util_str.c
source3/libads/kerberos_util.c
source3/libads/ldap.c
source3/libads/ldap_utils.c
source3/libads/ndr.c
source3/libads/sasl.c
source3/libnet/libnet_join.c
source3/librpc/crypto/gse_krb5.c
source3/libsmb/namequery_dc.c
source3/param/loadparm.c
source3/passdb/pdb_ldap.c
source3/smbd/dosmode.c
source3/smbd/mangle_hash.c
source3/smbd/posix_acls.c
source3/utils/net_ads.c
source3/utils/ntlm_auth.c
source3/winbindd/winbindd_cm.c
source3/winbindd/winbindd_dual.c

index 34881dd97b46a70e609ec3b67643f2b402874aee..eb9c76817f48f9bc554f8ca9504c07712d91acd8 100644 (file)
@@ -27,6 +27,9 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+#ifndef _LOADPARM_H
+#define _LOADPARM_H
+
 #include "../lib/util/parmlist.h"
 
 /* the following are used by loadparm for option lists */
@@ -105,6 +108,86 @@ struct parm_struct {
 #define DEFAULT_WORKGROUP "WORKGROUP"
 #endif
 
+/* types of configuration backends for loadparm */
+#define CONFIG_BACKEND_FILE 0
+#define CONFIG_BACKEND_REGISTRY 1
+
+/*
+   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_MAP_TO_GUEST" means session setups with an invalid password
+   are rejected. This is the default.
+
+   "MAP_TO_GUEST_ON_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
+
+   "MAP_TO_GUEST_ON_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.
+*/
+
+#define NEVER_MAP_TO_GUEST             0
+#define MAP_TO_GUEST_ON_BAD_USER       1
+#define MAP_TO_GUEST_ON_BAD_PASSWORD   2
+#define MAP_TO_GUEST_ON_BAD_UID        3
+
+/*
+ * This should be under the HAVE_KRB5 flag but since they're used
+ * in lp_kerberos_method(), they ned to be always available
+ * If you add any entries to KERBEROS_VERIFY defines, please modify USE.*KEYTAB macros
+ * so they remain accurate.
+ */
+
+#define KERBEROS_VERIFY_SECRETS 0
+#define KERBEROS_VERIFY_SYSTEM_KEYTAB 1
+#define KERBEROS_VERIFY_DEDICATED_KEYTAB 2
+#define KERBEROS_VERIFY_SECRETS_AND_KEYTAB 3
+
+/* ACL compatibility */
+enum acl_compatibility {ACL_COMPAT_AUTO, ACL_COMPAT_WINNT, ACL_COMPAT_WIN2K};
+
+/* printing types */
+enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
+                    PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
+                    PRINT_CUPS,PRINT_LPRNT,PRINT_LPROS2,PRINT_IPRINT
+#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
+,PRINT_TEST,PRINT_VLP
+#endif /* DEVELOPER */
+};
+
+
+
+
+/* ads auth control flags */
+#define ADS_AUTH_DISABLE_KERBEROS 0x0001
+#define ADS_AUTH_NO_BIND          0x0002
+#define ADS_AUTH_ANON_BIND        0x0004
+#define ADS_AUTH_SIMPLE_BIND      0x0008
+#define ADS_AUTH_ALLOW_NTLMSSP    0x0010
+#define ADS_AUTH_SASL_SIGN        0x0020
+#define ADS_AUTH_SASL_SEAL        0x0040
+#define ADS_AUTH_SASL_FORCE       0x0080
+#define ADS_AUTH_USER_CREDS       0x0100
+
+/* LDAP SSL options */
+enum ldap_ssl_types {LDAP_SSL_OFF, LDAP_SSL_START_TLS};
+
+/* LDAP PASSWD SYNC methods */
+enum ldap_passwd_sync_types {LDAP_PASSWD_SYNC_ON, LDAP_PASSWD_SYNC_OFF, LDAP_PASSWD_SYNC_ONLY};
+
+/* map readonly options */
+enum mapreadonly_options {MAP_READONLY_NO, MAP_READONLY_YES, MAP_READONLY_PERMISSIONS};
+
+/* case handling */
+enum case_handling {CASE_LOWER,CASE_UPPER};
+
 /*
  * Default passwd chat script.
  */
@@ -137,3 +220,5 @@ const char* server_role_str(uint32_t role);
 int lp_find_server_role(int server_role, int security, int domain_logons, int domain_master);
 int lp_find_security(int server_role, int security);
 bool lp_is_security_and_server_role_valid(int server_role, int security);
+
+#endif /* _LOADPARM_H */
index 922b1478712568f90e454f6b4a559431347ebfd3..9aa0d713a5229107241dbadba1b396f191f60bbc 100644 (file)
@@ -118,3 +118,137 @@ static const struct enum_list enum_dns_update_settings[] = {
        {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}
+};
+
+
+/* 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}
+};
+
+
+/* ACL compatibility options. */
+static const struct enum_list enum_acl_compat_vals[] = {
+    { ACL_COMPAT_AUTO, "auto" },
+    { ACL_COMPAT_WINNT, "winnt" },
+    { ACL_COMPAT_WIN2K, "win2k" },
+    { -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"},
+       {PRINT_CUPS, "cups"},
+       {PRINT_IPRINT, "iprint"},
+       {PRINT_LPRNT, "nt"},
+       {PRINT_LPROS2, "os2"},
+#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
+       {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}
+};
index d46c48f8f3e52e7121a5ecd49ea4808eb7d8d142..803e027cd32cdffc88348d4c3213d1e8546d2d3f 100644 (file)
@@ -21,6 +21,7 @@
 #include "libgpo/gpo.h"
 #include "auth.h"
 #include "../libcli/security/security.h"
+#include "lib/param/loadparm.h"
 
 /****************************************************************
  parse the raw extension string into a GP_EXT structure
index 80f5fa7d3e3611769f58f52646a6cf6815c56255..a2ba4e32573d2a1aca2a2bb02b78b3c100aa4701 100644 (file)
@@ -31,6 +31,7 @@
 #endif
 #include "librpc/crypto/gse.h"
 #include "auth/credentials/credentials.h"
+#include "lib/param/loadparm.h"
 
 static NTSTATUS auth3_generate_session_info_pac(struct auth4_context *auth_ctx,
                                                TALLOC_CTX *mem_ctx,
index c4479d40aad88215cc59430e05a9ada9bd3852b7..28d934add37ca8ee33a109d94b40d8459a68e22f 100644 (file)
@@ -33,6 +33,7 @@
 #include "../librpc/gen_ndr/ndr_auth.h"
 #include "../auth/auth_sam_reply.h"
 #include "../librpc/gen_ndr/idmap.h"
+#include "lib/param/loadparm.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index 0939c70b5a1361b30d33cf0163426e0f4acbe72e..974a8aa2f815e3a5e26e0d59d88643266897babf 100644 (file)
@@ -22,6 +22,7 @@
 #include "librpc/gen_ndr/krb5pac.h"
 #include "nsswitch/libwbclient/wbclient.h"
 #include "passdb.h"
+#include "lib/param/loadparm.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_AUTH
index 3d5fc3aae6fd051578bf57d602ce66984592854f..91a0f8162f90b302ddfe48517520235902ec5353 100644 (file)
@@ -127,17 +127,6 @@ typedef void **ADS_MODLIST;
 
 #define ADS_PINGS          0x0000FFFF  /* Ping response */
 
-/* ads auth control flags */
-#define ADS_AUTH_DISABLE_KERBEROS 0x0001
-#define ADS_AUTH_NO_BIND          0x0002
-#define ADS_AUTH_ANON_BIND        0x0004
-#define ADS_AUTH_SIMPLE_BIND      0x0008
-#define ADS_AUTH_ALLOW_NTLMSSP    0x0010
-#define ADS_AUTH_SASL_SIGN        0x0020
-#define ADS_AUTH_SASL_SEAL        0x0040
-#define ADS_AUTH_SASL_FORCE       0x0080
-#define ADS_AUTH_USER_CREDS       0x0100
-
 enum ads_extended_dn_flags {
        ADS_EXTENDED_DN_HEX_STRING      = 0,
        ADS_EXTENDED_DN_STRING          = 1 /* not supported on win2k */
index 2a117cf227f03f664f9e25f52b23eb46574174af..1b22a5770ccfce37457180b0b37b9212a08ba75c 100644 (file)
@@ -404,6 +404,8 @@ typedef char fstring[FSTRING_LEN];
 #include "proto.h"
 #endif
 
+#include "lib/param/loadparm.h"
+
 /* String routines */
 
 #include "srvstr.h"
index 5d0672cc36f8305775f45f368c1803dcc477b193..391fb7ae823c25acc1e22f8acd7b8e7fae6f12df 100644 (file)
@@ -25,6 +25,7 @@
    SAMBA printing subsystem.
 */
 #include "tdb_compat.h"
+#include "lib/param/loadparm.h"
 
 /* Extra fields above "LPQ_PRINTING" are used to map extra NT status codes. */
 
index 16a4e12a77a784bde4d78620cf1b8db2f296f8d0..c396f0ed2639c44b30ee949c4e60623a5d675b7c 100644 (file)
@@ -633,43 +633,11 @@ http://msdn.microsoft.com/en-us/library/cc246334(PROT.13).aspx
 #define NO_SUBSTREAMS          0x2
 #define NO_REPARSETAG          0x4
 
-/* printing types */
-enum printing_types {PRINT_BSD,PRINT_SYSV,PRINT_AIX,PRINT_HPUX,
-                    PRINT_QNX,PRINT_PLP,PRINT_LPRNG,PRINT_SOFTQ,
-                    PRINT_CUPS,PRINT_LPRNT,PRINT_LPROS2,PRINT_IPRINT
-#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
-,PRINT_TEST,PRINT_VLP
-#endif /* DEVELOPER */
-};
-
-/* LDAP SSL options */
-enum ldap_ssl_types {LDAP_SSL_OFF, LDAP_SSL_START_TLS};
-
-/* LDAP PASSWD SYNC methods */
-enum ldap_passwd_sync_types {LDAP_PASSWD_SYNC_ON, LDAP_PASSWD_SYNC_OFF, LDAP_PASSWD_SYNC_ONLY};
-
-/*
- * This should be under the HAVE_KRB5 flag but since they're used
- * in lp_kerberos_method(), they ned to be always available
- * If you add any entries to KERBEROS_VERIFY defines, please modify USE.*KEYTAB macros
- * so they remain accurate.
- */
-
-#define KERBEROS_VERIFY_SECRETS 0
-#define KERBEROS_VERIFY_SYSTEM_KEYTAB 1
-#define KERBEROS_VERIFY_DEDICATED_KEYTAB 2
-#define KERBEROS_VERIFY_SECRETS_AND_KEYTAB 3
-
 /* Remote architectures we know about. */
 enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT,
                        RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA,
                        RA_SAMBA, RA_CIFSFS, RA_WINXP64, RA_OSX};
 
-/* case handling */
-enum case_handling {CASE_LOWER,CASE_UPPER};
-
-/* ACL compatibility */
-enum acl_compatibility {ACL_COMPAT_AUTO, ACL_COMPAT_WINNT, ACL_COMPAT_WIN2K};
 /*
  * Global value meaning that the smb_uid field should be
  * ingored (in share level security and protocol level == CORE)
@@ -867,32 +835,6 @@ struct node_status_extra {
        /* There really is more here ... */ 
 };
 
-/*
-   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_MAP_TO_GUEST" means session setups with an invalid password
-   are rejected. This is the default.
-
-   "MAP_TO_GUEST_ON_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
-
-   "MAP_TO_GUEST_ON_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.
-*/
-
-#define NEVER_MAP_TO_GUEST             0
-#define MAP_TO_GUEST_ON_BAD_USER       1
-#define MAP_TO_GUEST_ON_BAD_PASSWORD   2
-#define MAP_TO_GUEST_ON_BAD_UID        3
-
 #define SAFE_NETBIOS_CHARS ". -_"
 
 /* The maximum length of a trust account password.
@@ -933,9 +875,6 @@ struct ea_list {
 /* Prefix for xattrs storing streams. */
 #define SAMBA_XATTR_MARKER "user.SAMBA_STREAMS"
 
-/* map readonly options */
-enum mapreadonly_options {MAP_READONLY_NO, MAP_READONLY_YES, MAP_READONLY_PERMISSIONS};
-
 /* usershare error codes. */
 enum usershare_err {
                USERSHARE_OK=0,
index 85a9ac557f94b5e56ccdea151f3fdfe56af78d1d..bdd90f0c950b7df8fd3e33865cfc5ab4c52c2a2e 100644 (file)
@@ -26,6 +26,7 @@
 #include "smbldap.h"
 #include "../libcli/security/security.h"
 #include <tevent.h>
+#include "lib/param/loadparm.h"
 
 /* Try not to hit the up or down server forever */
 
index 8f4098651dca2632fc717f0347522fe3ae62f677..bfa6652543d501616a6fac4557a768ec7b7593b5 100644 (file)
@@ -23,6 +23,7 @@
 */
 
 #include "includes.h"
+#include "lib/param/loadparm.h"
 
 const char toupper_ascii_fast_table[128] = {
        0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf,
index f252645efd92b6c5c9103610a90c9cef0f5241f8..7d49c02869f7a86279b0729d6cbe47f2546cd5fd 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "smb_krb5.h"
 #include "ads.h"
+#include "lib/param/loadparm.h"
 
 #ifdef HAVE_KRB5
 
index 5c77df1ade3f765ea028a59add86cc0b1ddb09ef..640a020a8bdbbe12cd638acfed73fdff79706e72 100644 (file)
@@ -29,6 +29,7 @@
 #include "../libds/common/flags.h"
 #include "smbldap.h"
 #include "../libcli/security/security.h"
+#include "lib/param/loadparm.h"
 
 #ifdef HAVE_LDAP
 
index 8a4b452b876d9d5b9d0522bc1ac608dcfede3a8b..88db3a3ab73e09e3ade386029d98e5bc15c7dbfc 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "includes.h"
 #include "ads.h"
+#include "lib/param/loadparm.h"
 
 #ifdef HAVE_LDAP
 
index c667aa3637679e63809c7815595e0e1c408b3df1..fd0b63e87da11fa3249b984eba1ba42f84fdfb1f 100644 (file)
@@ -23,6 +23,7 @@
 #include "ads.h"
 #include "../librpc/gen_ndr/ndr_netlogon.h"
 #include "../librpc/ndr/libndr.h"
+#include "lib/param/loadparm.h"
 
 static void ndr_print_ads_auth_flags(struct ndr_print *ndr, const char *name, uint32_t r)
 {
index 42d65b63d47e01307fcf5ca09cc96ff0eb0ab080..ee3a693f717b66001f8bc87d413d7df52ae995d1 100644 (file)
@@ -24,6 +24,7 @@
 #include "ads.h"
 #include "smb_krb5.h"
 #include "system/gssapi.h"
+#include "lib/param/loadparm.h"
 
 #ifdef HAVE_LDAP
 
index c549b586cb5a544cf3afad909deddc497b8de3a0..c9b2282b515083118d39a609a1dadb64153ef0ec 100644 (file)
@@ -39,6 +39,7 @@
 #include "passdb.h"
 #include "libsmb/libsmb.h"
 #include "../libcli/smb/smbXcli_base.h"
+#include "lib/param/loadparm.h"
 
 /****************************************************************
 ****************************************************************/
index c1eea7fc705265307a9171aa7d28fe7e7fd5fd3d..dbcc520048d913ca350887cebd2e7fd5dadaeafe 100644 (file)
@@ -21,6 +21,7 @@
 #include "smb_krb5.h"
 #include "secrets.h"
 #include "gse_krb5.h"
+#include "lib/param/loadparm.h"
 
 #ifdef HAVE_KRB5
 
index 39b780c611e6a7bb142ba7db07c571cb9a16b4db..d4e68cb00cd31cecae1a0d99ae3b05ae962c1f14 100644 (file)
@@ -26,6 +26,7 @@
 #include "libads/sitename_cache.h"
 #include "ads.h"
 #include "../librpc/gen_ndr/nbt.h"
+#include "lib/param/loadparm.h"
 
 /**********************************************************************
  Is this our primary domain ?
index a116531ebd547ca37a9905ab97303ad785e4986c..26f81f2eca03dd2ddf035a1b82b339459fb31344 100644 (file)
 #include "includes.h"
 #include "system/filesys.h"
 #include "util_tdb.h"
+#include "lib/param/loadparm.h"
 #include "printing.h"
 #include "lib/smbconf/smbconf.h"
 #include "lib/smbconf/smbconf_init.h"
-#include "lib/param/loadparm.h"
 
 #include "ads.h"
 #include "../librpc/gen_ndr/svcctl.h"
@@ -97,9 +97,6 @@ extern userdom_struct current_user_info;
 static bool in_client = false;         /* Not in the client by default */
 static struct smbconf_csn conf_last_csn;
 
-#define CONFIG_BACKEND_FILE 0
-#define CONFIG_BACKEND_REGISTRY 1
-
 static int config_backend = CONFIG_BACKEND_FILE;
 
 /* some helpful bits */
@@ -326,138 +323,6 @@ static void free_param_opts(struct parmlist_entry **popts);
 
 #include "lib/param/param_table.c"
 
-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"},
-       {PRINT_CUPS, "cups"},
-       {PRINT_IPRINT, "iprint"},
-       {PRINT_LPRNT, "nt"},
-       {PRINT_LPROS2, "os2"},
-#if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
-       {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}
-};
-
-
-/* ACL compatibility options. */
-static const struct enum_list enum_acl_compat_vals[] = {
-    { ACL_COMPAT_AUTO, "auto" },
-    { ACL_COMPAT_WINNT, "winnt" },
-    { ACL_COMPAT_WIN2K, "win2k" },
-    { -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}
-};
-
-/* 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}
-};
-
 /* Note: We do not initialise the defaults union - it is not allowed in ANSI C
  *
  * The FLAG_HIDE is explicit. Parameters set this way do NOT appear in any edit
index e4dcbc370c89bddd85d6d423cf98afeb42172541..302717eb552e1575fc81aa79fb0d8eecd0bf9143 100644 (file)
@@ -52,6 +52,7 @@
 #include "../lib/util/util_pw.h"
 #include "lib/winbind_util.h"
 #include "librpc/gen_ndr/idmap.h"
+#include "lib/param/loadparm.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_PASSDB
index 836ffd0de57e69c9caae3541a86cc0f39434968f..ad04a6515be859d3b937ce7a4bd60454472b9019 100644 (file)
@@ -23,6 +23,7 @@
 #include "librpc/gen_ndr/ndr_xattr.h"
 #include "../libcli/security/security.h"
 #include "smbd/smbd.h"
+#include "lib/param/loadparm.h"
 
 static uint32_t filter_mode_by_protocol(uint32_t mode)
 {
index 8b1b6bf915d9c47191e4d9be9ac9dcf5164ba461..056879c8765b0a8d1b0215f6e50bd24dc99fc367 100644 (file)
@@ -26,6 +26,7 @@
 #include "smbd/globals.h"
 #include "mangle.h"
 #include "util_tdb.h"
+#include "lib/param/loadparm.h"
 
 /* -------------------------------------------------------------------------- **
  * Other stuff...
index 9753bfeb6169bbb4e26a35b0419991f6b5ff3fc1..59f8e0cd4412200ba7b4e6f63d74cbf62b3e56a7 100644 (file)
@@ -27,6 +27,7 @@
 #include "passdb/lookup_sid.h"
 #include "auth.h"
 #include "../librpc/gen_ndr/idmap.h"
+#include "lib/param/loadparm.h"
 
 extern const struct generic_mapping file_generic_mapping;
 
index 998ccb8c3b530af6b8b3699a21bc2838b4c580fe..a4f1588e515800550b39c3177fdf82cdeaa10c41 100644 (file)
@@ -37,6 +37,7 @@
 #include "krb5_env.h"
 #include "../libcli/security/security.h"
 #include "libsmb/libsmb.h"
+#include "lib/param/loadparm.h"
 
 #ifdef HAVE_ADS
 
index afb51e9356b1debbd2afb62c76ce53d7739945f9..103a1f6d16ef6d7ddbf2266381776c3f9e242ae3 100644 (file)
@@ -45,6 +45,7 @@
 #include "source3/include/auth.h"
 #include "source3/auth/proto.h"
 #include "nsswitch/libwbclient/wbclient.h"
+#include "lib/param/loadparm.h"
 
 #if HAVE_KRB5
 #include "auth/kerberos/pac_utils.h"
index 1651b1bd0e2325ddb4351dfbf0d45b6535424a25..5a602422ae05e8ade94722e05195c0e7e912b496 100644 (file)
@@ -78,6 +78,7 @@
 #include "messages.h"
 #include "auth/gensec/gensec.h"
 #include "../libcli/smb/smbXcli_base.h"
+#include "lib/param/loadparm.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND
index 0e9bea123ea685a44d459ba7334847435a29bb85..60b15e3fe45b55d649148a02618a39f6e168725d 100644 (file)
@@ -36,6 +36,7 @@
 #include "system/select.h"
 #include "messages.h"
 #include "../lib/util/tevent_unix.h"
+#include "lib/param/loadparm.h"
 
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_WINBIND