summaryrefslogtreecommitdiff
path: root/source3/tdb/README
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-12-04 02:58:42 +0000
committerMartin Pool <mbp@samba.org>2001-12-04 02:58:42 +0000
commit6c3163cc9715188ee8087c6dbf63776f0dc9f1f5 (patch)
treecfcadaf2ef65789212e413ae77b6635963aca95b /source3/tdb/README
parentc2e3d8ba018221c0a0b22a91fdb361dd740482b9 (diff)
downloadsamba-6c3163cc9715188ee8087c6dbf63776f0dc9f1f5.tar.gz
samba-6c3163cc9715188ee8087c6dbf63776f0dc9f1f5.tar.bz2
samba-6c3163cc9715188ee8087c6dbf63776f0dc9f1f5.zip
Set errno in tdb_open in cases where we detect an error in opening the
database, but no underlying system call sets errno. The particular case I had was a mangled .tdb, but there are others. For this one, set EIO. It's a shame Unix messages aren't more detailed -- "bad data format" would be better. (This used to be commit 5630a988be05c21b60aba6304d4aaadce6024817)
Diffstat (limited to 'source3/tdb/README')
-rw-r--r--source3/tdb/README3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/tdb/README b/source3/tdb/README
index fac3eacb4d..3715c685c2 100644
--- a/source3/tdb/README
+++ b/source3/tdb/README
@@ -60,7 +60,8 @@ TDB_CONTEXT *tdb_open(char *name, int hash_size, int tdb_flags,
The hash size is advisory, use zero for a default value.
- return is NULL on error
+ Return is NULL on error, in which case errno is also set. Don't
+ try to call tdb_error or tdb_errname, just do strerror(errno).
possible tdb_flags are:
TDB_CLEAR_IF_FIRST - clear database if we are the only one with it open