Windows Search Protocol for samba share

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Mar 21 02:08:57 MDT 2013


On Wed, Mar 20, 2013 at 09:43:17PM +0100, Jean-Daniel FISCHER wrote:
> Hi Gregor and Jeremy,
> 
> First of all, thanks for helping me :)
> 
> @Gregor: It's seems promising and I will definitevely use it and give you
> feedback as soon as I start to code the server. For now, I will focus on
> declaring the named pipe in samba and forward it to external daemon.
> 
> @Jeremy: I am looking into the samba code. So far, I found the nt_open_pipe
> which is the function call when a client try to open a named pipe. It calls
> open_np_file, that calls np_open. At the end, this function calls
> make_external_rpc_pipe_p if the pipe_mode is set
> to RPC_SERVICE_MODE_EXTERNAL.
> 
> Correct me if I am wrong but that mean I need to add rpc_server:msftewds =
> external into smb.conf.
> 
> In the function code, I have spotted:
> socket_dir = lp_parm_const_string(
> GLOBAL_SECTION_SNUM, "external_rpc_pipe", "socket_dir",
> lp_ncalrpc_dir());
> So socket_dir = /var/run/samba/socket_dir in smb.conf should set this value.
> 
> Which should lead to a /var/run/samba/socket_dir/np/msftewds file to
> appear, am I right ? Because the directory is not created ?
> Is it my external daemon that have to create the unix domain socket
> exchange file ?

Yes, the external daemon has to create that pipe file.

> I have done some fast wireshark capture. It seems taht the pipe is not
> opened with NT Create And X. It is accessed with a SMB_COM_TRANSACTION
> (0x25) containing the sub command TRANS_WAIT_NMPIPE (0x0053). Smbd responds
> with STATUS_NOT_SUPPORTED that is not indicated as a correct STATUS return
> code for this command in MS-CIFS specification. Do you have any idea where
> such smb message is handled in samba code ? If it is implemented ?

Can you send a debug level 10 log of smbd of that attempt,
together with a wireshark trace?

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de


More information about the samba-technical mailing list