CIFS proxy using VFS
Chris Miller
chris at cmiller.co.uk
Fri Jun 17 14:42:52 UTC 2016
Thanks Jeremy,
Thats great, I’ll have a look through the calls and see where I get (I might not get away with ignoring SMB1 calls…)
Chris
> On 17 Jun 2016, at 00:25, Jeremy Allison <jra at samba.org> wrote:
>
> On Thu, Jun 16, 2016 at 05:03:22PM +0100, Chris Miller wrote:
>>
>> Hi,
>>
>> I asked a question back in Jan about getting vfs_cifs proxy working (in the NTVFS codebase). I did get it working, also using kerberos forwarding and was interested to know if it would be feasible/possible to write a similar proxy module in the normal vfs codebase/style without the NTVFS codebase.
>>
>> https://lists.samba.org/archive/samba-technical/2016-January/111832.html <https://lists.samba.org/archive/samba-technical/2016-January/111832.html>
>>
>> My question, if it is feasible to build an SMB/SMB2 proxy in vfs, is it possible to use the same S42UProxy forwarding mechanism that was used in the original vfs_cifs? is support already available for this in the other codebase?
>
> It's a little better than it was, in that the Create call
> is now passed in pretty much unchanged. Having said
> that the correct place to catch these is probably
> to add a struct that catches the calls at the
> smbd_smb2_request_process_XXX() call level.
>
> These are the relevent calls:
>
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_negprot(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_sesssetup(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_logoff(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_tcon(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_tdis(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_create(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_close(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_flush(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_read(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_write(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_lock(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_ioctl(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_keepalive(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_query_directory(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_notify(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_getinfo(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_setinfo(struct smbd_smb2_request *req);
> source3/smbd/globals.h:NTSTATUS smbd_smb2_request_process_break(struct smbd_smb2_request *req);
>
> called from smbd_smb2_request_dispatch(). If you can
> ignore SMB1 requests that would be best.
More information about the samba-technical
mailing list