summaryrefslogtreecommitdiff
path: root/channels.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-06-07 19:55:44 +1000
committerDamien Miller <djm@mindrot.org>2000-06-07 19:55:44 +1000
commitd3a185709dfb8588ae7cacc079312d1fcc450e9c (patch)
tree8e9798d35f76171481f034720767e507e6bbd6f9 /channels.c
parente37bfc19f7263b838896ae403e55aa703a06b69a (diff)
- (djm) Fix rsh path in RPMs. Report from Jason L Tibbitts III
<tibbs@math.uh.edu> - (djm) OpenBSD CVS updates: - todd@cvs.openbsd.org [sshconnect2.c] teach protocol v2 to count login failures properly and also enable an explanation of why the password prompt comes up again like v1; this is NOT crypto - markus@cvs.openbsd.org [readconf.c readconf.h servconf.c servconf.h session.c ssh.1 ssh.c sshd.8] xauth_location support; pr 1234 [readconf.c sshconnect2.c] typo, unused [session.c] allow use_login only for login sessions, otherwise remote commands are execed with uid==0 [sshd.8] document UseLogin better [version.h] OpenSSH 2.1.1 [auth-rsa.c] fix match_hostname() logic for auth-rsa: deny access if we have a negative match or no match at all [channels.c hostfile.c match.c] don't panic if mkdtemp fails for authfwd; jkb@yahoo-inc.com via kris@FreeBSD.org
Diffstat (limited to 'channels.c')
-rw-r--r--channels.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/channels.c b/channels.c
index f26b3a65b..bfa025ad7 100644
--- a/channels.c
+++ b/channels.c
@@ -17,7 +17,7 @@
17 */ 17 */
18 18
19#include "includes.h" 19#include "includes.h"
20RCSID("$Id: channels.c,v 1.31 2000/05/17 12:34:23 damien Exp $"); 20RCSID("$Id: channels.c,v 1.32 2000/06/07 09:55:44 djm Exp $");
21 21
22#include "ssh.h" 22#include "ssh.h"
23#include "packet.h" 23#include "packet.h"
@@ -2113,11 +2113,11 @@ cleanup_socket(void)
2113} 2113}
2114 2114
2115/* 2115/*
2116 * This if called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server. 2116 * This is called to process SSH_CMSG_AGENT_REQUEST_FORWARDING on the server.
2117 * This starts forwarding authentication requests. 2117 * This starts forwarding authentication requests.
2118 */ 2118 */
2119 2119
2120void 2120int
2121auth_input_request_forwarding(struct passwd * pw) 2121auth_input_request_forwarding(struct passwd * pw)
2122{ 2122{
2123 int sock, newch; 2123 int sock, newch;
@@ -2135,8 +2135,16 @@ auth_input_request_forwarding(struct passwd * pw)
2135 strlcpy(channel_forwarded_auth_socket_dir, "/tmp/ssh-XXXXXXXX", MAX_SOCKET_NAME); 2135 strlcpy(channel_forwarded_auth_socket_dir, "/tmp/ssh-XXXXXXXX", MAX_SOCKET_NAME);
2136 2136
2137 /* Create private directory for socket */ 2137 /* Create private directory for socket */
2138 if (mkdtemp(channel_forwarded_auth_socket_dir) == NULL) 2138 if (mkdtemp(channel_forwarded_auth_socket_dir) == NULL) {
2139 packet_disconnect("mkdtemp: %.100s", strerror(errno)); 2139 packet_send_debug("Agent forwarding disabled: mkdtemp() failed: %.100s",
2140 strerror(errno));
2141 restore_uid();
2142 xfree(channel_forwarded_auth_socket_name);
2143 xfree(channel_forwarded_auth_socket_dir);
2144 channel_forwarded_auth_socket_name = NULL;
2145 channel_forwarded_auth_socket_dir = NULL;
2146 return 0;
2147 }
2140 snprintf(channel_forwarded_auth_socket_name, MAX_SOCKET_NAME, "%s/agent.%d", 2148 snprintf(channel_forwarded_auth_socket_name, MAX_SOCKET_NAME, "%s/agent.%d",
2141 channel_forwarded_auth_socket_dir, (int) getpid()); 2149 channel_forwarded_auth_socket_dir, (int) getpid());
2142 2150
@@ -2171,6 +2179,7 @@ auth_input_request_forwarding(struct passwd * pw)
2171 xstrdup("auth socket")); 2179 xstrdup("auth socket"));
2172 strlcpy(channels[newch].path, channel_forwarded_auth_socket_name, 2180 strlcpy(channels[newch].path, channel_forwarded_auth_socket_name,
2173 sizeof(channels[newch].path)); 2181 sizeof(channels[newch].path));
2182 return 1;
2174} 2183}
2175 2184
2176/* This is called to process an SSH_SMSG_AGENT_OPEN message. */ 2185/* This is called to process an SSH_SMSG_AGENT_OPEN message. */