VFS issues

REYNAUD Jean-Samuel reynaud at nantes.inra.fr
Thu Jun 7 15:15:00 GMT 2001


Le 07 Jun 2001 09:47:37 -0400, Derek Holden a écrit :
> Hello, couple of VFS issues and questions.
> 
> The examples don't seem to work out of the box. Doing a
> configure --with-vfs, a clean make in the examples/VFS directory, and
> copying of the conf text from the readme fails on my linux box. I get the
> errors:
> 
> [2001/06/07 08:14:35, 0] smbd/vfs.c:vfs_init_custom(109)
>   Error opening src/samba-2.2.0-alpha3/examples/VFS/audit.so:
> src/samba-2.2.0-alpha3/examples/VFS/audit.so: undefined symbol:
> default_vfs_ops
> [2001/06/07 08:14:35, 0] smbd/service.c:make_connection(519)
>   vfs_init failed
> 
> I noticed this was mentioned in the archives at
> http://lists.samba.org/pipermail/samba-technical/2001-May/012760.html. His
> solution of compiling smbd w/ -rdynamic was shot down and he was told to use
> libtool in the Makefile, which the audit example is using. The thread then
> turned into a libtool arguement and ended.
> 
> Another issue is with the documentation. The latest draft of the VFS docs I
> could find were at
> http://lists.samba.org/pipermail/samba-docs/2001-June/000580.html and seems
> to have fixed some descrepencies in the original
> http://samba.cadcamlab.org/lists/samba-docs/Aug2000/00004.html. However,
> there some things that I still don't get.
> 
> The vfs_init function. So far I've seen this take 3 different parameters
> struct vfs_ops *vfs_init(int *vfs_version)
> struct vfs_ops *vfs_init(void)
> struct vfs_ops *vfs_init(struct vfs_ops *former)
> I know all is well, but a little clarifaction would be nice.
> 
> The skel example included in the html doc is not the same one from the
> examples/VFS directory. In the example/VFS/skel.c all functions fall through
> to the external default_vfs_ops, where in the html doc it calls them from an
> underlying struct. In the latest version of the html doc the underlying
> struct is undefined and not initialized, amoung other minor issues. In one
> revision of the html doc, I found underlying initialized (though undefined)
> by
> 
> struct vfs_ops *vfs_init(struct vfs_ops *former) {
>  openlog("smbd_audit", LOG_PID, SYSLOG_FACILITY);
>  memcpy(&underlying, former, sizeof(underlying));
> 
> Though building off the module using this produced the error
> 
> [2001/06/06 10:37:50, 0] smbd/vfs.c:vfs_init_custom(139)
>   vfs_init returned wrong interface version info (was -1, should be 1)
> [2001/06/06 10:37:50, 0] smbd/service.c:make_connection(541)
>   vfs_init failed
> 
Because vfs.c call the vfs_init function as
--
int vfs_version = -1
vfs_init(&vfs_version);
--
and after the code is:
	if (vfs_version != SMB_VFS_INTERFACE_VERSION) {
		DEBUG(0, ("vfs_init returned wrong interface version info (was %d,
should be %d)\n",
			vfs_version, SMB_VFS_INTERFACE_VERSION ));
		return False;
	}
--
So with your version, the "good" vfs_init function's prototype is
struct vfs_ops *vfs_init(int *version) {
*version = 1;
/*...*/
}

> Sorry if this was the wrong list to write this to, but there was little
> mentioned of vfs in the general samba list archive. This was done using
> samba-2.2.0 and 2.2.0-alpha3. My specs are
> Redhat Linux 6.2 (2.2.14)
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> ltmain.sh (GNU libtool) 1.3.4 (1.385.2.196 1999/12/07 21:47:57)
> 
> Thanks,
> Derek Holden
> Charles Stark Draper Laboratory
> 
> 
> 

-- 
REYNAUD Jean-Samuel





More information about the samba-technical mailing list