[bug]: SMB_OFF_T for VFS module in samba-2.2.3a tarball

Timothee Besset ttimo at idsoftware.com
Tue Mar 5 03:25:02 GMT 2002

If you compile the example skel.so VFS module that comes with samba-2.2.3a
tarball, SMB_OFF_T has sizeof 8 in the daemon, and 4 in the vfs module.
This causes stack corruption in lseek function typically (and all others
that use SMB_OFF_T prototypes).

logged by smbd:
sys_lseek fd 24 whence 136258136
sizeof(SMB_OFF_T): 8
seek_file: sys_lseek failed. Error was Invalid argument
read_file: Failed to seek to 0

logged by the skeleton module:
Loading skeleton module!
sizoef(SMB_OFF_T): 4

This is on a Linux x86 Debian Woody

note that this is samba-2.2.3a that I had to patch to fix the VFS code
with Ries van twisk patches

I also note that:
the SIZEOF_OFF_T as defined in config.h is matching smbd, #define SIZEOF_OFF_T 8

The only way I found around this is adding a #define SMB_OFF_T __off64_t
in skel.c code before any #include <includes.h> and #include <vfs.h>


More information about the samba-technical mailing list