Add a comment to tdb_wrap to explain why it should be used instead of directly using tdb
authorMatthieu Patou <mat@matws.net>
Mon, 11 Jan 2010 23:23:13 +0000 (02:23 +0300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 20 Jan 2010 18:11:18 +0000 (07:11 +1300)
source4/lib/tdb_wrap.h

index eb0191fb31aec2177fee640c6507b82b68fd4a4d..20ab53fb35c57a0c90ac773dfe5036a34f751a63 100644 (file)
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+/* 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_