Page MenuHomePhabricator

ssh_bind_accept version accepting struct sockaddr * and size_t *
Open, NormalPublic

Description

socket accept() optionally can be passed with struct sockaddr and size//t , which will then return details about the connected client.

It would be nice to have a similar API for ssh server as well.

something like
sshbindaccept2(sshbind, sshsession, struct sockaddr , size//t )

This can be used for servers that want to be verbose about their connections.

Implementation should be plain simple

int
sshbindaccept(sshbind sshbind, sshsession session)
{

return ssh//bind//accept2(sshbind, session, NULL, NULL);

}

int
sshbindaccept(sshbind sshbind, sshsession session, struct sockaddr claddr, size//t clsize)
{
/**

  • Previous implementation of sshbindaccept, except for that, accept() will be passed with
  • cladde and clsize **/

}

Event Timeline

migration created this object with visibility "Restricted Project (Project)".
migration created this object with edit policy "Restricted Project (Project)".

On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:

patch added

and:

migration updated the task description. (Show Details)Jun 19 2017, 8:48 AM

On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:

patch added

and:

migration updated the task description. (Show Details)Jun 19 2017, 8:50 AM

On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:

patch added

and:

migration updated the task description. (Show Details)Jun 19 2017, 8:52 AM

On Monday, November 28th 2011 20:19:26, Vineeth Pillai wrote:

patch added

and:

asn added a subscriber: asn.Sep 4 2018, 8:45 PM

Wouldn't it make more sense to store this in the ssh_session and then retrieve it from there?

asn changed the visibility from "Restricted Project (Project)" to "Public (No Login Required)".Sep 4 2018, 8:45 PM