VFS Linking errors
paul.weaver at bbc.co.uk
Mon Oct 6 14:09:34 GMT 2008
From: Gerald (Jerry) Carter [mailto:jerry at samba.org]
Sent: 18 September 2008 22:44
> > Paul Weaver wrote:
> >> After successful tests on a linux machine, we're trying to
> deploy a
> >> VFS module onto a solaris x64 machine.
> >> Initial problem was we couldn't compile. Downloaded the source for
> >> 3.0.28, ran through configure and make. The VFS object
> compiled fine,
> >> but then wouldn't connect
> >> /usr/sfw/sbin/smbd --version
> >> Version 3.0.28
> >> [2008/09/18 15:18:26, 0] smbd/vfs.c:(66)
> >> Failed to register vfs module.
> >> The module was compiled against
> SMB_VFS_INTERFACE_VERSION 134502736,
> >> current SMB_VFS_INTERFACE_VERSION is 21.
> >> Please recompile against the current Samba Version!
> > I think you had an uninitialized version number variable,
> as 134502736
> > sounds bizzare!
> The only time I have seen such an error was on Solaris 10u5 amd64 when
> running Sun's version of Samba compiled with the Sun Studio suite and
> the plugin compiled using gcc. They don't mix well.
That sounds about right, u5 default samba installation that came on the
box, I later removed it and compiled from scratch, which is fine -- I'm
from a gnu background, and I'm not a developer. The gnu toolchain is
what I'm used to.
Having compiled sabma from scratch, I can compile VFS modules and have
them run. It's the unsafe_string issue that's throwing the problem.
Having worked through safe_string.h and dotted my vfs module with DEBUG
statements, I've found the problem in
Which seems to call CHECK_STRING_SIZE(d, max_len+1)
d is "d->d_name", with "d" being defined as
SMB_STRUCT_DIRENT* d = NULL;
d = SMB_VFS_NEXT_READDIR(handle, dirInfo->dirstream)
And dirInfo is a "mh_dirinfo_struct" defined with
A bit more DEBUG macros reveals that sizeof(d) is "1" on the 64 bit
solaris machine, and "256" on my 32 bit linux machine
On both the solaris box and the linux SMB_STRUCT_DIRENT is defined as
dirent64 -- which is a bit confusing at first glance as I've got a 32bit
Systems Development Engineer
News Production Facilities, BBC News
More information about the samba-technical