The tdb functions use an internal type to represent file offsets; tdb_off. This is always defined as a unsigned int (u32) type. On certain OSes where off_t is 64bit (Syllable for example), when a tdb_off type is passed directly to pwrite(), pread() or lseek() where off_t is expected the seek may fail.
The obvious fix is to cast tdb_off to off_t whenever it is passed to an external function expecting off_t
Created attachment 1579 [details]
Cast tdb_off to off_t for 64bit cleanlyness
Fixed by fbdcf2663b56007a438ac4f0d8d82436b1bfe688 in Samba 3.0.24 when tdb changed to use libreplace wrappers for pread() and pwrite() and so never calling lseek() directly.