[SCM] Samba Shared Repository - branch master updated -
4a578ec50b672d564150c956d5e479b4a3e9031b
Steven Danneman
sdanneman at samba.org
Tue Jan 13 01:52:40 GMT 2009
The branch, master has been updated
via 4a578ec50b672d564150c956d5e479b4a3e9031b (commit)
via 7b02e05eb64f3ffd7aa1cf027d10a7343c0da757 (commit)
from f497a79f28180e1ddcdb1749e4e5c43532474de9 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 4a578ec50b672d564150c956d5e479b4a3e9031b
Author: Steven Danneman <steven.danneman at isilon.com>
Date: Sun Jan 11 22:56:48 2009 -0800
Covert several persistant tdb files to use state_path() instead of lock_path()
commit 7b02e05eb64f3ffd7aa1cf027d10a7343c0da757
Author: Steven Danneman <steven.danneman at isilon.com>
Date: Sun Jan 11 22:44:10 2009 -0800
Audit usage of get_dyn_STATEDIR() and replace with state_path()
The state directory is now run-time configurable through loadparm, so all
references to it should be done through state_path() or lp_statedir().
-----------------------------------------------------------------------
Summary of changes:
source3/modules/vfs_acl_tdb.c | 2 +-
source3/modules/vfs_xattr_tdb.c | 2 +-
source3/nmbd/nmbd_winsserver.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 3d140e3..a796981 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -44,7 +44,7 @@ static bool acl_tdb_init(struct db_context **pp_db)
return true;
}
- dbname = lock_path("file_ntacls.tdb");
+ dbname = state_path("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 8320a58..c4806e2 100644
--- a/source3/modules/vfs_xattr_tdb.c
+++ b/source3/modules/vfs_xattr_tdb.c
@@ -576,7 +576,7 @@ static bool xattr_tdb_init(int snum, struct db_context **p_db)
const char *dbname;
dbname = lp_parm_const_string(snum, "xattr_tdb", "file",
- lock_path("xattr.tdb"));
+ state_path("xattr.tdb"));
if (dbname == NULL) {
errno = ENOSYS;
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 74bed68..fecc5ba 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -583,7 +583,7 @@ bool initialise_wins(void)
}
/* Open the wins.tdb. */
- wins_tdb = tdb_open_log(lock_path("wins.tdb"), 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST, O_CREAT|O_RDWR, 0600);
+ wins_tdb = tdb_open_log(state_path("wins.tdb"), 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST, O_CREAT|O_RDWR, 0600);
if (!wins_tdb) {
DEBUG(0,("initialise_wins: failed to open wins.tdb. Error was %s\n",
strerror(errno) ));
@@ -2366,7 +2366,7 @@ void wins_write_database(time_t t, bool background)
}
}
- if (asprintf(&fname, "%s/%s", get_dyn_STATEDIR(), WINS_LIST) < 0) {
+ if (!(fname = state_path(WINS_LIST))) {
goto err_exit;
}
/* This is safe as the 0 length means "don't expand". */
@@ -2394,8 +2394,8 @@ void wins_write_database(time_t t, bool background)
err_exit:
- SAFE_FREE(fname);
SAFE_FREE(fnamenew);
+ /* fname is talloced and doesn't need to be freed */
if (background) {
_exit(0);
--
Samba Shared Repository
More information about the samba-cvs
mailing list