summaryrefslogtreecommitdiff
path: root/lib/tdb/common/tdb_private.h
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2010-05-05 15:37:18 +0930
committerRusty Russell <rusty@rustcorp.com.au>2010-05-05 15:37:18 +0930
commit91e4a1760dee22e9a40ca52f1e5a1b549d9e066d (patch)
tree879c390a4be016332c981a4392eaa2a5175a3117 /lib/tdb/common/tdb_private.h
parenta9e008ee36c8fd9ca79b3bdfdc78111939c3e539 (diff)
downloadsamba-91e4a1760dee22e9a40ca52f1e5a1b549d9e066d.tar.gz
samba-91e4a1760dee22e9a40ca52f1e5a1b549d9e066d.tar.bz2
samba-91e4a1760dee22e9a40ca52f1e5a1b549d9e066d.zip
tdb: fix short write logic in tdb_new_database
Commit 207a213c/24fed55d purported to fix the problem of signals during tdb_new_database (which could cause a spurious short write, hence a failure). However, the code is wrong: newdb+written is not correct. Fix this by introducing a general tdb_write_all() and using it here and in the tracing code. Cc: Stefan Metzmacher <metze@samba.org> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb/common/tdb_private.h')
-rw-r--r--lib/tdb/common/tdb_private.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tdb/common/tdb_private.h b/lib/tdb/common/tdb_private.h
index e2167132b4..9d0f3bcd70 100644
--- a/lib/tdb/common/tdb_private.h
+++ b/lib/tdb/common/tdb_private.h
@@ -266,5 +266,5 @@ void tdb_io_init(struct tdb_context *tdb);
int tdb_expand(struct tdb_context *tdb, tdb_off_t size);
int tdb_rec_free_read(struct tdb_context *tdb, tdb_off_t off,
struct tdb_record *rec);
-
+bool tdb_write_all(int fd, const void *buf, size_t count);
int tdb_transaction_recover(struct tdb_context *tdb);