summaryrefslogtreecommitdiff
path: root/source3/lib/util_tdb.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-07-18 14:38:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:28:49 -0500
commitb8a4863ca4ac3e127ec681b8da462a8020a87395 (patch)
treed0732036eb018af2fd4bf49475ee789af4818506 /source3/lib/util_tdb.c
parent070215ef131245eb386837c666c1884c2556a456 (diff)
downloadsamba-b8a4863ca4ac3e127ec681b8da462a8020a87395.tar.gz
samba-b8a4863ca4ac3e127ec681b8da462a8020a87395.tar.bz2
samba-b8a4863ca4ac3e127ec681b8da462a8020a87395.zip
r23957: Use tdb_open_log instead of tdb_open.
Michael (This used to be commit efabd7fe03733d1fcb02d0d270c18ede7836f3a9)
Diffstat (limited to 'source3/lib/util_tdb.c')
-rw-r--r--source3/lib/util_tdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c
index 26239d1c78..c0933ba415 100644
--- a/source3/lib/util_tdb.c
+++ b/source3/lib/util_tdb.c
@@ -1191,7 +1191,7 @@ static int tdb_backup(TALLOC_CTX *ctx, const char *src_path,
}
/* open old tdb RDWR - so we can lock it */
- src_tdb = tdb_open(src_path, 0, TDB_DEFAULT, O_RDWR, 0);
+ src_tdb = tdb_open_log(src_path, 0, TDB_DEFAULT, O_RDWR, 0);
if (src_tdb == NULL) {
DEBUG(3, ("Failed to open tdb '%s'\n", src_path));
goto done;
@@ -1204,10 +1204,10 @@ static int tdb_backup(TALLOC_CTX *ctx, const char *src_path,
tmp_path = talloc_asprintf(ctx, "%s%s", dst_path, ".tmp");
unlink(tmp_path);
- dst_tdb = tdb_open(tmp_path,
- hash_size ? hash_size : tdb_hash_size(src_tdb),
- TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL,
- st.st_mode & 0777);
+ dst_tdb = tdb_open_log(tmp_path,
+ hash_size ? hash_size : tdb_hash_size(src_tdb),
+ TDB_DEFAULT, O_RDWR | O_CREAT | O_EXCL,
+ st.st_mode & 0777);
if (dst_tdb == NULL) {
DEBUG(3, ("Error creating tdb '%s': %s\n", tmp_path,
strerror(errno)));
@@ -1224,7 +1224,7 @@ static int tdb_backup(TALLOC_CTX *ctx, const char *src_path,
/* reopen ro and do basic verification */
tdb_close(dst_tdb);
- dst_tdb = tdb_open(tmp_path, 0, TDB_DEFAULT, O_RDONLY, 0);
+ dst_tdb = tdb_open_log(tmp_path, 0, TDB_DEFAULT, O_RDONLY, 0);
if (!dst_tdb) {
DEBUG(3, ("Failed to reopen tdb '%s': %s\n", tmp_path,
strerror(errno)));