#5 fix for incorrect tdb_store() behavior

open
nobody
None
5
2002-12-02
2002-12-02
LBW
No

Hi,

This patch solves two problems with incorrect behavior
exhibited
in TDB 1.0.6.

Firstly, the tdb_open.3 man page states that
open_flags are ignored when using TDB_INTERNAL, but
that is
not correct.

A tdb_open() with TDB_INTERNAL and open_flags = 0
results in
a database that can utilise store and fetch but not delete
operations.

The man page has been amended accordingly.

Secondly, the tdb_store() function is modified to not
allow
store operations to be performed on a read-only database.

Note, that the tdb_store() function will attempt to
write to any
readonly database and this problem is not exclusively
related
to TDB_INTERNAL. The patch fixes that issue.

Hope this helps.

Discussion

  • LBW
    LBW
    2002-12-02

    tdb_store patch for tdb.c and tdb_open.3 patch

     
    Attachments