summaryrefslogtreecommitdiffstats
path: root/src/channels.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-03-13 21:57:45 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 14:55:47 +0200
commit81e769ec6a75c679694e6b7e6e1288ae63b96991 (patch)
tree695483b27e86999f0fd9a558be52c374e086ac07 /src/channels.c
parente809fa881ef999286455236db071224d08405773 (diff)
downloadlibssh-81e769ec6a75c679694e6b7e6e1288ae63b96991.tar.gz
libssh-81e769ec6a75c679694e6b7e6e1288ae63b96991.tar.xz
libssh-81e769ec6a75c679694e6b7e6e1288ae63b96991.zip
channels: implement callback for agent forwarding request
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/channels.c')
-rw-r--r--src/channels.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/channels.c b/src/channels.c
index 47fcee0..dd0f0ff 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -833,6 +833,16 @@ SSH_PACKET_CALLBACK(channel_rcv_request) {
return SSH_PACKET_USED;
}
+ if (strcmp(request, "auth-agent-req@openssh.com") == 0) {
+ SAFE_FREE(request);
+ ssh_log(session, SSH_LOG_PROTOCOL, "Received an auth-agent-req request");
+ if(ssh_callbacks_exists(channel->callbacks, channel_auth_agent_req_function)) {
+ channel->callbacks->channel_auth_agent_req_function(channel->session, channel,
+ channel->callbacks->userdata);
+ }
+ leave_function();
+ return SSH_PACKET_USED;
+ }
/* If we are here, that means we have a request that is not in the understood
* client requests. That means we need to create a ssh message to be passed
* to the user code handling ssh messages