[PATCH 18/18] Add a comment to tdb_wrap to explain why it should be used instead of directly using tdb

Matthieu Patou mat at matws.net
Mon Jan 11 16:23:13 MST 2010


---
 source4/lib/tdb_wrap.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/source4/lib/tdb_wrap.h b/source4/lib/tdb_wrap.h
index eb0191f..20ab53f 100644
--- a/source4/lib/tdb_wrap.h
+++ b/source4/lib/tdb_wrap.h
@@ -19,6 +19,13 @@
    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_
 
-- 
1.6.3.3


--------------080603070205020905060303
Content-Type: text/x-patch;
 name="0001-s4-Create-a-library-for-xattr-python-bindings.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename*0="0001-s4-Create-a-library-for-xattr-python-bindings.patch"



More information about the samba-technical mailing list