Fix bug 7590 - offline login fails because winbind deletes cache on every startup.
Sync lib/tdb_validate.c with the change in current master.
Change tdb_validate_open() to always use O_RDWR instead of O_RDONLY,
as (from the bug report): "db_check() will always return failure for a read-only database.
Silently, without any log output, when _tdb_lockall() fails."
Jeremy.
(cherry picked from commit
39cb903463d8a3fcabd9e148112bf5cf81744130)
(cherry picked from commit
9812b1a601c9ccc2a3e6c06b98c32730a32c787a)