svn commit: samba r20920 - in
branches/SAMBA_4_0/source/ntvfs/common: .
tridge at samba.org
tridge at samba.org
Sat Jan 20 00:49:05 GMT 2007
Author: tridge
Date: 2007-01-20 00:49:04 +0000 (Sat, 20 Jan 2007)
New Revision: 20920
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20920
Log:
use cluster_tdb_tmp_open() in ntvfs backend code
Modified:
branches/SAMBA_4_0/source/ntvfs/common/brlock_tdb.c
branches/SAMBA_4_0/source/ntvfs/common/notify.c
branches/SAMBA_4_0/source/ntvfs/common/opendb.c
Changeset:
Modified: branches/SAMBA_4_0/source/ntvfs/common/brlock_tdb.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/common/brlock_tdb.c 2007-01-20 00:48:31 UTC (rev 20919)
+++ branches/SAMBA_4_0/source/ntvfs/common/brlock_tdb.c 2007-01-20 00:49:04 UTC (rev 20920)
@@ -87,7 +87,6 @@
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 @@
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;
Modified: branches/SAMBA_4_0/source/ntvfs/common/notify.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/common/notify.c 2007-01-20 00:48:31 UTC (rev 20919)
+++ branches/SAMBA_4_0/source/ntvfs/common/notify.c 2007-01-20 00:49:04 UTC (rev 20920)
@@ -85,7 +85,6 @@
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 @@
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;
Modified: branches/SAMBA_4_0/source/ntvfs/common/opendb.c
===================================================================
--- branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2007-01-20 00:48:31 UTC (rev 20919)
+++ branches/SAMBA_4_0/source/ntvfs/common/opendb.c 2007-01-20 00:49:04 UTC (rev 20920)
@@ -72,7 +72,6 @@
_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 @@
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;
More information about the samba-cvs
mailing list