smbtorture LOCK1 test on HPUX

Aruna Prabakar arpra at
Thu Aug 2 19:41:52 GMT 2001


	Samba Smbtorture LOCK1 test on HPUX failed even after disabling
MMAP. It was failing in tdb_write with an error in log files (Bad File
Number). During investigation we found out that in this section of code in
tdb.c if it is TDB_INTERNAL after tdb->map_ptr was realloced tdb_mmap(tdb)
which makes tdb->map_ptr=NULL was excecuted which is incorrect. So we put a
else statement so that tdb_mmap(tdb) gets excecuted only if it is not
LOCK1 Test passes with this Fix.

if (tdb->flags & TDB_INTERNAL)
                tdb->map_ptr = realloc(tdb->map_ptr, tdb->map_size);
             *     We must ensure the file is remapped before adding the
             * to     ensure consistency with systems like OpenBSD where
             * writes and mmaps are not consistent.

            /* We're ok if the mmap fails as we'll fallback to read/write */

Best Regards

Full Name:	Aruna Prabakar
Job Title:	Software Engineer
Company:	HP
E-mail:	aruna_prabakar at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 2232 bytes
Desc: not available
Url :

More information about the samba-technical mailing list