summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-29 08:38:59 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:01 -0500
commit09d0b152b7bd85aa01898af81bd166a7673ab886 (patch)
tree6bebf9648412322c15b2b8a5777aa67c3a09d463 /source4/ntvfs
parent98052096e3150c2b1a3d31fc6fcc1dbc0d7a3067 (diff)
downloadsamba-09d0b152b7bd85aa01898af81bd166a7673ab886.tar.gz
samba-09d0b152b7bd85aa01898af81bd166a7673ab886.tar.bz2
samba-09d0b152b7bd85aa01898af81bd166a7673ab886.zip
r3360: improved the deletion of tmp files. smbd now puts all tmp files in var/locks/smbd.tmp/
and deletes that dir on startup. (This used to be commit 7e942e7f1bd2c293a0e6648df43a96f8b8a2a295)
Diffstat (limited to 'source4/ntvfs')
-rw-r--r--source4/ntvfs/common/brlock.c5
-rw-r--r--source4/ntvfs/common/opendb.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/source4/ntvfs/common/brlock.c b/source4/ntvfs/common/brlock.c
index 0f6af3e971..a952cb1dc7 100644
--- a/source4/ntvfs/common/brlock.c
+++ b/source4/ntvfs/common/brlock.c
@@ -82,10 +82,9 @@ struct brl_context *brl_init(TALLOC_CTX *mem_ctx, servid_t server, uint16_t tid,
return NULL;
}
- path = lock_path(brl, "brlock.tdb");
+ path = smbd_tmp_path(brl, "brlock.tdb");
brl->w = tdb_wrap_open(brl, path, 0,
- TDB_DEFAULT,
- O_RDWR|O_CREAT, 0600);
+ TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
talloc_free(path);
if (brl->w == NULL) {
talloc_free(brl);
diff --git a/source4/ntvfs/common/opendb.c b/source4/ntvfs/common/opendb.c
index a66549b764..c2c8075771 100644
--- a/source4/ntvfs/common/opendb.c
+++ b/source4/ntvfs/common/opendb.c
@@ -86,7 +86,7 @@ struct odb_context *odb_init(TALLOC_CTX *mem_ctx, servid_t server, uint16_t tid,
return NULL;
}
- path = lock_path(odb, "openfiles.tdb");
+ path = smbd_tmp_path(odb, "openfiles.tdb");
odb->w = tdb_wrap_open(odb, path, 0,
TDB_DEFAULT,
O_RDWR|O_CREAT, 0600);