outsourcing DCE/RPC to alternate programs - runtime config option

Stefan (metze) Metzmacher metze at samba.org
Thu Dec 9 17:49:33 GMT 2004


Jeremy Allison schrieb:

> On Tue, Dec 07, 2004 at 11:38:40PM +0000, Luke Kenneth Casson Leighton wrote:
> 
>>dear samba team,
>>
>>please could you add an option to allow "outsourcing" of dce/rpc
>>traffic into samba 3 and samba 4?
>>
>>this is called a compromise design decision.
>>
>>for example code not written by me that is in production use, you may
>>examine luke howard's work at:
>>
>>	http://lists.samba.org/archive/samba-technical/2002-October/024614.html
>>
>>an ideal solution would be to have an smb.conf option that specifies
>>a list of pipe names and their .so libraries in which the four
>>functions (or one function which returns a pointer to a table of four
>>functions) make_pipe, read_from, write_to and close_pipe.
>>
>>this is a trivial programming exercise that can easily be written by
>>any competent programmer, and the benefits to the samba community are
>>numerous:
> 
> 
> Yep - very true. The code in the current SVN reads :
> 
>         /* add a dso mechanism instead of this, here */
>                                                                                                                   
>         p->namedpipe_create = make_internal_rpc_pipe_p;
>         p->namedpipe_read = read_from_internal_pipe;
>         p->namedpipe_write = write_to_internal_pipe;
>         p->namedpipe_close = close_internal_rpc_pipe_hnd;
> 
> So it just needs a decent patch to be submitted to load a shared 
> library to fill in these function pointers based on a pipe name.
> 
> I think all we need, rather than an smb.conf option, is for the
> current code to explicitly look in an explicit directory such
> as $SAMBA/lib/named_pipes/ and load a libsmbnp_${PIPENAME}.so
> shared library found there.
> 
> I'd suggest the function names to be exported from the .so be :
> 
> pipe_create, pipe_read, pipe_write, pipe_close.
> 
> Sound good ? I can probably get to this, but I have to work on
> the scalable directory problem first - so if anyone wants to
> donate a suitable patch I'll integrate it.

for samba 4 this could be easily done by implenting another ntvfs_ipc module that passes the
data to a pipe and the epmapper module should be extented to return mappings which are registered by
other applications via a private socket and a epm_Insert() call and we should then store the mapping
in a persitent db

-- 
metze

Stefan Metzmacher <metze at samba.org> www.samba.org


More information about the samba-technical mailing list