On Wed, Mar 05, 2003 at 06:43:52PM +0200, TUDOR Coserea wrote about 'VFS related.':
> Hi, I'm was trying to port my VFS module over *BSD.

> I had some problems and I want to share the results with you:

> 1. On OpenBSD 3.1 in dynamic module symbols are mangled with "_" in front of name of 
> the function so 
>     sym_dlsym(handle, "vfs_init") don't work but
>     sym_dlsym(handle, "_vfs_init") is ok.

> I resolved this by forcing the compiler to generate vfs_init instead of _vfs_init:
>     extern struct vfs_ops* rav_vfs_init(int*, struct vfs_ops *) asm ("vfs_init");
> before function definition.

>     I prefer that samba during configuring time to see how the name are mangled and 
> to add '_' in OpenBSD case, or
> to try dlopen twice: one for <symbol_name> and if this fails for _<symbol_name>.

> 2. On NetBSD 1.6 (GENERIC) because I'm using some functions from smbd (in order to 
> send messages to the client who access an infected file)
> I've got this error:

> [2003/03/05 19:39:46, 3] 
> /usr/pkgsrc/net/samba/work/samba-2.2.6/source/smbd/vfs.c:vfs_init_custom(138)
>   Initialising custom vfs hooks from /usr/local/lib/rav/ravsamba.so
> [2003/03/05 19:39:46, 0] 
> /usr/pkgsrc/net/samba/work/samba-2.2.6/source/smbd/vfs.c:vfs_init_custom(143)
>   Error opening /usr/local/lib/rav/ravsamba.so: /usr/local/lib/rav/ravsamba.so: 
> Undefined PLT symbol "dbgtext"
> (reloc type = 7, symnum = 75)
> [2003/03/05 19:39:46, 0] 
> /usr/pkgsrc/net/samba/work/samba-2.2.6/source/smbd/vfs.c:smbd_vfs_init(188)
>   smbd_vfs_init: vfs_init_custom failed

> The problem resides in the default configuration of ld.elf_so.
> You might want to include in your VFS documentation the need to export the 
> environment variable LD_BIND_NOW before starting smbd daemon
> on NetBSD.

Which version of samba are you using? Is 'DYNEXP' set correctly and at
all ? 

jelmer

-- 
Jelmer Vernooij <[EMAIL PROTECTED]> - http://nl.linux.org/~jelmer/
 18:02:55 up 8 days,  4:15, 32 users,  load average: 0.29, 0.28, 0.18

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to