patch for a bug in tdb... + a tdb question

Dave Airlie airlied at
Wed Jan 19 10:26:51 GMT 2000

	I've started using tdb with pam_smb instead of Berkeley (too much
work for non-Linux users :-), and I found a bug in the tdb_nextkey
function, please apply the attached patch, 

Also Berkeley had a concept of memory dbs, i.e. if you did an open with no
explicit filename it just stored the table in memory, I used to use this
for pam_smb, how hard would it be do you think to get tdb to do this?

	pam_smb author.

		David Airlie, Software Engineer
Drua Technologies Ltd, Innovation Centre, National Tech Park, Limerick.
   t: +353-61-503075 / f: +353-61-338065 / David.Airlie at
-------------- next part --------------
Index: tdb/tdb.c
RCS file: /storage/cvs/pam_smb/tdb/tdb.c,v
retrieving revision 1.2
diff -u -r1.2 tdb.c
--- tdb/tdb.c	2000/01/17 23:30:40	1.2
+++ tdb/tdb.c	2000/01/18 23:01:12
@@ -814,7 +814,7 @@
 	/* Read the record. */
-	if (rec_read(tdb, rec_ptr, &rec) == 0) {
+	if (rec_read(tdb, rec_ptr, &rec) == -1) {
 		tdb_unlock(tdb, hbucket);
 		return null_data;

More information about the samba-technical mailing list