lib/param: Add new parameter "old password allowed period"
[kai/samba-autobuild/.git] / source3 / param / loadparm.c
index c780f4e72cabaaabb260bff99f65cfbb8c453edf..8006167fe519c4e9e01a2fd4e392633b6291c6b4 100644 (file)
 #include <cups/http.h>
 #endif
 
-#ifdef CLUSTER_SUPPORT
-#include "ctdb_private.h"
-#endif
-
 bool bLoaded = false;
 
 extern userdom_struct current_user_info;
@@ -108,23 +104,6 @@ static int config_backend = CONFIG_BACKEND_FILE;
 
 static bool defaults_saved = false;
 
-#define LOADPARM_EXTRA_GLOBALS \
-       struct parmlist_entry *param_opt;                               \
-       char *realm_original;                                           \
-       int iminreceivefile;                                            \
-       char *szPrintcapname;                                           \
-       int CupsEncrypt;                                                \
-       int  iPreferredMaster;                                          \
-       char *szLdapMachineSuffix;                                      \
-       char *szLdapUserSuffix;                                         \
-       char *szLdapIdmapSuffix;                                        \
-       char *szLdapGroupSuffix;                                        \
-       char *szIdmapUID;                                               \
-       char *szIdmapGID;                                               \
-       char *szIdmapBackend;                                           \
-       int winbindMaxDomainConnections;                                \
-       int ismb2_max_credits;
-
 #include "lib/param/param_global.h"
 
 static struct loadparm_global Globals;
@@ -823,6 +802,7 @@ static void init_globals(bool reinit_globals)
        Globals.read_raw = true;
        Globals.write_raw = true;
        Globals.null_passwords = false;
+       Globals.old_password_allowed_period = 60;
        Globals.obey_pam_restrictions = false;
        Globals.syslog = 1;
        Globals.syslog_only = false;
@@ -951,11 +931,7 @@ static void init_globals(bool reinit_globals)
        string_set(&Globals.cups_server, "");
        string_set(&Globals.iprint_server, "");
 
-#ifdef CLUSTER_SUPPORT
-       string_set(&Globals.ctdbd_socket, CTDB_PATH);
-#else
-       string_set(&Globals.ctdbd_socket, "");
-#endif
+       string_set(&Globals._ctdbd_socket, "");
 
        Globals.cluster_addresses = NULL;
        Globals.clustering = false;
@@ -1089,7 +1065,7 @@ static void init_globals(bool reinit_globals)
  callers without affecting the source string.
 ********************************************************************/
 
-static char *lp_string(TALLOC_CTX *ctx, const char *s)
+char *lp_string(TALLOC_CTX *ctx, const char *s)
 {
        char *ret;
 
@@ -1206,7 +1182,6 @@ FN_LOCAL_CONST_STRING(const_servicename, szService)
 
 /* These functions cannot be auto-generated */
 FN_LOCAL_BOOL(autoloaded, autoloaded)
-FN_GLOBAL_CONST_STRING(dnsdomain, dnsdomain)
 
 /* local prototypes */
 
@@ -5222,7 +5197,7 @@ int lp_min_receive_file_size(void)
        if (Globals.iminreceivefile < 0) {
                return 0;
        }
-       return MIN(Globals.iminreceivefile, BUFFER_SIZE);
+       return Globals.iminreceivefile;
 }
 
 /*******************************************************************
@@ -5280,3 +5255,8 @@ int lp_security(void)
        return lp_find_security(lp__server_role(),
                                lp__security());
 }
+
+struct loadparm_global * get_globals(void)
+{
+       return &Globals;
+}