summaryrefslogtreecommitdiff
path: root/sshpty.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2010-01-01 23:53:30 +0000
committerColin Watson <cjwatson@debian.org>2010-01-01 23:53:30 +0000
commitdf03186a4f9e0c2ece398b5c0571cb6263d7a752 (patch)
tree1aab079441dff9615274769b19f2d734ddf508dd /sshpty.c
parent6ad6994c288662fca6949f42bf91fec2aff00bca (diff)
parent99b402ea4c8457b0a3cafff37f5b3410a8dc6476 (diff)
* New upstream release (closes: #536182). Yes, I know 5.3p1 has been out
for a while, but there's no GSSAPI patch available for it yet. - Change the default cipher order to prefer the AES CTR modes and the revised "arcfour256" mode to CBC mode ciphers that are susceptible to CPNI-957037 "Plaintext Recovery Attack Against SSH". - Add countermeasures to mitigate CPNI-957037-style attacks against the SSH protocol's use of CBC-mode ciphers. Upon detection of an invalid packet length or Message Authentication Code, ssh/sshd will continue reading up to the maximum supported packet length rather than immediately terminating the connection. This eliminates most of the known differences in behaviour that leaked information about the plaintext of injected data which formed the basis of this attack (closes: #506115, LP: #379329). - ForceCommand directive now accepts commandline arguments for the internal-sftp server (closes: #524423, LP: #362511). - Add AllowAgentForwarding to available Match keywords list (closes: #540623). - Make ssh(1) send the correct channel number for SSH2_MSG_CHANNEL_SUCCESS and SSH2_MSG_CHANNEL_FAILURE messages to avoid triggering 'Non-public channel' error messages on sshd(8) in openssh-5.1. - Avoid printing 'Non-public channel' warnings in sshd(8), since the ssh(1) has sent incorrect channel numbers since ~2004 (this reverts a behaviour introduced in openssh-5.1; closes: #496017). * Update to GSSAPI patch from http://www.sxw.org.uk/computing/patches/openssh-5.2p1-gsskex-all-20090726.patch, including cascading credentials support (LP: #416958).
Diffstat (limited to 'sshpty.c')
-rw-r--r--sshpty.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sshpty.c b/sshpty.c
index 5a0d1a7ad..bbbc0fefe 100644
--- a/sshpty.c
+++ b/sshpty.c
@@ -46,6 +46,13 @@
46#define O_NOCTTY 0 46#define O_NOCTTY 0
47#endif 47#endif
48 48
49#ifdef __APPLE__
50# include <AvailabilityMacros.h>
51# if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5)
52# define __APPLE_PRIVPTY__
53# endif
54#endif
55
49/* 56/*
50 * Allocates and opens a pty. Returns 0 if no pty could be allocated, or 57 * Allocates and opens a pty. Returns 0 if no pty could be allocated, or
51 * nonzero if a pty was successfully allocated. On success, open file 58 * nonzero if a pty was successfully allocated. On success, open file
@@ -78,10 +85,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen)
78void 85void
79pty_release(const char *tty) 86pty_release(const char *tty)
80{ 87{
88#ifndef __APPLE_PRIVPTY__
81 if (chown(tty, (uid_t) 0, (gid_t) 0) < 0) 89 if (chown(tty, (uid_t) 0, (gid_t) 0) < 0)
82 error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno)); 90 error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno));
83 if (chmod(tty, (mode_t) 0666) < 0) 91 if (chmod(tty, (mode_t) 0666) < 0)
84 error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno)); 92 error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno));
93#endif /* __APPLE_PRIVPTY__ */
85} 94}
86 95
87/* Makes the tty the process's controlling tty and sets it to sane modes. */ 96/* Makes the tty the process's controlling tty and sets it to sane modes. */