#include "includes.h"
+static char *alloc_sub_basic(const char *smb_name, const char *domain_name,
+ const char *str);
+
userdom_struct current_user_info;
fstring remote_proto="UNKNOWN";
/****************************************************************************
****************************************************************************/
-char *alloc_sub_basic(const char *smb_name, const char *domain_name,
- const char *str)
+static char *alloc_sub_basic(const char *smb_name, const char *domain_name,
+ const char *str)
{
char *b, *p, *s, *r, *a_string;
fstring pidstr, vnnstr;
DEBUG(6, ("lp_file_list_changed()\n"));
while (f) {
- char *n2 = NULL;
time_t mod_time;
if (strequal(f->name, INCLUDE_REGISTRY_NAME)) {
return true;
}
} else {
- n2 = alloc_sub_basic(get_current_username(),
- current_user_info.domain,
- f->name);
+ char *n2 = NULL;
+ n2 = talloc_sub_basic(talloc_tos(),
+ get_current_username(),
+ current_user_info.domain,
+ f->name);
if (!n2) {
return false;
}
above. */
return true;
}
- SAFE_FREE(n2);
+ TALLOC_FREE(n2);
}
f = f->next;
}
static bool handle_netbios_name(int snum, const char *pszParmValue, char **ptr)
{
bool ret;
- char *netbios_name = alloc_sub_basic(get_current_username(),
- current_user_info.domain,
- pszParmValue);
+ char *netbios_name = talloc_sub_basic(
+ talloc_tos(), get_current_username(), current_user_info.domain,
+ pszParmValue);
ret = set_global_myname(netbios_name);
- SAFE_FREE(netbios_name);
+ TALLOC_FREE(netbios_name);
string_set(&Globals.szNetbiosName,global_myname());
DEBUG(4, ("handle_netbios_name: set global_myname to: %s\n",
}
}
- fname = alloc_sub_basic(get_current_username(),
- current_user_info.domain,
- pszParmValue);
+ fname = talloc_sub_basic(talloc_tos(), get_current_username(),
+ current_user_info.domain,
+ pszParmValue);
add_to_file_list(pszParmValue, fname);
include_depth++;
ret = pm_process(fname, do_section, do_parameter, NULL);
include_depth--;
- SAFE_FREE(fname);
+ TALLOC_FREE(fname);
return ret;
}
DEBUG(2, ("Can't find include file %s\n", fname));
- SAFE_FREE(fname);
+ TALLOC_FREE(fname);
return true;
}
iServiceIndex = -1;
if (lp_config_backend_is_file()) {
- n2 = alloc_sub_basic(get_current_username(),
+ n2 = talloc_sub_basic(talloc_tos(), get_current_username(),
current_user_info.domain,
pszFname);
if (!n2) {
add_to_file_list(pszFname, n2);
bRetval = pm_process(n2, do_section, do_parameter, NULL);
- SAFE_FREE(n2);
+ TALLOC_FREE(n2);
/* finish up the last section */
DEBUG(4, ("pm_process() returned %s\n", BOOLSTR(bRetval)));