SFTP Server and state

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SFTP Server and state

Leonard Boyce-2
Hoping someone has done something similar before and can point me in
the right direction.

I'm looking to implement a virtual file system behind sftpd using a
custom file handler.

This is all well and good, as you can easily specify the subsystem using
{subsystems, ssh_sftpd:subsystem_spec([{file_handler, my_file_handler}])}

Where I'm running into an issue is that there appears to be no way to
connect the subsystem to the auth handler

If I specify pwdfun I can handle my DB based auth without issue, but
the file subsystem has no access to the data.

Reading the code for ssh_sftp:init/1 it appears that the
{ssh_sftpd_file, _} option can accept a tuple of {module,
FileHandlerState}.

The issue I have is how to get the `pwdfun` state (optional return)
into the file subsystem.

Any pointers would be great.

Thanks,
Leonard
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions