From 0cdc39e7302adf86010d23ef0f08f3cbdcf6b1b2 Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Tue, 12 Jan 2010 02:23:13 +0300 Subject: [PATCH] Add a comment to tdb_wrap to explain why it should be used instead of directly using tdb --- source4/lib/tdb_wrap.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source4/lib/tdb_wrap.h b/source4/lib/tdb_wrap.h index eb0191fb31a..20ab53fb35c 100644 --- a/source4/lib/tdb_wrap.h +++ b/source4/lib/tdb_wrap.h @@ -19,6 +19,13 @@ along with this program. If not, see . */ +/* IMPORTANT: tdb_wrap should be always prefered over tdb_context for end consumer functions + it's because if the code will be running inside smbd, then we must use the linked list + of open tdb files, to determine if the tdb we desire is already open + as otherwise, when you close the tdb (even on a different file descriptor), + ALL LOCKS are lost (due to a real screwup in the POSIX specification that nobody has been able to get fixed) +*/ + #ifndef _TDB_WRAP_H_ #define _TDB_WRAP_H_ -- 2.11.4.GIT