Problems creating a new VFS module

Björn Jacke bj at SerNet.DE
Thu Oct 7 15:02:56 MDT 2010


On 2010-10-07 at 16:21 +0100 Sergio Lopes sent off:
> - I have a server with version 3.4.3-26 of samba installed . Then i
> downloaded the source code of this release.
> 
> - Within the directory samba-3.4.3/source3 ran the command ". /configure"
> 
> - Within the directory samba-3.4.3/examples/VFS ran the commands ".
> /autogen.sh", ". /configure" and ". /make"
> (
> I got these warnings when compiling the file skel_opaque.c:
> 
> skel_opaque.c: In function ‘skel_opendir’:
> skel_opaque.c:85: warning: return makes pointer from integer without a cast
> skel_opaque.c: In function ‘skel_readdir’:
> skel_opaque.c:92: warning: return makes pointer from integer without a cast
> skel_opaque.c: In function ‘skel_getwd’:
> skel_opaque.c:233: warning: return makes pointer from integer without a cast
> skel_opaque.c: In function ‘skel_realpath’:
> skel_opaque.c:279: warning: return makes pointer from integer without a cast
> )
> 
> - Then i copied the generated file "skel_opaque.so" to "/usr/lib/samba/vfs/"
> 
> - Then i configured a share with this new module:
> 
> [vfs_module_test]
> 
> comment = vfs module test
> path = / home1/
> vfs objects = skel_opaque
> read only = Yes
> guest ok = Yes
> public = Yesi
> writable = no
> 
> - Restarted samba
> 
> When i try to access the share "vfs_module_test" I get the following
> error in "/var/log/syslog":
> 
> Oct 7 15:31:32 machine smbd [22357]: Error Trying to resolve symbol
> 'init_samba_module' in /usr/lib/samba/vfs/skel_opaque.so:
> /usr/lib/samba/vfs/ skel_opaque.so: undefined symbol : init_samba_module
> Oct 7 15:31:32 machine smbd [22357]: [7/10/2009 15:31:32, 0] smbd/vfs.c:
> 175 (vfs_init_custom)
> Oct 7 15:31:32 machine smbd [22357]: Can not find a vfs module [skel_opaque]
> Oct 7 15:31:32 machine smbd [22357]: [7/10/2009 15:31:32, 0] smbd/vfs.c:
> 322 (smbd_vfs_init)
> Oct 7 15:31:32 machine smbd [22357]: smbd_vfs_init: vfs_init_custom
> failed for skel_opaque
> 
> What am I doing wrong? Do i have to compile the whole samba code again
> in order to get a new vfs module working? Or it is enough to compile
> only the new module?
> 
> Also I would like to know if anyone knows of any VFS module that does
> something similar to what I want to do. This would be a great help.

you need to add your module to the default_shared_modules variable in
configure.in, run autogen.sh and configure again. That might might
be your issue here, I hope that helps.

Cheers
Björn
-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen


More information about the samba-technical mailing list