VFS version error

Richard Sharpe realrichardsharpe at gmail.com
Sat Feb 28 07:49:27 MST 2015


On Fri, Feb 27, 2015 at 11:11 PM, Sharayu Mantri <sm25541994 at gmail.com> wrote:
> Sir,
> I want to intercept vfs open, close, opendir, mkdir and other calls. I don't
> understand the need of multi-threading. So , i want start with
> skel_transparent.

OK, having looked at the two modules I now understand.

You took a demo module I wrote years ago and have now got that to work
on Samba 3.6.3. That uses multi-threading, but it is not what you want
to do.

Then you took the transparent skelaton and tried to use that as a
starting point for your own module and that has a symbol problem.

The only big difference I can see is that the init function is not
declared before it is used.

How did you build the module?

You might be better off to start with the instructions on the Wiki and
construct a module from scratch rather than use the skelaton one. I am
pretty sure there are no automatic tests to ensure it still works.

Also, you are working with Samba 3.6.x which none of the developers
work with these days.

> You said the symbol should be changed. I don't understand. Can you elaborate
> please?
>
> Thank you.
>
> On Fri, Feb 27, 2015 at 3:00 PM, Richard Sharpe
> <realrichardsharpe at gmail.com> wrote:
>>
>> On Fri, Feb 27, 2015 at 1:40 AM, Sharayu Mantri <sm25541994 at gmail.com>
>> wrote:
>> > Thank you , Now our samba and vfs_demo is runnung perfectly fine.
>> >
>> > But while running skel_transparent.c from samba-3.6.3/examples/VFS wew
>> > got
>> > this error
>> >
>> > Feb 27 09:32:10 ubuntu smbd[22083]: [2015/02/27 09:32:10.287997,  0]
>> > lib/module.c:59(do_smb_load_module)
>> > Feb 27 09:32:10 ubuntu smbd[22083]:   Error trying to resolve symbol
>> > 'init_samba_module' in /usr/local/samba/lib/vfs/skel_transparent:
>> > /usr/local/samba/lib/vfs/skel_transparent: undefined symbol:
>> > init_samba_module
>> > Feb 27 09:32:10 ubuntu smbd[22083]: [2015/02/27 09:32:10.288321,  0]
>> > smbd/vfs.c:173(vfs_init_custom)
>> > Feb 27 09:32:10 ubuntu smbd[22083]:   error probing vfs module
>> > '/usr/local/samba/lib/vfs/skel_transparent': NT_STATUS_UNSUCCESSFUL
>> > Feb 27 09:32:10 ubuntu smbd[22083]: [2015/02/27 09:32:10.288513,  0]
>> > smbd/vfs.c:315(smbd_vfs_init)
>> > Feb 27 09:32:10 ubuntu smbd[22083]:   smbd_vfs_init: vfs_init_custom
>> > failed
>> > for /usr/local/samba/lib/vfs/skel_transparent
>> > Feb 27 09:32:10 ubuntu smbd[22083]: [2015/02/27 09:32:10.288677,  0]
>> > smbd/service.c:869(make_connection_snum)
>> > Feb 27 09:32:10 ubuntu smbd[22083]:   vfs_init failed for service share1
>> >
>> > let me know a way to solve this, It seems dlsym() in module.c return
>> > NULL.
>> > but i dont find any reason. Since in similar fashion i tried to execute
>> > vfs_demo.c and it executed prefectly.
>> >
>> > I am attaching skel_transpaarent.c for refrence
>>
>> Why do you want to use skel_transparent? If you have your own vfs
>> module and it is working you have no need for skel_transparent.
>>
>> However, there is probably an error in the build because the symbol
>> should have been changed (I think) to what Samba searches for.
>>
>> --
>> Regards,
>> Richard Sharpe
>> (何以解憂?唯有杜康。--曹操)
>
>



-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list