}
if (!cache_dir) {
- cache_dir = cache_path(GPO_CACHE_DIR);
+ cache_dir = cache_path(talloc_tos(), GPO_CACHE_DIR);
if (!cache_dir) {
PyErr_SetString(PyExc_MemoryError,
"Failed to determine gpo cache dir");
hash_size = lp_parm_int(-1, "gencache", "hash_size", 10000);
- cache_fname = cache_path("gencache.tdb");
+ cache_fname = cache_path(talloc_tos(), "gencache.tdb");
if (cache_fname == NULL) {
return false;
}
* @retval Pointer to a talloc'ed string containing the full path.
**/
-char *cache_path(const char *name)
+char *cache_path(TALLOC_CTX *mem_ctx, const char *name)
{
- return xx_path(talloc_tos(), name, lp_cache_directory());
+ return xx_path(mem_ctx, name, lp_cache_directory());
}
/**
char *lock_path(TALLOC_CTX *mem_ctx, const char *name);
char *state_path(TALLOC_CTX *mem_ctx, const char *name);
-char *cache_path(const char *name);
+char *cache_path(TALLOC_CTX *mem_ctx, const char *name);
char *canonicalize_absolute_path(TALLOC_CTX *ctx, const char *abs_path);
#endif
size_t num_entries = 0;
char *unix_path = NULL;
const struct GROUP_POLICY_OBJECT *gpo;
- char *gpo_cache_path = cache_path(GPO_CACHE_DIR);
+ char *gpo_cache_path = cache_path(talloc_tos(), GPO_CACHE_DIR);
if (gpo_cache_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
GP_SCRIPTS_INI_LOGOFF
};
const struct GROUP_POLICY_OBJECT *gpo;
- char *gpo_cache_path = cache_path(GPO_CACHE_DIR);
+ char *gpo_cache_path = cache_path(talloc_tos(), GPO_CACHE_DIR);
if (gpo_cache_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
char *unix_path = NULL;
struct gp_inifile_context *ini_ctx = NULL;
const struct GROUP_POLICY_OBJECT *gpo;
- char *gpo_cache_path = cache_path(GPO_CACHE_DIR);
+ char *gpo_cache_path = cache_path(talloc_tos(), GPO_CACHE_DIR);
if (gpo_cache_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
return true;
}
- path = cache_path(NETSAMLOGON_TDB);
+ path = cache_path(talloc_tos(), NETSAMLOGON_TDB);
if (path == NULL) {
return false;
}
updatecount++;
- fname = cache_path(SERVER_LIST);
+ fname = cache_path(talloc_tos(), SERVER_LIST);
if (!fname) {
return;
}
/* skip file open if it's already opened */
if (cache) return True;
- cache_fname = cache_path(LOGIN_CACHE_FILE);
+ cache_fname = cache_path(talloc_tos(), LOGIN_CACHE_FILE);
if (cache_fname == NULL) {
DEBUG(0, ("Filename allocation failed.\n"));
return False;
return false;
}
- print_cache_path = cache_path("printing");
+ print_cache_path = cache_path(talloc_tos(), "printing");
if (print_cache_path == NULL) {
return false;
}
return false;
}
- print_cache_path = cache_path("printing.tdb");
+ print_cache_path = cache_path(talloc_tos(), "printing.tdb");
if (print_cache_path == NULL) {
return false;
}
DLIST_ADD(print_db_head, p);
}
- print_cache_path = cache_path("printing/");
+ print_cache_path = cache_path(talloc_tos(), "printing/");
if (print_cache_path == NULL) {
DLIST_REMOVE(print_db_head, p);
SAFE_FREE(p);
return true;
}
- db_name = cache_path("smbprofile.tdb");
+ db_name = cache_path(talloc_tos(), "smbprofile.tdb");
if (db_name == NULL) {
return false;
}
char **lines;
bool local_list_only;
int i;
- char *slist_cache_path = cache_path(SERVER_LIST);
+ char *slist_cache_path = cache_path(talloc_tos(), SERVER_LIST);
if (slist_cache_path == NULL) {
return 0;
}
d_printf(_("finished\n"));
d_printf(_("* Refreshing Group Policy Data "));
- gpo_cache_path = cache_path(GPO_CACHE_DIR);
+ gpo_cache_path = cache_path(talloc_tos(), GPO_CACHE_DIR);
if (gpo_cache_path == NULL) {
d_printf(_("failed: %s\n"), nt_errstr(NT_STATUS_NO_MEMORY));
goto out;