r4339: - rename auth_guest to auth_anonymous
[samba.git] / source4 / param / loadparm.c
index 978d86a9a3ada1093c724b049b3d8ee48c887946..059b7b1cb24772168b82806a389735abe8bf679b 100644 (file)
@@ -924,7 +924,7 @@ static void init_globals(void)
 
        do_parameter("dcerpc endpoint servers", "epmapper srvsvc wkssvc rpcecho samr netlogon lsarpc spoolss drsuapi winreg IOXIDResolver IRemoteActivation");
        do_parameter("server services", "smb rpc");
-       do_parameter("auth methods", "guest sam_ignoredomain");
+       do_parameter("auth methods", "anonymous sam_ignoredomain");
        do_parameter("smb passwd file", dyn_SMB_PASSWD_FILE);
        do_parameter("private dir", dyn_PRIVATE_DIR);
        do_parameter_var("sam database", "tdb://%s/sam.ldb", dyn_PRIVATE_DIR);
@@ -1568,9 +1568,7 @@ static int add_a_service(const service *pservice, const char *name)
        if (i == iNumServices) {
                service **tsp;
                
-               tsp = (service **) Realloc(ServicePtrs,
-                                          sizeof(service *) *
-                                          num_to_alloc);
+               tsp = realloc_p(ServicePtrs, service *, num_to_alloc);
                                           
                if (!tsp) {
                        DEBUG(0,("add_a_service: failed to enlarge ServicePtrs!\n"));
@@ -1578,8 +1576,7 @@ static int add_a_service(const service *pservice, const char *name)
                }
                else {
                        ServicePtrs = tsp;
-                       ServicePtrs[iNumServices] =
-                               (service *) malloc(sizeof(service));
+                       ServicePtrs[iNumServices] = malloc_p(service);
                }
                if (!ServicePtrs[iNumServices]) {
                        DEBUG(0,("add_a_service: out of memory!\n"));
@@ -1873,7 +1870,7 @@ static void copy_service(service * pserviceDest, service * pserviceSource, BOOL
                        pdata = pdata->next;
                }
                if (not_added) {
-                       paramo = smb_xmalloc(sizeof(*paramo));
+                       paramo = smb_xmalloc_p(struct param_opt);
                        paramo->key = strdup(data->key);
                        paramo->value = strdup(data->value);
                        DLIST_ADD(pserviceDest->param_opt, paramo);
@@ -1942,7 +1939,7 @@ static void add_to_file_list(const char *fname, const char *subfname)
        }
 
        if (!f) {
-               f = (struct file_lists *)malloc(sizeof(file_lists[0]));
+               f = malloc_p(struct file_lists);
                if (!f)
                        return;
                f->next = file_lists;
@@ -2187,7 +2184,7 @@ static void init_copymap(service * pservice)
 {
        int i;
        SAFE_FREE(pservice->copymap);
-       pservice->copymap = (BOOL *)malloc(sizeof(BOOL) * NUMPARAMETERS);
+       pservice->copymap = malloc_array_p(BOOL, NUMPARAMETERS);
        if (!pservice->copymap)
                DEBUG(0,
                      ("Couldn't allocate copymap!! (size %d)\n",
@@ -2249,7 +2246,7 @@ static BOOL lp_do_parameter_parametric(int snum, const char *pszParmName, const
                }
        }
 
-       paramo = smb_xmalloc(sizeof(*paramo));
+       paramo = smb_xmalloc_p(struct param_opt);
        paramo->key = strdup(name);
        paramo->value = strdup(pszParmValue);
        paramo->flags = flags;
@@ -3071,6 +3068,9 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults,
                lp_do_parameter(-1, "wins server", "127.0.0.1");
        }
 
+       lp_do_parameter(-1, "gensec:krb5", "False");
+       lp_do_parameter(-1, "gensec:ms_krb5", "False");
+
        init_iconv();
 
        return (bRetval);