Quesiton on samba_init_module

sandeep nag sandeepnagamalli at gmail.com
Mon Nov 18 20:00:11 MST 2013


Hi Richard,

Sorry for the late reply, email got filtered to special folder.

There was a requirement to redirect the messages from 'smbd main process'
to a separate log file. The spawned smbd's will log to the respective log
files( file with name 'client-ip.log') which is fine for us.

So I was looking for the function where I can place the code which creates
the the samba_main_proc.log file. I have placed it in function
'init_samba_module'
, and it seems working fine.

Thanks,
Sandeep



On Mon, Nov 11, 2013 at 8:37 PM, Richard Sharpe <realrichardsharpe at gmail.com
> wrote:

> On Mon, Nov 11, 2013 at 2:56 AM, sandeep nag <sandeepnagamalli at gmail.com>
> wrote:
> > I see a initialization function for samba module(init_samba_module), but
> > not a exit function. I am opening a file in init function, where should I
> > close it. Just worrying on, If I do not close it, It may lead to some
> > inconsistencies.
>
> Why are you opening it in the init function? Why can't you wait until
> connect is called, because there will be a disconnect call (unless the
> smbd crashes.)
>
> --
> Regards,
> Richard Sharpe
> (何以解憂?唯有杜康。--曹操)
>


More information about the samba-technical mailing list