summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Danneman <steven.danneman@isilon.com>2009-01-11 22:44:10 -0800
committerSteven Danneman <steven.danneman@isilon.com>2009-01-12 17:46:14 -0800
commit7b02e05eb64f3ffd7aa1cf027d10a7343c0da757 (patch)
tree9cf5c9e8bd65b2e155b9a611568223550990a696
parentf497a79f28180e1ddcdb1749e4e5c43532474de9 (diff)
downloadsamba-7b02e05eb64f3ffd7aa1cf027d10a7343c0da757.tar.gz
samba-7b02e05eb64f3ffd7aa1cf027d10a7343c0da757.tar.bz2
samba-7b02e05eb64f3ffd7aa1cf027d10a7343c0da757.zip
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().
-rw-r--r--source3/nmbd/nmbd_winsserver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_winsserver.c b/source3/nmbd/nmbd_winsserver.c
index 74bed684fd..70118063b4 100644
--- a/source3/nmbd/nmbd_winsserver.c
+++ b/source3/nmbd/nmbd_winsserver.c
@@ -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);