param: Make internal handler for 'server role' common
authorAndrew Bartlett <abartlet@samba.org>
Mon, 23 Jul 2012 01:38:25 +0000 (11:38 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 24 Jul 2012 00:46:12 +0000 (10:46 +1000)
lib/param/loadparm.c
lib/param/param_functions.c
source3/param/loadparm.c

index ea20e2d7f3c8fd85cb7f867d8627f5e0617ff4f8..323b795d76e8015cf3412e0d18bdef51aa6c64e9 100644 (file)
@@ -83,7 +83,6 @@ static bool defaults_saved = false;
        char *tls_dhpfile;                                              \
        char *loglevel;                                                 \
        char *panic_action;                                             \
-       int server_role;                                                \
        int security;                                                   \
        int domain_master;                                              \
        int domain_logons;                                              \
index d12faa60e2a5dca08443a0a65b1760059c53aad4..9ebc38119f38d0b60aba99d0eb9e292b0583f6fa 100644 (file)
@@ -211,6 +211,7 @@ FN_GLOBAL_BOOL(passwd_chat_debug, bPasswdChatDebug)
 FN_GLOBAL_BOOL(registry_shares, bRegistryShares)
 FN_GLOBAL_BOOL(reset_on_zero_vc, bResetOnZeroVC)
 FN_GLOBAL_BOOL(rpc_big_endian, bRpcBigEndian)
+FN_GLOBAL_BOOL(_server_role, server_role)
 FN_GLOBAL_BOOL(stat_cache, bStatCache)
 FN_GLOBAL_BOOL(syslog_only, bSyslogOnly)
 FN_GLOBAL_BOOL(timestamp_logs, bTimestampLogs)
index 3a21ac4fe802b156238dcaa43e7b60459afb22a5..4396e92007d031726f5e6e046bd77b1be4dc45c7 100644 (file)
@@ -605,7 +605,7 @@ static struct parm_struct parm_table[] = {
                .label          = "server role",
                .type           = P_ENUM,
                .p_class        = P_GLOBAL,
-               .offset         = GLOBAL_VAR(ServerRole),
+               .offset         = GLOBAL_VAR(server_role),
                .special        = NULL,
                .enum_list      = enum_server_role,
                .flags          = FLAG_BASIC | FLAG_ADVANCED,
@@ -4747,7 +4747,7 @@ static void init_globals(bool reinit_globals)
        Globals.PrintcapCacheTime = 750;        /* 12.5 minutes */
 
        Globals.ConfigBackend = config_backend;
-       Globals.ServerRole = ROLE_AUTO;
+       Globals.server_role = ROLE_AUTO;
 
        /* Was 65535 (0xFFFF). 0x4101 matches W2K and causes major speed improvements... */
        /* Discovered by 2 days of pain by Don McCall @ HP :-). */
@@ -5057,7 +5057,6 @@ char *lp_ ## fn_name(TALLOC_CTX *ctx,int i) {return(lp_string((ctx), (LP_SNUM_OK
 static FN_GLOBAL_BOOL(domain_logons, bDomainLogons)
 static FN_GLOBAL_BOOL(_readraw, bReadRaw)
 static FN_GLOBAL_BOOL(_writeraw, bWriteRaw)
-static FN_GLOBAL_INTEGER(_server_role, ServerRole)
 
 /* If lp_statedir() and lp_cachedir() are explicitely set during the
  * build process or in smb.conf, we use that value.  Otherwise they