Bug 3270 - tdb use of tdb_off is not 64bit clean
tdb use of tdb_off is not 64bit clean
Status: NEW
Product: Samba 3.0
Classification: Unclassified
Component: File Services
3.0.20b
x86 All
: P3 major
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-18 02:48 UTC by Kristian Van Der Vliet
Modified: 2005-11-18 02:51 UTC (History)
0 users

See Also:


Attachments
Cast tdb_off to off_t for 64bit cleanlyness (1.91 KB, patch)
2005-11-18 02:51 UTC, Kristian Van Der Vliet
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Van Der Vliet 2005-11-18 02:48:56 UTC
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
Comment 1 Kristian Van Der Vliet 2005-11-18 02:51:47 UTC
Created attachment 1579 [details]
Cast tdb_off to off_t for 64bit cleanlyness