[SCM] Samba Shared Repository - branch master updated
Andreas Schneider
asn at samba.org
Fri Aug 17 12:29:01 UTC 2018
The branch, master has been updated
via 6ca5ba5 lib: Pass mem_ctx to cache_path()
via c2ea100 lib: Pass mem_ctx to state_path()
via f986a73 lib: Pass mem_ctx to lock_path()
via 0a9273f lib: Pass "mem_ctx" down to xx_path
via 0f6b4b4 pygpo: Fix a talloc_tos() leak in py_gpo_get_unix_path
from 682fafe torture3: Extend the g_lock6 test to also cover upgrades
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6ca5ba5272cc6ff5fbada1b9a801ccc16861eb0e
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 16 10:51:44 2018 +0200
lib: Pass mem_ctx to cache_path()
Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
Autobuild-User(master): Andreas Schneider <asn at cryptomilk.org>
Autobuild-Date(master): Fri Aug 17 14:28:51 CEST 2018 on sn-devel-144
commit c2ea10077715fb2a554a9f39b2ff49338bd8a124
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 16 10:51:44 2018 +0200
lib: Pass mem_ctx to state_path()
Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit f986a73b240ea61df1d4664b9c3c6d0858b17111
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 16 10:51:44 2018 +0200
lib: Pass mem_ctx to lock_path()
Fix a confusing API: Many places TALLOC_FREE the path where it's not
clear you have to do it.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 0a9273f888d42f4826c41f098bf692b3d977167f
Author: Volker Lendecke <vl at samba.org>
Date: Thu Aug 16 10:45:23 2018 +0200
lib: Pass "mem_ctx" down to xx_path
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 0f6b4b43711522f4770fb256f328b4b1a3893ffc
Author: Volker Lendecke <vl at samba.org>
Date: Fri Aug 17 10:11:03 2018 +0200
pygpo: Fix a talloc_tos() leak in py_gpo_get_unix_path
cache_path() implicitly puts its result on talloc_tos(). As in
py_gpo_get_unix_path the talloc_stackframe() is only created after the
cache_path() call, we leak the result of cache_path() on
talloc_tos() (which might or might not exist).
This converts the function to the pattern used elsewhere: Create the
stackframe as the very first action and remove it as the very last
action in the function.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
libgpo/pygpo.c | 9 ++++-----
source3/groupdb/mapping_tdb.c | 6 +++---
source3/intl/lang_tdb.c | 2 +-
source3/lib/cleanupdb.c | 2 +-
source3/lib/eventlog/eventlog.c | 4 ++--
source3/lib/g_lock.c | 2 +-
source3/lib/gencache.c | 4 ++--
source3/lib/messages.c | 4 ++--
source3/lib/server_mutex.c | 2 +-
source3/lib/sharesec.c | 2 +-
source3/lib/util_path.c | 18 ++++++++++--------
source3/lib/util_path.h | 9 ++++++---
source3/libads/kerberos.c | 4 ++--
source3/libgpo/gpext/registry.c | 2 +-
source3/libgpo/gpext/scripts.c | 2 +-
source3/libgpo/gpext/security.c | 2 +-
source3/libsmb/samlogon_cache.c | 2 +-
source3/locking/brlock.c | 2 +-
source3/locking/leases_db.c | 2 +-
source3/locking/share_mode_lock.c | 2 +-
source3/modules/vfs_acl_tdb.c | 2 +-
source3/modules/vfs_xattr_tdb.c | 2 +-
source3/nmbd/nmbd_namelistdb.c | 2 +-
source3/nmbd/nmbd_serverlistdb.c | 2 +-
source3/nmbd/nmbd_winsserver.c | 6 +++---
source3/passdb/account_pol.c | 2 +-
source3/passdb/login_cache.c | 2 +-
source3/passdb/pdb_tdb.c | 2 +-
source3/printing/nt_printing.c | 6 +++---
source3/printing/nt_printing_migrate_internal.c | 6 +++---
source3/printing/nt_printing_tdb.c | 6 +++---
source3/printing/printer_list.c | 2 +-
source3/printing/printing.c | 4 ++--
source3/printing/printing_db.c | 2 +-
source3/profile/profile.c | 2 +-
source3/registry/reg_backend_db.c | 4 ++--
source3/registry/reg_perfcount.c | 4 ++--
source3/rpc_server/fss/srv_fss_agent.c | 2 +-
source3/smbd/lanman.c | 2 +-
source3/smbd/smbXsrv_client.c | 2 +-
source3/smbd/smbXsrv_open.c | 2 +-
source3/smbd/smbXsrv_session.c | 2 +-
source3/smbd/smbXsrv_tcon.c | 2 +-
source3/smbd/smbXsrv_version.c | 2 +-
source3/utils/net_ads_gpo.c | 2 +-
source3/utils/net_idmap.c | 4 ++--
source3/utils/net_registry.c | 2 +-
source3/utils/smbcontrol.c | 4 ++--
source3/utils/status.c | 2 +-
source3/winbindd/idmap_autorid.c | 2 +-
source3/winbindd/idmap_tdb.c | 2 +-
source3/winbindd/winbindd.c | 2 +-
source3/winbindd/winbindd_cache.c | 2 +-
53 files changed, 89 insertions(+), 85 deletions(-)
Changeset truncated at 500 lines:
diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
index 60220a6..cd10731 100644
--- a/libgpo/pygpo.c
+++ b/libgpo/pygpo.c
@@ -81,6 +81,8 @@ static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args,
struct GROUP_POLICY_OBJECT *gpo_ptr \
= (struct GROUP_POLICY_OBJECT *)pytalloc_get_ptr(self);
+ frame = talloc_stackframe();
+
if (!PyArg_ParseTupleAndKeywords(args, kwds, "|s",
discard_const_p(char *, kwlist),
&cache_dir)) {
@@ -91,7 +93,7 @@ static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args,
}
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");
@@ -99,12 +101,8 @@ static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args,
}
}
- frame = talloc_stackframe();
-
status = gpo_get_unix_path(frame, cache_dir, gpo_ptr, &unix_path);
- TALLOC_FREE(frame);
-
if (!NT_STATUS_IS_OK(status)) {
PyErr_SetString(PyExc_SystemError,
"Failed to determine gpo unix path");
@@ -114,6 +112,7 @@ static PyObject *py_gpo_get_unix_path(PyObject *self, PyObject *args,
ret = PyStr_FromString(unix_path);
out:
+ TALLOC_FREE(frame);
return ret;
}
diff --git a/source3/groupdb/mapping_tdb.c b/source3/groupdb/mapping_tdb.c
index adc7d0b..3561057 100644
--- a/source3/groupdb/mapping_tdb.c
+++ b/source3/groupdb/mapping_tdb.c
@@ -53,7 +53,7 @@ static bool init_group_mapping(void)
return true;
}
- tdb_path = state_path("group_mapping.tdb");
+ tdb_path = state_path(talloc_tos(), "group_mapping.tdb");
if (tdb_path == NULL) {
return false;
}
@@ -67,7 +67,7 @@ static bool init_group_mapping(void)
return false;
}
- ldb_path = state_path("group_mapping.ldb");
+ ldb_path = state_path(talloc_tos(), "group_mapping.ldb");
if (ldb_path == NULL) {
talloc_free(tdb_path);
return false;
@@ -1084,7 +1084,7 @@ static bool mapping_switch(const char *ldb_path)
}
/* now rename the old db out of the way */
- new_path = state_path("group_mapping.ldb.replaced");
+ new_path = state_path(talloc_tos(), "group_mapping.ldb.replaced");
if (!new_path) {
goto failed;
}
diff --git a/source3/intl/lang_tdb.c b/source3/intl/lang_tdb.c
index ecdfe1d..2e050fd 100644
--- a/source3/intl/lang_tdb.c
+++ b/source3/intl/lang_tdb.c
@@ -149,7 +149,7 @@ bool lang_tdb_init(const char *lang)
goto done;
}
- lpath = lock_path("lang_");
+ lpath = lock_path(talloc_tos(), "lang_");
if (lpath == NULL) {
goto done;
}
diff --git a/source3/lib/cleanupdb.c b/source3/lib/cleanupdb.c
index 3250d60..93d6acc 100644
--- a/source3/lib/cleanupdb.c
+++ b/source3/lib/cleanupdb.c
@@ -38,7 +38,7 @@ static struct tdb_wrap *cleanup_db(void)
return db;
}
- db_path = lock_path("smbd_cleanupd.tdb");
+ db_path = lock_path(talloc_tos(), "smbd_cleanupd.tdb");
if (db_path == NULL) {
return NULL;
}
diff --git a/source3/lib/eventlog/eventlog.c b/source3/lib/eventlog/eventlog.c
index 9053fdd..4b63118 100644
--- a/source3/lib/eventlog/eventlog.c
+++ b/source3/lib/eventlog/eventlog.c
@@ -73,7 +73,7 @@ char *elog_tdbname(TALLOC_CTX *ctx, const char *name )
char *file;
char *tdbname;
- path = state_path("eventlog");
+ path = state_path(talloc_tos(), "eventlog");
if (!path) {
return NULL;
}
@@ -373,7 +373,7 @@ ELOG_TDB *elog_open_tdb( const char *logname, bool force_clear, bool read_only )
/* make sure that the eventlog dir exists */
- eventlogdir = state_path("eventlog");
+ eventlogdir = state_path(talloc_tos(), "eventlog");
if (eventlogdir == NULL) {
return NULL;
}
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index de24b6c..9090a2d 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -154,7 +154,7 @@ struct g_lock_ctx *g_lock_ctx_init(TALLOC_CTX *mem_ctx,
}
result->msg = msg;
- db_path = lock_path("g_lock.tdb");
+ db_path = lock_path(talloc_tos(), "g_lock.tdb");
if (db_path == NULL) {
TALLOC_FREE(result);
return NULL;
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index ab12fc1..b4d374b 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -64,7 +64,7 @@ static bool gencache_init(void)
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;
}
@@ -91,7 +91,7 @@ static bool gencache_init(void)
return false;
}
- cache_fname = lock_path("gencache_notrans.tdb");
+ cache_fname = lock_path(talloc_tos(), "gencache_notrans.tdb");
if (cache_fname == NULL) {
TALLOC_FREE(cache);
return false;
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index dab53f1..cf6c1ce 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -504,7 +504,7 @@ static NTSTATUS messaging_init_internal(TALLOC_CTX *mem_ctx,
return NT_STATUS_INVALID_PARAMETER;
}
- lck_path = lock_path("msg.lock");
+ lck_path = lock_path(talloc_tos(), "msg.lock");
if (lck_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -664,7 +664,7 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx)
.pid = getpid(), .vnn = msg_ctx->id.vnn
};
- lck_path = lock_path("msg.lock");
+ lck_path = lock_path(talloc_tos(), "msg.lock");
if (lck_path == NULL) {
return NT_STATUS_NO_MEMORY;
}
diff --git a/source3/lib/server_mutex.c b/source3/lib/server_mutex.c
index 56673f6..cbb8357 100644
--- a/source3/lib/server_mutex.c
+++ b/source3/lib/server_mutex.c
@@ -70,7 +70,7 @@ struct named_mutex *grab_named_mutex(TALLOC_CTX *mem_ctx, const char *name,
return NULL;
}
- fname = lock_path("mutex.tdb");
+ fname = lock_path(talloc_tos(), "mutex.tdb");
if (fname == NULL) {
TALLOC_FREE(result);
return NULL;
diff --git a/source3/lib/sharesec.c b/source3/lib/sharesec.c
index d790b08..58a2dee 100644
--- a/source3/lib/sharesec.c
+++ b/source3/lib/sharesec.c
@@ -148,7 +148,7 @@ bool share_info_db_init(void)
return True;
}
- db_path = state_path("share_info.tdb");
+ db_path = state_path(talloc_tos(), "share_info.tdb");
if (db_path == NULL) {
return false;
}
diff --git a/source3/lib/util_path.c b/source3/lib/util_path.c
index 5b133df..d9fed29 100644
--- a/source3/lib/util_path.c
+++ b/source3/lib/util_path.c
@@ -38,11 +38,13 @@ struct share_params;
* @retval Pointer to a string containing the full path.
**/
-static char *xx_path(const char *name, const char *rootpath)
+static char *xx_path(TALLOC_CTX *mem_ctx,
+ const char *name,
+ const char *rootpath)
{
char *fname = NULL;
- fname = talloc_strdup(talloc_tos(), rootpath);
+ fname = talloc_strdup(mem_ctx, rootpath);
if (!fname) {
return NULL;
}
@@ -63,9 +65,9 @@ static char *xx_path(const char *name, const char *rootpath)
* @retval Pointer to a talloc'ed string containing the full path.
**/
-char *lock_path(const char *name)
+char *lock_path(TALLOC_CTX *mem_ctx, const char *name)
{
- return xx_path(name, lp_lock_directory());
+ return xx_path(mem_ctx, name, lp_lock_directory());
}
/**
@@ -76,9 +78,9 @@ char *lock_path(const char *name)
* @retval Pointer to a talloc'ed string containing the full path.
**/
-char *state_path(const char *name)
+char *state_path(TALLOC_CTX *mem_ctx, const char *name)
{
- return xx_path(name, lp_state_directory());
+ return xx_path(mem_ctx, name, lp_state_directory());
}
/**
@@ -89,9 +91,9 @@ char *state_path(const char *name)
* @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(name, lp_cache_directory());
+ return xx_path(mem_ctx, name, lp_cache_directory());
}
/**
diff --git a/source3/lib/util_path.h b/source3/lib/util_path.h
index 16e2792..3e7d04d 100644
--- a/source3/lib/util_path.h
+++ b/source3/lib/util_path.h
@@ -24,9 +24,12 @@
#ifndef __LIB_UTIL_PATH_H__
#define __LIB_UTIL_PATH_H__
-char *lock_path(const char *name);
-char *state_path(const char *name);
-char *cache_path(const char *name);
+#include "replace.h"
+#include <talloc.h>
+
+char *lock_path(TALLOC_CTX *mem_ctx, const char *name);
+char *state_path(TALLOC_CTX *mem_ctx, 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
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c
index e623f24..58f38cd 100644
--- a/source3/libads/kerberos.c
+++ b/source3/libads/kerberos.c
@@ -628,7 +628,7 @@ bool create_local_private_krb5_conf_for_domain(const char *realm,
return false;
}
- dname = lock_path("smb_krb5");
+ dname = lock_path(talloc_tos(), "smb_krb5");
if (!dname) {
return false;
}
@@ -639,7 +639,7 @@ bool create_local_private_krb5_conf_for_domain(const char *realm,
goto done;
}
- tmpname = lock_path("smb_tmp_krb5.XXXXXX");
+ tmpname = lock_path(talloc_tos(), "smb_tmp_krb5.XXXXXX");
if (!tmpname) {
goto done;
}
diff --git a/source3/libgpo/gpext/registry.c b/source3/libgpo/gpext/registry.c
index 5d51bdf..525493f 100644
--- a/source3/libgpo/gpext/registry.c
+++ b/source3/libgpo/gpext/registry.c
@@ -291,7 +291,7 @@ static NTSTATUS registry_process_group_policy(TALLOC_CTX *mem_ctx,
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;
}
diff --git a/source3/libgpo/gpext/scripts.c b/source3/libgpo/gpext/scripts.c
index de66413..dfa9958 100644
--- a/source3/libgpo/gpext/scripts.c
+++ b/source3/libgpo/gpext/scripts.c
@@ -364,7 +364,7 @@ static NTSTATUS scripts_process_group_policy(TALLOC_CTX *mem_ctx,
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;
}
diff --git a/source3/libgpo/gpext/security.c b/source3/libgpo/gpext/security.c
index b6b7ca0..a915eec6 100644
--- a/source3/libgpo/gpext/security.c
+++ b/source3/libgpo/gpext/security.c
@@ -154,7 +154,7 @@ static NTSTATUS security_process_group_policy(TALLOC_CTX *mem_ctx,
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;
}
diff --git a/source3/libsmb/samlogon_cache.c b/source3/libsmb/samlogon_cache.c
index ae77610..74e89d7 100644
--- a/source3/libsmb/samlogon_cache.c
+++ b/source3/libsmb/samlogon_cache.c
@@ -51,7 +51,7 @@ bool netsamlogon_cache_init(void)
return true;
}
- path = cache_path(NETSAMLOGON_TDB);
+ path = cache_path(talloc_tos(), NETSAMLOGON_TDB);
if (path == NULL) {
return false;
}
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 33efe37..0c91d55 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -362,7 +362,7 @@ void brl_init(bool read_only)
tdb_flags |= TDB_SEQNUM;
}
- db_path = lock_path("brlock.tdb");
+ db_path = lock_path(talloc_tos(), "brlock.tdb");
if (db_path == NULL) {
DEBUG(0, ("out of memory!\n"));
return;
diff --git a/source3/locking/leases_db.c b/source3/locking/leases_db.c
index 4167ef7..ea63b00 100644
--- a/source3/locking/leases_db.c
+++ b/source3/locking/leases_db.c
@@ -41,7 +41,7 @@ bool leases_db_init(bool read_only)
return true;
}
- db_path = lock_path("leases.tdb");
+ db_path = lock_path(talloc_tos(), "leases.tdb");
if (db_path == NULL) {
return false;
}
diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c
index 9314735..49d4a7c 100644
--- a/source3/locking/share_mode_lock.c
+++ b/source3/locking/share_mode_lock.c
@@ -70,7 +70,7 @@ static bool locking_init_internal(bool read_only)
if (lock_db)
return True;
- db_path = lock_path("locking.tdb");
+ db_path = lock_path(talloc_tos(), "locking.tdb");
if (db_path == NULL) {
return false;
}
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index bb69170..7506e4e 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -50,7 +50,7 @@ static bool acl_tdb_init(void)
return true;
}
- dbname = state_path("file_ntacls.tdb");
+ dbname = state_path(talloc_tos(), "file_ntacls.tdb");
if (dbname == NULL) {
errno = ENOSYS;
diff --git a/source3/modules/vfs_xattr_tdb.c b/source3/modules/vfs_xattr_tdb.c
index f67a86f..32968ae 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -458,7 +458,7 @@ static bool xattr_tdb_init(int snum, TALLOC_CTX *mem_ctx, struct db_context **p_
const char *dbname;
char *def_dbname;
- def_dbname = state_path("xattr.tdb");
+ def_dbname = state_path(talloc_tos(), "xattr.tdb");
if (def_dbname == NULL) {
errno = ENOSYS;
return false;
diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c
index af1f9b7..6122fd1 100644
--- a/source3/nmbd/nmbd_namelistdb.c
+++ b/source3/nmbd/nmbd_namelistdb.c
@@ -647,7 +647,7 @@ void dump_all_namelists(void)
struct subnet_record *subrec;
char *dump_path;
- dump_path = lock_path("namelist.debug");
+ dump_path = lock_path(talloc_tos(), "namelist.debug");
if (dump_path == NULL) {
DEBUG(0, ("out of memory!\n"));
return;
diff --git a/source3/nmbd/nmbd_serverlistdb.c b/source3/nmbd/nmbd_serverlistdb.c
index 05dcb6c..ad25183 100644
--- a/source3/nmbd/nmbd_serverlistdb.c
+++ b/source3/nmbd/nmbd_serverlistdb.c
@@ -300,7 +300,7 @@ void write_browse_list(time_t t, bool force_write)
updatecount++;
- fname = cache_path(SERVER_LIST);
+ fname = cache_path(talloc_tos(), SERVER_LIST);
if (!fname) {
return;
}
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index cd7d3b7..c34bfae 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -601,7 +601,7 @@ bool initialise_wins(void)
return True;
}
- db_path = state_path("wins.tdb");
+ db_path = state_path(talloc_tos(), "wins.tdb");
if (db_path == NULL) {
return false;
}
@@ -620,7 +620,7 @@ bool initialise_wins(void)
add_samba_names_to_subnet(wins_server_subnet);
- list_path = state_path(WINS_LIST);
+ list_path = state_path(talloc_tos(), WINS_LIST);
if (list_path == NULL) {
tdb_close(wins_tdb);
return false;
@@ -2493,7 +2493,7 @@ void wins_write_database(time_t t, bool background)
}
}
- if (!(fname = state_path(WINS_LIST))) {
+ if (!(fname = state_path(talloc_tos(), WINS_LIST))) {
goto err_exit;
}
/* This is safe as the 0 length means "don't expand". */
diff --git a/source3/passdb/account_pol.c b/source3/passdb/account_pol.c
index 421a054..4d94dfe 100644
--- a/source3/passdb/account_pol.c
+++ b/source3/passdb/account_pol.c
@@ -220,7 +220,7 @@ bool init_account_policy(void)
return True;
}
- db_path = state_path("account_policy.tdb");
+ db_path = state_path(talloc_tos(), "account_policy.tdb");
if (db_path == NULL) {
return false;
}
diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index eebb50a..6b636b3 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -38,7 +38,7 @@ bool login_cache_init(void)
/* 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);
--
Samba Shared Repository
More information about the samba-cvs
mailing list