diff options
author | Martin Pool <mbp@samba.org> | 2001-12-04 02:58:42 +0000 |
---|---|---|
committer | Martin Pool <mbp@samba.org> | 2001-12-04 02:58:42 +0000 |
commit | 6c3163cc9715188ee8087c6dbf63776f0dc9f1f5 (patch) | |
tree | cfcadaf2ef65789212e413ae77b6635963aca95b /source3/tdb/README | |
parent | c2e3d8ba018221c0a0b22a91fdb361dd740482b9 (diff) | |
download | samba-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/README | 3 |
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 |