diff options
Diffstat (limited to 'channels.c')
-rw-r--r-- | channels.c | 45 |
1 files changed, 1 insertions, 44 deletions
diff --git a/channels.c b/channels.c index af2ae18b1..060d0f507 100644 --- a/channels.c +++ b/channels.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include "includes.h" | 41 | #include "includes.h" |
42 | RCSID("$OpenBSD: channels.c,v 1.196 2003/09/19 11:31:33 markus Exp $"); | 42 | RCSID("$OpenBSD: channels.c,v 1.197 2003/09/23 20:41:11 markus Exp $"); |
43 | 43 | ||
44 | #include "ssh.h" | 44 | #include "ssh.h" |
45 | #include "ssh1.h" | 45 | #include "ssh1.h" |
@@ -2838,46 +2838,3 @@ auth_request_forwarding(void) | |||
2838 | packet_send(); | 2838 | packet_send(); |
2839 | packet_write_wait(); | 2839 | packet_write_wait(); |
2840 | } | 2840 | } |
2841 | |||
2842 | /* This is called to process an SSH_SMSG_AGENT_OPEN message. */ | ||
2843 | |||
2844 | void | ||
2845 | auth_input_open_request(int type, u_int32_t seq, void *ctxt) | ||
2846 | { | ||
2847 | Channel *c = NULL; | ||
2848 | int remote_id, sock; | ||
2849 | |||
2850 | /* Read the remote channel number from the message. */ | ||
2851 | remote_id = packet_get_int(); | ||
2852 | packet_check_eom(); | ||
2853 | |||
2854 | /* | ||
2855 | * Get a connection to the local authentication agent (this may again | ||
2856 | * get forwarded). | ||
2857 | */ | ||
2858 | sock = ssh_get_authentication_socket(); | ||
2859 | |||
2860 | /* | ||
2861 | * If we could not connect the agent, send an error message back to | ||
2862 | * the server. This should never happen unless the agent dies, | ||
2863 | * because authentication forwarding is only enabled if we have an | ||
2864 | * agent. | ||
2865 | */ | ||
2866 | if (sock >= 0) { | ||
2867 | c = channel_new("", SSH_CHANNEL_OPEN, sock, sock, | ||
2868 | -1, 0, 0, 0, "authentication agent connection", 1); | ||
2869 | c->remote_id = remote_id; | ||
2870 | c->force_drain = 1; | ||
2871 | } | ||
2872 | if (c == NULL) { | ||
2873 | packet_start(SSH_MSG_CHANNEL_OPEN_FAILURE); | ||
2874 | packet_put_int(remote_id); | ||
2875 | } else { | ||
2876 | /* Send a confirmation to the remote host. */ | ||
2877 | debug("Forwarding authentication connection."); | ||
2878 | packet_start(SSH_MSG_CHANNEL_OPEN_CONFIRMATION); | ||
2879 | packet_put_int(remote_id); | ||
2880 | packet_put_int(c->self); | ||
2881 | } | ||
2882 | packet_send(); | ||
2883 | } | ||