summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-01-20 00:49:04 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:43:52 -0500
commit2ad79af331ee77a7772a1e7840d3ce613ca051ae (patch)
tree9d43f3121a2b7b9080fc75ced1bfe4c9c38755d6 /source4
parentefc68d8bf6d5acc009285e8f34b30a3a5b252884 (diff)
downloadsamba-2ad79af331ee77a7772a1e7840d3ce613ca051ae.tar.gz
samba-2ad79af331ee77a7772a1e7840d3ce613ca051ae.tar.bz2
samba-2ad79af331ee77a7772a1e7840d3ce613ca051ae.zip
r20920: use cluster_tdb_tmp_open() in ntvfs backend code
(This used to be commit c9080c54872f107d1e42e77261df50a5d55d294f)
Diffstat (limited to 'source4')
-rw-r--r--source4/ntvfs/common/brlock_tdb.c6
-rw-r--r--source4/ntvfs/common/notify.c7
-rw-r--r--source4/ntvfs/common/opendb.c7
3 files changed, 3 insertions, 17 deletions
diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c
index 34c0b7e979..ee83008ce2 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -87,7 +87,6 @@ struct brl_handle {
static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id server,
struct messaging_context *messaging_ctx)
{
- char *path;
struct brl_context *brl;
brl = talloc(mem_ctx, struct brl_context);
@@ -95,10 +94,7 @@ static struct brl_context *brl_tdb_init(TALLOC_CTX *mem_ctx, struct server_id se
return NULL;
}
- path = smbd_tmp_path(brl, "brlock.tdb");
- brl->w = tdb_wrap_open(brl, path, 0,
- TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
- talloc_free(path);
+ brl->w = cluster_tdb_tmp_open(brl, "brlock.tdb", TDB_DEFAULT);
if (brl->w == NULL) {
talloc_free(brl);
return NULL;
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 0ee66a5a41..2306cfe742 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -85,7 +85,6 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
struct event_context *ev,
struct share_config *scfg)
{
- char *path;
struct notify_context *notify;
if (share_bool_option(scfg, NOTIFY_ENABLE, NOTIFY_ENABLE_DEFAULT) != True) {
@@ -97,11 +96,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct server_id server,
return NULL;
}
- path = smbd_tmp_path(notify, "notify.tdb");
- notify->w = tdb_wrap_open(notify, path, 0,
- TDB_SEQNUM,
- O_RDWR|O_CREAT, 0600);
- talloc_free(path);
+ notify->w = cluster_tdb_tmp_open(notify, "notify.tdb", TDB_SEQNUM);
if (notify->w == NULL) {
talloc_free(notify);
return NULL;
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index e272ece3e5..875f90760c 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -72,7 +72,6 @@ struct odb_lock {
_PUBLIC_ struct odb_context *odb_init(TALLOC_CTX *mem_ctx,
struct ntvfs_context *ntvfs_ctx)
{
- char *path;
struct odb_context *odb;
odb = talloc(mem_ctx, struct odb_context);
@@ -80,11 +79,7 @@ _PUBLIC_ struct odb_context *odb_init(TALLOC_CTX *mem_ctx,
return NULL;
}
- path = smbd_tmp_path(odb, "openfiles.tdb");
- odb->w = tdb_wrap_open(odb, path, 0,
- TDB_DEFAULT,
- O_RDWR|O_CREAT, 0600);
- talloc_free(path);
+ odb->w = cluster_tdb_tmp_open(odb, "openfiles.tdb", TDB_DEFAULT);
if (odb->w == NULL) {
talloc_free(odb);
return NULL;