Commit Graph

5299 Commits

Author SHA1 Message Date
Darren Tucker c570ff7fa4 - (dtucker) [config.guess config.sub] Update to latest versions from
http://git.savannah.gnu.org/gitweb/ (2008-04-14 and 2008-06-16
   respectively).
2008-09-06 18:20:57 +10:00
Darren Tucker 661f63b7d2 - (dtucker) [openbsd-compat/bsd-poll.c] correctly check for number of FDs
larger than FD_SETSIZE (OpenSSH only ever uses poll with one fd).  Patch
   from Nicholas Marriott.
2008-08-30 07:32:37 +10:00
Damien Miller 212f0b0879 - (djm) [servconf.c] Print UsePAM option in config test mode (when it
has been compiled in); report from nix-corp AT esperi.org.uk
   ok dtucker@
2008-07-23 17:42:29 +10:00
Damien Miller 6ef430dcc3 - djm@cvs.openbsd.org 2008/07/23 07:36:55
[servconf.c]
     do not try to print options that have been compile-time disabled
     in config test mode (sshd -T); report from nix-corp AT esperi.org.uk
     ok dtucker@
2008-07-23 17:40:04 +10:00
Damien Miller 8f42e9b75a - (djm) Release OpenSSH-5.1 2008-07-21 18:22:25 +10:00
Damien Miller 1f8909c2c2 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
[contrib/suse/openssh.spec] Update version number in README and RPM specs
2008-07-21 18:21:52 +10:00
Damien Miller aaae43e7d3 - djm@cvs.openbsd.org 2008/07/21 08:19:07
[version.h]
     openssh-5.1
2008-07-21 18:21:05 +10:00
Damien Miller aa5f433287 - jmc@cvs.openbsd.org 2008/07/18 22:51:01
[sftp-server.8]
     no need for .Pp before or after .Sh;
2008-07-21 18:20:39 +10:00
Damien Miller 2e28d8622d - (djm) [sshconnect2.c] vis.h isn't available everywhere 2008-07-17 19:15:43 +10:00
Darren Tucker 9a3f2b4cc3 - (dtucker) [openbsd-compat/bsd-cygwin_util.c] Remove long-unneeded compat
code, replace with equivalent cygwin library call.  Patch from vinschen
   at redhat.comi, ok djm@.
2008-07-17 19:03:49 +10:00
Damien Miller a1d03a5069 - djm@cvs.openbsd.org 2008/07/17 08:51:07
[auth2-hostbased.c]
     strip trailing '.' from hostname when HostbasedUsesNameFromPacketOnly=yes
     report and patch from res AT qoxp.net (bz#1200); ok markus@
2008-07-17 18:57:19 +10:00
Damien Miller 7ba0ca7f6f - djm@cvs.openbsd.org 2008/07/17 08:48:00
[sshconnect2.c]
     strnvis preauth banner; pointed out by mpf@ ok markus@
2008-07-17 18:57:06 +10:00
Damien Miller 6ef17495e9 - djm@cvs.openbsd.org 2008/07/16 11:52:19
[channels.c]
     this loop index should be automatic, not static
2008-07-16 22:42:06 +10:00
Damien Miller b9d3bee003 - djm@cvs.openbsd.org 2008/07/16 11:51:14
[clientloop.c]
     rename variable first_gc -> last_gc (since it is actually the last
     in the list).
2008-07-16 22:40:52 +10:00
Damien Miller 94717b0be1 - djm@cvs.openbsd.org 2008/07/15 02:23:14
[sftp.1]
     number of pipelined requests is now 64;
     prodded by Iain.Morgan AT nasa.gov
2008-07-16 21:17:23 +10:00
Damien Miller c4657ef181 - (djm) [openbsd-compat/fake-rfc2553.c openbsd-compat/fake-rfc2553.h]
return EAI_FAMILY when trying to lookup unsupported address family;
   from vinschen AT redhat.com
2008-07-14 21:37:36 +10:00
Damien Miller 1fc231cbb5 - (djm) [contrib/cygwin/Makefile contrib/cygwin/ssh-host-config]
[contrib/cygwin/ssh-user-config contrib/cygwin/sshd-inetd]
   Revamped and simplified Cygwin ssh-host-config script that uses
   unified csih configuration tool. Requires recent Cygwin.
   Patch from vinschen AT redhat.com
2008-07-14 12:12:52 +10:00
Damien Miller 276571c29d - djm@cvs.openbsd.org 2008/07/14 01:55:56
[sftp-server.8]
     mention requirement for /dev/log inside chroot when using sftp-server
     with ChrootDirectory
2008-07-14 12:09:57 +10:00
Damien Miller 36d7056f4d - (djm) [umac.c] Rename variable s/buffer_ptr/bufp/ to avoid clash;
reported by cristian.ionescu-idbohrn AT axis.com
2008-07-14 12:04:43 +10:00
Damien Miller 639ce593d4 - (djm) [openbsd-compat/rresvport.c] Add unistd.h for missing close()
prototype; reported by cristian.ionescu-idbohrn AT axis.com
2008-07-14 12:03:27 +10:00
Damien Miller ce02e5e09e - (djm) [openbsd-compat/bindresvport.c] Rename variables s/sin/in/ to
avoid clash with sin(3) function; reported by
   cristian.ionescu-idbohrn AT axis.com
2008-07-14 12:02:24 +10:00
Damien Miller 7f980d1ac7 - djm@cvs.openbsd.org 2008/07/13 22:16:03
[sftp.c]
     increase number of piplelined requests so they properly fill the
     (recently increased) channel window. prompted by rapier AT psc.edu;
     ok markus@
2008-07-14 11:29:24 +10:00
Damien Miller 163886ff71 - djm@cvs.openbsd.org 2008/07/13 22:13:07
[channels.c]
     use struct sockaddr_storage instead of struct sockaddr for accept(2)
     address argument. from visibilis AT yahoo.com in bz#1485; ok markus@
2008-07-14 11:28:58 +10:00
Damien Miller 81dec0589a - sthen@cvs.openbsd.org 2008/07/13 21:22:52
[ssh-keygen.c]
     Change "ssh-keygen -F [host] -l" to not display random art unless
     -v is also specified, making it consistent with the manual and other
     uses of -l.
     ok grunk@
2008-07-14 11:28:29 +10:00
Damien Miller a034baf1b9 - djm@cvs.openbsd.org 2008/07/12 05:33:41
[scp.1]
     better description for -i flag:
     s/RSA authentication/public key authentication/
2008-07-12 17:12:49 +10:00
Damien Miller 2bcb866327 - (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/07/12 04:52:50
     [channels.c]
     unbreak; move clearing of cctx struct to before first use
     reported by dkrause@
2008-07-12 17:12:29 +10:00
Damien Miller b61f3fc31f - markus@cvs.openbsd.org 2008/07/10 18:08:11
[clientloop.c monitor.c monitor_wrap.c packet.c packet.h sshd.c]
     sync v1 and v2 traffic accounting; add it to sshd, too;
     ok djm@, dtucker@
2008-07-11 17:36:48 +10:00
Damien Miller dda5fffb84 - markus@cvs.openbsd.org 2008/07/10 18:05:58
[channels.c]
     missing bzero; from mickey; ok djm@
2008-07-11 17:35:37 +10:00
Damien Miller 87dd5f2804 - stevesk@cvs.openbsd.org 2008/07/07 23:32:51
[key.c]
     /*NOTREACHED*/ for lint warning:
       warning: function key_equal falls off bottom without returning value
     ok djm@
2008-07-11 17:35:09 +10:00
Damien Miller 2f7faf19d5 - stevesk@cvs.openbsd.org 2008/07/07 00:31:41
[ttymodes.c]
     we don't need arg after the debug3() was removed.  from lint.
     ok djm@
2008-07-11 17:34:35 +10:00
Damien Miller 73193b3693 - (djm) [configure.ac] Add -Wformat-security to CFLAGS for gcc 3.x and 4.x 2008-07-09 21:07:19 +10:00
Damien Miller 7acf550aeb - (djm) [auth.c] Missing unistd.h for close() 2008-07-09 20:54:37 +10:00
Damien Miller 773a7b98f9 - (djm) [auth1.c] Fix format string vulnerability in protocol 1 PAM
account check failure path. The vulnerable format buffer is supplied
   from PAM and should not contain attacker-supplied data.
2008-07-09 20:54:05 +10:00
Damien Miller d9648eee7c - (djm) [Makefile.in] Print "all tests passed" when all regress tests pass 2008-07-09 00:21:12 +10:00
Damien Miller c9c96f2e28 - djm@cvs.openbsd.org 2008/07/05 05:16:01
[PROTOCOL]
     grammar
2008-07-05 15:17:48 +10:00
Damien Miller ff2e492028 - (djm) [configure.ac] unbreak: remove extra closing brace 2008-07-05 09:52:03 +10:00
Damien Miller 42743cb6ba - (djm) [Makefile.in] Pass though pass to conch for interop tests 2008-07-05 09:50:23 +10:00
Damien Miller 0b4d48ba74 - djm@cvs.openbsd.org 2008/07/04 23:30:16
[auth1.c auth2.c]
     Make protocol 1 MaxAuthTries logic match protocol 2's.
     Do not treat the first protocol 2 authentication attempt as
     a failure IFF it is for method "none".
     Makes MaxAuthTries' user-visible behaviour identical for
     protocol 1 vs 2.
     ok dtucker@
2008-07-05 09:44:53 +10:00
Damien Miller d874fa517b - OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/07/04 23:08:25
     [packet.c]
     handle EINTR in packet_write_poll()l ok dtucker@
2008-07-05 09:40:56 +10:00
Damien Miller 20d1694719 - (djm) [atomicio.c configure.ac] Disable poll() fallback in atomiciov for
Tru64. readv doesn't seem to be a comparable object there.
   bz#1386, patch from dtucker@ ok me
2008-07-05 09:36:58 +10:00
Damien Miller 22989f1b5e - (djm) [auth.c] Fixed test for locked account on HP/UX with shadowed
passwords disabled. bz#1083 report & patch from senthilkumar_sen AT
   hotpop.com, w/ dtucker@
2008-07-05 08:59:43 +10:00
Damien Miller d8968adb5f - (djm) [atomicio.c channels.c clientloop.c defines.h includes.h]
[packet.c scp.c serverloop.c sftp-client.c ssh-agent.c ssh-keyscan.c]
   [sshd.c] Explicitly handle EWOULDBLOCK wherever we handle EAGAIN, on
   some platforms (HP nonstop) it is a distinct errno;
   bz#1467 reported by sconeu AT yahoo.com; ok dtucker@
2008-07-04 23:10:49 +10:00
Darren Tucker b01bac109b - djm@cvs.openbsd.org 2008/06/30 10:43:03
[regress/conch-ciphers.sh]
     explicitly disable conch options that could interfere with the test
2008-07-04 17:11:30 +10:00
Darren Tucker 5d6d70a842 - djm@cvs.openbsd.org 2008/06/30 10:31:11
[putty-transfer.sh putty-kex.sh putty-ciphers.sh]
     remove "set -e" left over from debugging
2008-07-04 17:10:30 +10:00
Darren Tucker 8c7a14ea28 - djm@cvs.openbsd.org 2008/06/30 08:07:34
[key-options.sh]
     shell portability: use "=" instead of "==" in test(1) expressions,
     double-quote string with backslash escaped /
2008-07-04 17:08:58 +10:00
Darren Tucker f7fa706e70 - (dtucker) [sftp-server.c] Bug #1447: fall back to racy rename if link
returns EXDEV.  Patch from Mike Garrison, ok djm@
2008-07-04 14:10:19 +10:00
Darren Tucker 2784f1fcc3 - dtucker@cvs.openbsd.org 2008/07/04 03:47:02
[monitor.c]
     Make debug a little clearer.  ok djm@
2008-07-04 13:51:45 +10:00
Darren Tucker b03fd02aed - djm@cvs.openbsd.org 2008/07/04 03:44:59
[servconf.c groupaccess.h groupaccess.c]
     support negation of groups in "Match group" block (bz#1315); ok dtucker@
2008-07-04 13:51:12 +10:00
Darren Tucker f5cafb0c85 - otto@cvs.openbsd.org 2008/07/03 21:46:58
[auth2-pubkey.c]
     avoid nasty double free; ok dtucker@ djm@
2008-07-04 12:54:25 +10:00
Darren Tucker 9a2a60986b - djm@cvs.openbsd.org 2008/07/02 13:47:39
[ssh.1 ssh.c]
     When forking after authentication ("ssh -f") with ExitOnForwardFailure
     enabled, delay the fork until after replies for any -R forwards have
     been seen. Allows for robust detection of -R forward failure when
     using -f (similar to bz#92); ok dtucker@
2008-07-04 12:53:50 +10:00
Darren Tucker 7c99b1ceda - djm@cvs.openbsd.org 2008/07/02 13:30:34
[auth2.c]
     really really remove the freebie "none" auth try for protocol 2
2008-07-04 12:53:23 +10:00
Darren Tucker 4230a5dc30 - djm@cvs.openbsd.org 2008/07/02 12:36:39
[auth2-none.c auth2.c]
     Make protocol 2 MaxAuthTries behaviour a little more sensible:
     Check whether client has exceeded MaxAuthTries before running
     an authentication method and skip it if they have, previously it
     would always allow one try (for "none" auth).
     Preincrement failure count before post-auth test - previously this
     checked and postincremented, also to allow one "none" try.
     Together, these two changes always count the "none" auth method
     which could be skipped by a malicious client (e.g. an SSH worm)
     to get an extra attempt at a real auth method. They also make
     MaxAuthTries=0 a useful way to block users entirely (esp. in a
     sshd_config Match block).
     Also, move sending of any preauth banner from "none" auth method
     to the first call to input_userauth_request(), so worms that skip
     the "none" method get to see it too.
2008-07-02 22:56:09 +10:00
Darren Tucker 33c787f23c - dtucker@cvs.openbsd.org 2008/07/02 12:03:51
[auth-rsa.c auth.c auth2-pubkey.c auth.h]
     Merge duplicate host key file checks, based in part on a patch from Rob
     Holland via bz #1348 .  Also checks for non-regular files during protocol
     1 RSA auth.  ok djm@
2008-07-02 22:37:30 +10:00
Darren Tucker 7499b0cca0 - djm@cvs.openbsd.org 2008/07/02 02:24:18
[sshd_config sshd_config.5 sshd.8 servconf.c]
     increase default size of ssh protocol 1 ephemeral key from 768 to 1024
     bits; prodded by & ok dtucker@ ok deraadt@
2008-07-02 22:35:43 +10:00
Darren Tucker f2e21dec68 - stevesk@cvs.openbsd.org 2008/07/01 23:12:47
[PROTOCOL.agent]
     fix some typos; ok djm@
2008-07-02 22:35:00 +10:00
Darren Tucker d7bdc0c8e8 - dtucker@cvs.openbsd.org 2008/07/01 07:24:22
[sshconnect.c sshd.c]
     Send CR LF during protocol banner exchanges, but only for Protocol 2 only,
     in order to comply with RFC 4253.  bz #1443, ok djm@
2008-07-02 22:34:30 +10:00
Darren Tucker 068e01f53f - dtucker@cvs.openbsd.org 2008/07/01 07:20:52
[sshconnect.c]
     Check ExitOnForwardFailure if forwardings are disabled due to a failed
     host key check.  ok djm@
2008-07-02 22:33:55 +10:00
Darren Tucker 1f781b194f - djm@cvs.openbsd.org 2008/06/30 12:18:34
[PROTOCOL]
     clarify that eow@openssh.com is only sent on session channels
2008-07-02 22:33:16 +10:00
Darren Tucker 8748b96522 - djm@cvs.openbsd.org 2008/06/30 12:16:02
[nchan.c]
     only send eow@openssh.com notifications for session channels; ok! markus@
2008-07-02 22:32:43 +10:00
Darren Tucker 8810dd41b9 - djm@cvs.openbsd.org 2008/06/30 12:15:39
[serverloop.c]
     only pass channel requests on session channels through to the session
     channel handler, avoiding spurious log messages; ok! markus@
2008-07-02 22:32:14 +10:00
Darren Tucker 00f00f0451 - djm@cvs.openbsd.org 2008/06/30 08:05:59
[PROTOCOL.agent]
      typo: s/constraint_date/constraint_data/
2008-07-02 22:31:31 +10:00
Damien Miller a766cea689 - (djm) [regress/Makefile] search for conch by path, like we do putty 2008-06-30 08:12:37 +10:00
Damien Miller 4268a136d4 - djm@cvs.openbsd.org 2008/06/28 13:57:25
[regress/Makefile regress/test-exec.sh regress/conch-ciphers.sh]
     very basic regress test against Twisted Conch in "make interop"
     target (conch is available in ports/devel/py-twisted/conch);
     ok markus@
2008-06-30 08:07:56 +10:00
Damien Miller d9bfce83b7 - dtucker@cvs.openbsd.org 2008/06/11 23:11:40
[Makefile]
     Don't run cipher-speed test by default; mistakenly enabled by me
2008-06-30 08:06:51 +10:00
Damien Miller 2e80cf2b63 - dtucker@cvs.openbsd.org 2008/06/10 23:13:43
[regress/Makefile regress/key-options.sh]
     Add regress test for key options.  ok djm@
2008-06-30 08:06:25 +10:00
Damien Miller 1e18beb1e7 - djm@cvs.openbsd.org 2008/06/28 14:08:30
[PROTOCOL PROTOCOL.agent]
     document the protocol used by ssh-agent; "looks ok" markus@
2008-06-30 00:07:00 +10:00
Damien Miller 471db5c2eb - djm@cvs.openbsd.org 2008/06/28 14:05:15
[ssh-agent.c]
     reset global compat flag after processing a protocol 2 signature
     request with the legacy DSA encoding flag set; ok markus
2008-06-30 00:05:48 +10:00
Damien Miller 1cfadabc0e - djm@cvs.openbsd.org 2008/06/28 13:58:23
[ssh-agent.c]
     refuse to add a key that has unknown constraints specified;
     ok markus
2008-06-30 00:05:21 +10:00
Damien Miller bd45afb5ad - djm@cvs.openbsd.org 2008/06/28 07:25:07
[PROTOCOL]
     spelling fixes
2008-06-30 00:04:57 +10:00
Damien Miller 8639920a9b - jmc@cvs.openbsd.org 2008/06/26 21:11:46
[ssh.1]
     add VisualHostKey to the list of options listed in -o;
2008-06-30 00:04:31 +10:00
Damien Miller 1028824e5c - grunk@cvs.openbsd.org 2008/06/26 11:46:31
[readconf.c readconf.h ssh.1 ssh_config.5 sshconnect.c]
     Move SSH Fingerprint Visualization away from sharing the config option
     CheckHostIP to an own config option named VisualHostKey.
     While there, fix the behaviour that ssh would draw a random art picture
     on every newly seen host even when the option was not enabled.
     prodded by deraadt@, discussions,
     help and ok markus@ djm@ dtucker@
2008-06-30 00:04:03 +10:00
Damien Miller 2e9cf49069 - djm@cvs.openbsd.org 2008/06/26 09:19:40
[dh.c dh.h moduli.c]
     when loading moduli from /etc/moduli in sshd(8), check that they
     are of the expected "safe prime" structure and have had
     appropriate primality tests performed;
     feedback and ok dtucker@
2008-06-29 22:47:04 +10:00
Damien Miller 9e720284fe - djm@cvs.openbsd.org 2008/06/26 06:10:09
[sftp-client.c sftp-server.c]
     allow the sftp chmod(2)-equivalent operation to set set[ug]id/sticky
     bits. Note that this only affects explicit setting of modes (e.g. via
     sftp(1)'s chmod command) and not file transfers. (bz#1310)
     ok deraadt@ at c2k8
2008-06-29 22:46:35 +10:00
Damien Miller 007132a7c9 - otto@cvs.openbsd.org 2008/06/25 11:13:43
[key.c]
     add key length to visual fingerprint; zap magical constants;
     ok grunk@ djm@
2008-06-29 22:45:37 +10:00
Damien Miller f184bcf89e - (djm) OpenBSD CVS Sync
- martynas@cvs.openbsd.org 2008/06/21 07:46:46
     [sftp.c]
     use optopt to get invalid flag, instead of return value of getopt,
     which is always '?';  ok djm@
2008-06-29 22:45:13 +10:00
Damien Miller 493f032440 - (djm) [RFC.nroff contrib/cygwin/Makefile contrib/suse/openssh.spec]
RFC.nroff lacks a license, remove it (it is long gone in OpenBSD).
2008-06-28 16:01:35 +10:00
Damien Miller f299ff8c1f - (djm) [ contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
[contrib/suse/openssh.spec] Include moduli.5 in RPM spec files.
2008-06-26 16:01:56 +10:00
Damien Miller 60dcc62535 - (djm) [Makefile.in moduli.5] Include moduli(5) manpage from OpenBSD.
(bz#1372)
2008-06-26 15:59:32 +10:00
Darren Tucker 1a48aecfbc - (dtucker) [channels.c] isatty -> is_tty here too. 2008-06-16 23:35:56 +10:00
Darren Tucker ed3cdc0a7c - dtucker@cvs.openbsd.org 2008/06/16 13:22:53
[session.c channels.c]
     Rename the isatty argument to is_tty so we don't shadow
     isatty(3).  ok markus@
2008-06-16 23:29:18 +10:00
Damien Miller d310d51bad - djm@cvs.openbsd.org 2008/06/15 20:06:26
[channels.c channels.h session.c]
     don't call isatty() on a pty master, instead pass a flag down to
     channel_set_fds() indicating that te fds refer to a tty. Fixes a
     hang on exit on Solaris (bz#1463) in portable but is actually
     a generic bug; ok dtucker deraadt markus
2008-06-16 07:59:23 +10:00
Damien Miller 307c1d10a7 - dtucker@cvs.openbsd.org 2008/06/15 16:58:40
[servconf.c sshd_config.5]
     Allow MaxAuthTries within a Match block.  ok djm@
2008-06-16 07:56:20 +10:00
Damien Miller c62a5af29a - dtucker@cvs.openbsd.org 2008/06/15 16:55:38
[sshd_config.5]
     MaxSessions is allowed in a Match block too
2008-06-16 07:55:46 +10:00
Damien Miller c7ce0da3b0 - dtucker@cvs.openbsd.org 2008/06/14 19:42:10
[scp.1]
     Mention that scp follows symlinks during -r.  bz #1466,
     from nectar at apple
2008-06-16 07:55:06 +10:00
Damien Miller 6051c94a0a - djm@cvs.openbsd.org 2008/06/14 18:33:43
[session.c]
     suppress the warning message from chdir(homedir) failures
     when chrooted (bz#1461); ok dtucker
2008-06-16 07:53:16 +10:00
Damien Miller 6ca16c63c2 - dtucker@cvs.openbsd.org 2008/06/14 17:07:11
[sshd.c]
     ensure default umask disallows at least group and world write; ok djm@
2008-06-16 07:50:58 +10:00
Damien Miller 2a6284782d - OpenBSD CVS Sync
- dtucker@cvs.openbsd.org 2008/06/14 15:49:48
     [sshd.c]
     wrap long line at 80 chars
2008-06-16 07:50:24 +10:00
Darren Tucker 330c93f68a - (dtucker) [configure.ac] Enable -fno-builtin-memset when using gcc. 2008-06-16 02:27:48 +10:00
Damien Miller 8b7ab960df - (djm) [openbsd-compat/sigact.c] Avoid NULL derefs in ancient sigaction
replacement code; patch from ighighi AT gmail.com in bz#1240;
   ok dtucker
2008-06-15 10:55:34 +10:00
Darren Tucker 30fd49e606 - (dtucker) [configure.ac] Bug #1276: avoid linking against libgssapi, which
despite its name doesn't seem to implement all of GSSAPI.  Patch from
   Jan Engelhardt, sanity checked by Simon Wilkinson.
2008-06-14 09:14:46 +10:00
Darren Tucker f6bffb1391 - grunk@cvs.openbsd.org 2008/06/13 20:13:26
[ssh.1]
     Explain the use of SSH fpr visualization using random art, and cite the
     original scientific paper inspiring that technique.
     Much help with English and nroff by jmc@, thanks.
2008-06-14 09:04:26 +10:00
Darren Tucker 03ccc9b142 - dtucker@cvs.openbsd.org 2008/06/13 18:55:22
[scp.c]
     Prevent -Wsign-compare warnings on LP64 systems.  bz #1192, ok deraadt@
2008-06-14 09:02:25 +10:00
Darren Tucker 47e713be94 - dtucker@cvs.openbsd.org 2008/06/13 17:21:20
[mux.c]
     Friendlier error messages for mux fallback.  ok djm@
2008-06-14 09:01:54 +10:00
Darren Tucker d9526a5e96 - dtucker@cvs.openbsd.org 2008/06/13 14:18:51
[auth2-pubkey.c auth-rhosts.c]
     Include unistd.h for close(), prevents warnings in -portable
2008-06-14 09:01:24 +10:00
Darren Tucker f2c16d30b4 - dtucker@cvs.openbsd.org 2008/06/13 13:56:59
[monitor.c]
     Clear key options in the monitor on failed authentication, prevents
     applying additional restrictions to non-pubkey authentications in
     the case where pubkey fails but another method subsequently succeeds.
     bz #1472, found by Colin Watson, ok markus@ djm
2008-06-14 08:59:49 +10:00
Darren Tucker 99bb7619d4 - deraadt@cvs.openbsd.org 2008/06/13 09:44:36
[packet.c]
     compile on older gcc; no decl after code
2008-06-13 22:02:50 +10:00
Darren Tucker f387e59d52 - (dtucker) [openbsd-compat/setenv.c] Make offsets size_t to prevent
compiler warnings on some platforms.  Based on a discussion with otto@
2008-06-13 15:03:14 +10:00
Darren Tucker 06db584e9d - djm@cvs.openbsd.org 2008/06/13 04:40:22
[auth2-pubkey.c auth-rhosts.c]
     refuse to read ~/.shosts or ~/.ssh/authorized_keys that are not
     regular files; report from Solar Designer via Colin Watson in bz#1471
     ok dtucker@ deraadt@
2008-06-13 14:51:28 +10:00
Darren Tucker 7517b5bd31 - dtucker@cvs.openbsd.org 2008/06/13 01:38:23
[misc.c]
     upcast uid to long with matching %ld, prevents warnings in portable
2008-06-13 14:48:59 +10:00
Darren Tucker 2c91b28a6d - (dtucker) [umac.c] STORE_UINT32_REVERSED and endian_convert are never used
on big endian machines, so ifdef them for little endian only to prevent
    unused function warnings.
2008-06-13 12:40:55 +10:00
Darren Tucker 2c1eb82695 - (dtucker) [auth-sia.c] Bug #1241: support password expiry on Tru64 SIA
systems.  Patch from R. Scott Bailey.
2008-06-13 11:13:13 +10:00
Darren Tucker c7e030fd78 - dtucker@cvs.openbsd.org 2008/06/13 00:51:47
[mac.c]
     upcast another size_t to u_long to match format
2008-06-13 10:58:50 +10:00
Darren Tucker 1adfd368c4 - dtucker@cvs.openbsd.org 2008/06/13 00:47:53
[mux.c]
     upcast size_t to u_long to match format arg; ok djm@
2008-06-13 10:58:10 +10:00
Darren Tucker 61b0695273 - (dtucker) [defines.h] Bug #1112: __dead is, well dead. Based on a patch
from Todd Vierling.
2008-06-13 10:28:57 +10:00
Darren Tucker ca19bfe254 - djm@cvs.openbsd.org 2008/06/13 00:16:49
[mux.c]
     fall back to creating a new TCP connection on most multiplexing errors
     (socket connect fail, invalid version, refused permittion, corrupted
     messages, etc.); bz #1329 ok dtucker@
2008-06-13 10:24:03 +10:00
Darren Tucker f8b7eb7c3c - dtucker@cvs.openbsd.org 2008/06/13 00:12:02
[sftp.h log.h]
     replace __dead with __attribute__((noreturn)), makes things
     a little easier to port.  Also, add it to sigdie().  ok djm@
2008-06-13 10:22:54 +10:00
Darren Tucker ff4454dbda - ian@cvs.openbsd.org 2008/06/12 23:24:58
[sshconnect.c]
     tweak wording in message, ok deraadt@ jmc@
2008-06-13 10:21:51 +10:00
Darren Tucker 0f0ef0ab1f - grunk@cvs.openbsd.org 2008/06/12 22:03:36
[key.c]
     add my copyright, ok djm@
2008-06-13 08:58:05 +10:00
Darren Tucker b68fb4ad21 - grunk@cvs.openbsd.org 2008/06/12 21:14:46
[ssh-keygen.c]
     make ssh-keygen -lf show the key type just as ssh-add -l would do it
     ok djm@ markus@
2008-06-13 08:57:27 +10:00
Darren Tucker babc1d5f73 - djm@cvs.openbsd.org 2008/06/12 21:06:25
[clientloop.c]
     I was coalescing expected global request confirmation replies at
     the wrong end of the queue - fix; prompted by markus@
2008-06-13 08:56:01 +10:00
Darren Tucker a64ab33f04 - djm@cvs.openbsd.org 2008/06/12 20:47:04
[sftp-client.c]
     print extension revisions for extensions that we understand
2008-06-13 07:01:29 +10:00
Darren Tucker 3fc464efdc - dtucker@cvs.openbsd.org 2008/06/12 20:38:28
[sshd.c sshconnect.c packet.h misc.c misc.h packet.c]
     Make keepalive timeouts apply while waiting for a packet, particularly
     during key renegotiation (bz #1363).  With djm and Matt Day, ok djm@
2008-06-13 06:42:45 +10:00
Darren Tucker f09e825329 - jmc@cvs.openbsd.org 2008/06/12 19:10:09
[ssh_config.5 ssh-keygen.1]
     tweak the ascii art text; ok grunk
2008-06-13 05:18:03 +10:00
Darren Tucker 1cf65ae61d - (dtucker) [clientloop.c serverloop.c] channel_register_filter now
takes 2 more args.  with djm@
2008-06-13 05:09:18 +10:00
Darren Tucker f6b01b758f - dtucker@cvs.openbsd.org 2008/06/12 16:35:31
[ssh_config.5 ssh.c]
     keyword expansion for localcommand.  ok djm@
2008-06-13 04:56:37 +10:00
Darren Tucker 84c56f536c - djm@cvs.openbsd.org 2008/06/12 15:19:17
[clientloop.h channels.h clientloop.c channels.c mux.c]
     The multiplexing escape char handler commit last night introduced a
     small memory leak per session; plug it.
2008-06-13 04:55:46 +10:00
Darren Tucker 4b3b9773ec - grunk@cvs.openbsd.org 2008/06/12 06:32:59
[key.c]
     We already mark the start of the worm, now also mark the end of the worm
     in our random art drawings.
     ok djm@
2008-06-13 04:55:10 +10:00
Darren Tucker ba69c7a987 - djm@cvs.openbsd.org 2008/06/12 05:32:30
[mux.c]
     some more TODO for me
2008-06-13 04:54:05 +10:00
Darren Tucker e5d98290a6 - djm@cvs.openbsd.org 2008/06/12 05:15:41
[PROTOCOL]
     document tun@openssh.com forwarding method
2008-06-13 04:53:27 +10:00
Darren Tucker d6173c0bd7 - djm@cvs.openbsd.org 2008/06/12 04:24:06
[ssh.c]
     thal shalt not code past the eightieth column
2008-06-13 04:52:53 +10:00
Darren Tucker 4d5cd33a5f - djm@cvs.openbsd.org 2008/06/12 04:17:47
[clientloop.c]
     thall shalt not code past the eightieth column
2008-06-13 04:51:14 +10:00
Darren Tucker 9f407c4422 - djm@cvs.openbsd.org 2008/06/12 04:06:00
[clientloop.h ssh.c clientloop.c]
     maintain an ordered queue of outstanding global requests that we
     expect replies to, similar to the per-channel confirmation queue.
     Use this queue to verify success or failure for remote forward
     establishment in a race free way.
     ok dtucker@
2008-06-13 04:50:27 +10:00
Darren Tucker 2fb66caca2 - djm@cvs.openbsd.org 2008/06/12 03:40:52
[clientloop.h mux.c channels.c clientloop.c channels.h]
     Enable ~ escapes for multiplex slave sessions; give each channel
     its own escape state and hook the escape filters up to muxed
     channels. bz #1331
     Mux slaves do not currently support the ~^Z and ~& escapes.
     NB. this change cranks the mux protocol version, so a new ssh
     mux client will not be able to connect to a running old ssh
     mux master.
     ok dtucker@
2008-06-13 04:49:33 +10:00
Darren Tucker 267e28bb75 - otto@cvs.openbsd.org 2008/06/12 00:13:13
[key.c]
     use an odd number of rows and columns and a separate start marker, looks
     better; ok grunk@
2008-06-13 04:48:11 +10:00
Darren Tucker 78913e0059 - grunk@cvs.openbsd.org 2008/06/12 00:13:55
[sshconnect.c]
     Make ssh print the random art also when ssh'ing to a host using IP only.
     spotted by naddy@, ok and help djm@ dtucker@
2008-06-13 04:47:34 +10:00
Darren Tucker d32b28a307 - grunk@cvs.openbsd.org 2008/06/11 23:51:57
[key.c]
     #define statements that are not atoms need braces around them, else they
     will cause trouble in some cases.
     Also do a computation of -1 once, and not in a loop several times.
     spotted by otto@
2008-06-13 04:45:50 +10:00
Darren Tucker dcc1ab5483 - grunk@cvs.openbsd.org 2008/06/11 23:03:56
[ssh_config.5]
     CheckHostIP set to ``fingerprint'' will display both hex and random art
     spotted by naddy@
2008-06-13 04:44:25 +10:00
Darren Tucker 014d76fa72 - otto@cvs.openbsd.org 2008/06/11 23:02:22
[key.c]
     simpler way of computing the augmentations; ok grunk@
2008-06-13 04:43:51 +10:00
Darren Tucker 35c45535ea - grunk@cvs.openbsd.org 2008/06/11 22:20:46
[ssh-keygen.c ssh-keygen.1]
     ssh-keygen would write fingerprints to STDOUT, and random art to STDERR,
     that is not how it was envisioned.
     Also correct manpage saying that -v is needed along with -l for it to work.
     spotted by naddy@
2008-06-13 04:43:15 +10:00
Darren Tucker a376a32e8e - grunk@cvs.openbsd.org 2008/06/11 21:38:25
[ssh-keygen.c]
     ssh-keygen -lv -f /etc/ssh/ssh_host_rsa_key.pub
     would not display you the random art as intended, spotted by canacar@
2008-06-13 04:42:14 +10:00
Darren Tucker 9c16ac9263 - grunk@cvs.openbsd.org 2008/06/11 21:01:35
[ssh_config.5 key.h readconf.c readconf.h ssh-keygen.1 ssh-keygen.c key.c
      sshconnect.c]
     Introduce SSH Fingerprint ASCII Visualization, a technique inspired by the
     graphical hash visualization schemes known as "random art", and by
     Dan Kaminsky's musings on the subject during a BlackOp talk at the
     23C3 in Berlin.
     Scientific publication (original paper):
     "Hash Visualization: a New Technique to improve Real-World Security",
     Perrig A. and Song D., 1999, International Workshop on Cryptographic
     Techniques and E-Commerce (CrypTEC '99)
     http://sparrow.ece.cmu.edu/~adrian/projects/validation/validation.pdf
     The algorithm used here is a worm crawling over a discrete plane,
     leaving a trace (augmenting the field) everywhere it goes.
     Movement is taken from dgst_raw 2bit-wise.  Bumping into walls
     makes the respective movement vector be ignored for this turn,
     thus switching to the other color of the chessboard.
     Graphs are not unambiguous for now, because circles in graphs can be
     walked in either direction.
     discussions with several people,
     help, corrections and ok markus@ djm@
2008-06-13 04:40:35 +10:00
Darren Tucker 1199673393 - jmc@cvs.openbsd.org 2008/06/11 07:30:37
[sshd.8]
     kill trailing whitespace;
2008-06-13 04:32:00 +10:00
Damien Miller 4401e45be6 - (djm) [channels.c configure.ac]
Do not set SO_REUSEADDR on wildcard X11 listeners (X11UseLocalhost=no)
   bz#1464; ok dtucker
2008-06-12 06:05:12 +10:00
Darren Tucker b8e0500351 - (dtucker) [Makefile.in] Move addrmatch.o to libssh.a where it's needed now. 2008-06-11 09:47:59 +10:00
Darren Tucker e045e0c62a - dtucker@cvs.openbsd.org 2008/06/10 23:13:43
[Makefile regress/key-options.sh]
     Add regress test for key options.  ok djm@
2008-06-11 09:38:12 +10:00
Darren Tucker 2a8b138ed8 - dtucker@cvs.openbsd.org 2008/06/10 23:21:34
[bufaux.c]
     Use '\0' for a nul byte rather than unadorned 0.  ok djm@
2008-06-11 09:35:37 +10:00
Darren Tucker 896ad5a4e4 - djm@cvs.openbsd.org 2008/06/10 23:06:19
[auth-options.c match.c servconf.c addrmatch.c sshd.8]
     support CIDR address matching in .ssh/authorized_keys from="..." stanzas
     ok and extensive testing dtucker@
2008-06-11 09:34:46 +10:00
Darren Tucker 8901fa9c88 - djm@cvs.openbsd.org 2008/06/10 22:15:23
[PROTOCOL ssh.c serverloop.c]
     Add a no-more-sessions@openssh.com global request extension that the
     client sends when it knows that it will never request another session
     (i.e. when session multiplexing is disabled). This allows a server to
     disallow further session requests and terminate the session.
     Why would a non-multiplexing client ever issue additional session
     requests? It could have been attacked with something like SSH'jack:
     http://www.storm.net.nz/projects/7
     feedback & ok markus
2008-06-11 09:34:01 +10:00
Darren Tucker c9807e825a - dtucker@cvs.openbsd.org 2008/06/10 18:21:24
[ssh_config.5]
     clarify that Host patterns are space-separated.  ok deraadt
2008-06-11 09:33:01 +10:00
Darren Tucker 34f49c60fd - (dtucker) [Makefile.in] Define TEST_SSH_IPV6 in make's arguments as well
as environment.
2008-06-11 05:15:51 +10:00
Darren Tucker 5d37690a1f - (dtucker) [Makefile.in configure.ac regress/addrmatch.sh] Skip IPv6
specific tests on platforms that don't do IPv6.
2008-06-11 04:15:05 +10:00
Darren Tucker d8bafea5a0 - dtucker@cvs.openbsd.org 2008/06/10 15:28:49
[test-exec.sh]
     Add quotes
2008-06-11 01:39:38 +10:00
Darren Tucker 5f346649ce - dtucker@cvs.openbsd.org 2008/06/10 15:21:41
[test-exec.sh]
     Use a more portable construct for checking if we're running a putty test
2008-06-11 01:38:52 +10:00
Darren Tucker 9d3739daa1 - (dtucker) [openbsd-compat/fake-rfc2553.h] Add sin6_scope_id to sockaddr_in6
since the new CIDR code in addmatch.c references it.
2008-06-10 23:52:51 +10:00
Darren Tucker 10f9242b86 - dtucker@cvs.openbsd.org 2008/06/10 05:23:32
[addrmatch.sh Makefile]
     Regress test for Match CIDR rules.  ok djm@
2008-06-10 23:16:46 +10:00
Darren Tucker d788b7cb35 - dtucker@cvs.openbsd.org 2008/06/09 18:06:32
[regress/test-exec.sh]
     Don't generate putty keys if we're not going to use them.  ok djm
2008-06-10 23:15:54 +10:00
Darren Tucker e7f3f75651 - jmc@cvs.openbsd.org 2008/06/10 08:17:40
[sshd.8 sshd.c]
     - update usage()
     - fix SYNOPSIS, and sort options
     - some minor additional fixes
2008-06-10 23:06:01 +10:00
Darren Tucker 6a2a400f7a - jmc@cvs.openbsd.org 2008/06/10 07:12:00
[sshd_config.5]
     tweak previous;
2008-06-10 23:03:04 +10:00
Darren Tucker e7140f20cb - dtucker@cvs.openbsd.org 2008/06/10 04:50:25
[sshd.c channels.h channels.c log.c servconf.c log.h servconf.h sshd.8]
     Add extended test mode (-T) and connection parameters for test mode (-C).
     -T causes sshd to write its effective configuration to stdout and exit.
     -C causes any relevant Match rules to be applied before output.  The
     combination allows tesing of the parser and config files.  ok deraadt djm
2008-06-10 23:01:51 +10:00
Darren Tucker b06cc4abf8 - djm@cvs.openbsd.org 2008/06/10 04:17:46
[sshd_config.5]
     better reference for pattern-list
2008-06-10 22:59:53 +10:00
Darren Tucker 7a3935de2f - (dtucker) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/06/10 03:57:27
     [servconf.c match.h sshd_config.5]
     support CIDR address matching in sshd_config "Match address" blocks, with
     full support for negation and fall-back to classic wildcard matching.
     For example:
     Match address 192.0.2.0/24,3ffe:ffff::/32,!10.*
         PasswordAuthentication yes
     addrmatch.c code mostly lifted from flowd's addr.c
     feedback and ok dtucker@
2008-06-10 22:59:10 +10:00
Darren Tucker 588fe0efa4 - dtucker@cvs.openbsd.org 2008/06/09 13:38:46
[PROTOCOL]
     Use a $OpenBSD tag so our scripts will sync changes.
2008-06-09 23:52:22 +10:00
Darren Tucker 3463acaebf - dtucker@cvs.openbsd.org 2008/06/09 13:02:39
Extend 32bit -> 64bit values for statvfs extension missed in previous
     commit.
2008-06-09 23:06:55 +10:00
Darren Tucker 7b598892be - dtucker@cvs.openbsd.org 2008/06/08 20:15:29
[sftp.c sftp-client.c sftp-client.h]
     Have the sftp client store the statvfs replies in wire format,
     which prevents problems when the server's native sizes exceed the
     client's.
     Also extends the sizes of the remaining 32bit wire format to 64bit,
     they're specified as unsigned long in the standard.
2008-06-09 22:49:36 +10:00
Darren Tucker 422c34c96d - dtucker@cvs.openbsd.org 2008/06/08 17:04:41
[sftp-server.c]
     Add case for ENOSYS in errno_to_portable; ok deraadt
2008-06-09 22:48:31 +10:00
Darren Tucker 77001384cc - (dtucker) [configure.ac defines.h sftp-client.c M sftp-server.c] Add a
macro to convert fsid to unsigned long for platforms where fsid is a
   2-member array.
2008-06-09 06:17:53 +10:00
Darren Tucker 598eaa6c0c - (dtucker) [configure.ac defines.h sftp-client.c sftp-server.c sftp.c
openbsd-compat/Makefile.in openbsd-compat/openbsd-compat.h
   openbsd-compat/bsd-statvfs.{c,h}] Add a null implementation of statvfs and
   fstatvfs and remove #defines around statvfs code.  ok djm@
2008-06-09 03:32:29 +10:00
Darren Tucker df189fb279 - djm@cvs.openbsd.org 2008/05/19 20:53:52
[clientloop.c]
     unbreak tree by committing this bit that I missed from:
     Fix sending tty modes when stdin is not a tty (bz#1199). Previously
     we would send the modes corresponding to a zeroed struct termios,
     whereas we should have been sending an empty list of modes.
     Based on patch from daniel.ritz AT alcatel.ch; ok dtucker@ markus@
2008-06-08 12:55:32 +10:00
Darren Tucker 0f7e910604 - djm@cvs.openbsd.org 2008/05/19 15:46:31
[ssh-keygen.c]
     support -l (print fingerprint) in combination with -F (find host) to
     search for a host in ~/.ssh/known_hosts and display its fingerprint;
     ok markus@
2008-06-08 12:54:29 +10:00
Darren Tucker dd39264e4b - djm@cvs.openbsd.org 2008/05/19 15:45:07
[sshtty.c ttymodes.c sshpty.h]
     Fix sending tty modes when stdin is not a tty (bz#1199). Previously
     we would send the modes corresponding to a zeroed struct termios,
     whereas we should have been sending an empty list of modes.
     Based on patch from daniel.ritz AT alcatel.ch; ok dtucker@ markus@
2008-06-08 12:53:20 +10:00
Darren Tucker 136e56f689 - djm@cvs.openbsd.org 2008/05/19 06:14:02
[packet.c] unbreak protocol keepalive timeouts bz#1465; ok dtucker@
2008-06-08 12:49:30 +10:00
Darren Tucker 5b2e2ba9e4 - (dtucker) [configure.ac defines.h sftp-client.c sftp-server.c sftp.c] Do not enable statvfs extensions on platforms that do not have statvfs. ok djm@ 2008-06-08 09:25:28 +10:00
Darren Tucker ce38d8234d - (dtucker) [mux.c] Include paths.h inside ifdef HAVE_PATHS_H. 2008-06-07 06:25:15 +10:00
Damien Miller 58ea61ba2a - (djm) [openbsd-compat/bsd-arc4random.c] Fix math bug that caused bias
in arc4random_uniform with upper_bound in (2^30,2*31). Note that
   OpenSSH did not make requests with upper bounds in this range.
2008-06-04 10:54:00 +10:00
Damien Miller a7058ec7c0 - (djm) [configure.ac mux.c sftp.c openbsd-compat/Makefile.in]
[openbsd-compat/fmt_scaled.c openbsd-compat/openbsd-compat.h]
   Fix compilation on Linux, including pulling in fmt_scaled(3)
   implementation from OpenBSD's libutil.
2008-05-20 08:57:06 +10:00
Damien Miller 58a8114880 - djm@cvs.openbsd.org 2008/05/16 08:30:42
[PROTOCOL]
     document our protocol extensions and deviations; ok markus@
   - djm@cvs.openbsd.org 2008/05/17 01:31:56
     [PROTOCOL]
     grammar and correctness fixes from stevesk@
2008-05-19 16:11:56 +10:00
Damien Miller a7e0d5a34a - djm@cvs.openbsd.org 2008/05/18 21:29:05
[sftp-server.c]
     comment extension announcement
2008-05-19 16:08:41 +10:00
Damien Miller 5159bdd0ec - djm@cvs.openbsd.org 2008/05/15 23:52:24
[nchan2.ms]
     document eow message in ssh protocol 2 channel state machine;
     feedback and ok markus@
2008-05-19 16:08:20 +10:00
Damien Miller 0f30c87c45 - pvalchev@cvs.openbsd.org 2008/05/12 20:52:20
[umac.c]
     Ensure nh_result lies on a 64-bit boundary (fixes warnings observed
     on Itanium on Linux); from Dale Talcott (bug #1462); ok djm@
2008-05-19 16:07:45 +10:00
Damien Miller bab9bd4c20 - markus@cvs.openbsd.org 2008/05/09 16:21:13
[channels.h clientloop.c nchan.c serverloop.c]
     unbreak
        ssh -2 localhost od /bin/ls | true
     ignoring SIGPIPE by adding a new channel message (EOW) that signals
     the peer that we're not interested in any data it might send.
     fixes bz #85; discussion, debugging and ok djm@
2008-05-19 16:06:47 +10:00
Damien Miller d654dd27b5 - markus@cvs.openbsd.org 2008/05/09 16:17:51
[channels.c]
     error-fd race: don't enable the error fd in the select bitmask
     for channels with both in- and output closed, since the channel
     will go away before we call select();
     report, lots of debugging help and ok djm@
2008-05-19 16:05:41 +10:00
Damien Miller 2ff1ca56eb - markus@cvs.openbsd.org 2008/05/09 16:16:06
[session.c]
     re-add the USE_PIPES code and enable it.
     without pipes shutdown-read from the sshd does not trigger
     a SIGPIPE when the forked program does a write.
     ok djm@
     (Id sync only, USE_PIPES never left portable OpenSSH)
2008-05-19 16:04:56 +10:00
Damien Miller b3da593962 - djm@cvs.openbsd.org 2008/05/09 14:26:08
[ssh.c]
     dingo stole my diff hunk
2008-05-19 16:02:37 +10:00
Damien Miller b1cbfa25f1 - djm@cvs.openbsd.org 2008/05/09 14:18:44
[clientloop.c clientloop.h ssh.c mux.c]
     tidy up session multiplexing code, moving it into its own file and
     making the function names more consistent - making ssh.c and
     clientloop.c a fair bit more readable.
     ok markus@
2008-05-19 16:00:08 +10:00
Damien Miller bd74025c7b - djm@cvs.openbsd.org 2008/05/09 04:55:56
[channels.c channels.h clientloop.c serverloop.c]
     Try additional addresses when connecting to a port forward destination
     whose DNS name resolves to more than one address. The previous behaviour
     was to try the first address and give up.

     Reported by stig AT venaas.com in bz#343

     great feedback and ok markus@
2008-05-19 15:37:09 +10:00
Damien Miller 5771ed7d1b - djm@cvs.openbsd.org 2008/05/08 13:06:11
[clientloop.c clientloop.h ssh.c]
     Use new channel status confirmation callback system to properly deal
     with "important" channel requests that fail, in particular command exec,
     shell and subsystem requests. Previously we would optimistically assume
     that the requests would always succeed, which could cause hangs if they
     did not (e.g. when the server runs out of fds) or were unimplemented by
     the server (bz #1384)
     Also, properly report failing multiplex channel requests via the mux
     client stderr (subject to LogLevel in the mux master) - better than
     silently failing.
     most bits ok markus@ (as part of a larger diff)
2008-05-19 15:35:33 +10:00
Damien Miller 7207f64a23 - djm@cvs.openbsd.org 2008/05/08 12:21:16
[monitor.c monitor_wrap.c session.h servconf.c servconf.h session.c]
     [sshd_config sshd_config.5]
     Make the maximum number of sessions run-time controllable via
     a sshd_config MaxSessions knob. This is useful for disabling
     login/shell/subsystem access while leaving port-forwarding working
     (MaxSessions 0), disabling connection multiplexing (MaxSessions 1) or
     simply increasing the number of allows multiplexed sessions.
     Because some bozos are sure to configure MaxSessions in excess of the
     number of available file descriptors in sshd (which, at peak, might be
     as many as 9*MaxSessions), audit sshd to ensure that it doesn't leak fds
     on error paths, and make it fail gracefully on out-of-fd conditions -
     sending channel errors instead of than exiting with fatal().
     bz#1090; MaxSessions config bits and manpage from junyer AT gmail.com
     ok markus@
2008-05-19 15:34:50 +10:00
Damien Miller 9417831ece - (djm) [openbsd-compat/port-tun.c] needs sys/queue.h 2008-05-19 15:28:35 +10:00
Damien Miller caaed01e90 - (djm) [openbsd-compat/bsd-arc4random.c] Warning fixes 2008-05-19 15:26:54 +10:00
Damien Miller b84886ba3e - djm@cvs.openbsd.org 2008/05/08 12:02:23
[auth-options.c auth1.c channels.c channels.h clientloop.c gss-serv.c]
     [monitor.c monitor_wrap.c nchan.c servconf.c serverloop.c session.c]
     [ssh.c sshd.c]
     Implement a channel success/failure status confirmation callback
     mechanism. Each channel maintains a queue of callbacks, which will
     be drained in order (RFC4253 guarantees confirm messages are not
     reordered within an channel).
     Also includes a abandonment callback to clean up if a channel is
     closed without sending confirmation messages. This probably
     shouldn't happen in compliant implementations, but it could be
     abused to leak memory.
     ok markus@ (as part of a larger diff)
2008-05-19 15:05:07 +10:00
Damien Miller db255cad05 - markus@cvs.openbsd.org 2008/05/08 06:59:01
[bufaux.c buffer.h channels.c packet.c packet.h]
     avoid extra malloc/copy/free when receiving data over the net;
     ~10% speedup for localhost-scp; ok djm@
2008-05-19 14:59:37 +10:00
Damien Miller e989019303 - jmc@cvs.openbsd.org 2008/05/07 08:00:14
[sshd_config.5]
     sort;
2008-05-19 14:59:02 +10:00
Damien Miller ba3a6599a2 - pyr@cvs.openbsd.org 2008/05/07 06:43:35
[sshd_config]
     push the sshd_config bits in, spotted by ajacoutot@
2008-05-19 14:58:22 +10:00
Damien Miller 4f755cdc05 - pyr@cvs.openbsd.org 2008/05/07 05:49:37
[servconf.c servconf.h session.c sshd_config.5]
     Enable the AllowAgentForwarding option in sshd_config (global and match
     context), to specify if agents should be permitted on the server.
     As the man page states:
     ``Note that disabling Agent forwarding does not improve security
     unless users are also denied shell access, as they can always install
     their own forwarders.''
     ok djm@, ok and a mild frown markus@
2008-05-19 14:57:41 +10:00
Damien Miller bacb7fbd7e - djm@cvs.openbsd.org 2008/04/30 10:14:03
[ssh-keyscan.1 ssh-keyscan.c]
     default to rsa (protocol 2) keys, instead of rsa1 keys; spotted by
     larsnooden AT openoffice.org
2008-05-19 14:56:33 +10:00
Damien Miller 0b4c16589a - otto@cvs.openbsd.org 2008/04/29 11:20:31
[monitor_mm.h]
     garbage collect two unused fields in struct mm_master; ok markus@
2008-05-19 14:55:29 +10:00
Damien Miller ff0dd88999 - djm@cvs.openbsd.org 2008/04/18 22:01:33
[session.c]
     remove unneccessary parentheses
2008-05-19 14:55:02 +10:00
Damien Miller 64058cb8ef - jmc@cvs.openbsd.org 2008/04/18 17:15:47
[sftp.1]
     macro fixage;
2008-05-19 14:54:25 +10:00
Damien Miller d671e5a978 - djm@cvs.openbsd.org 2008/04/18 12:32:11
[sftp-client.c sftp-client.h sftp-server.c sftp.1 sftp.c sftp.h]
     introduce sftp extension methods statvfs@openssh.com and
     fstatvfs@openssh.com that implement statvfs(2)-like operations,
     based on a patch from miklos AT szeredi.hu (bz#1399)
     also add a "df" command to the sftp client that uses the
     statvfs@openssh.com to produce a df(1)-like display of filesystem
     space and inode utilisation
     ok markus@
2008-05-19 14:53:33 +10:00
Damien Miller 354c48c641 - (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/04/13 00:22:17
     [dh.c sshd.c]
     Use arc4random_buf() when requesting more than a single word of output
     Use arc4random_uniform() when the desired random number upper bound
     is not a power of two
     ok deraadt@ millert@
2008-05-19 14:50:00 +10:00
Damien Miller a4be7c23fd - (djm) [openbsd-compat/bsd-arc4random.c openbsd-compat/openbsd-compat.c]
[configure.ac] Implement arc4random_buf(), import implementation of
     arc4random_uniform() from OpenBSD
2008-05-19 14:47:37 +10:00
Damien Miller 25434de460 - djm@cvs.openbsd.org 2008/04/05 02:46:02
[sshd_config.5]
     HostbasedAuthentication is supported under Match too
2008-05-19 14:29:08 +10:00
Damien Miller 56f41ddc54 - djm@cvs.openbsd.org 2008/04/04 06:44:26
[sshd_config.5]
     oops, some unrelated stuff crept into that commit - backout.
     spotted by jmc@
2008-05-19 14:28:19 +10:00
Damien Miller 797e3d117f - (djm) OpenBSD CVS Sync
- djm@cvs.openbsd.org 2008/04/04 05:14:38
     [sshd_config.5]
     ChrootDirectory is supported in Match blocks (in fact, it is most useful
     there). Spotted by Minstrel AT minstrel.org.uk
2008-05-19 14:27:42 +10:00
Damien Miller c5750226af - (djm) Force string arguments to replacement setproctitle() though
strnvis first. Ok dtucker@
2008-05-16 10:01:54 +10:00
Damien Miller 55754fb002 - (djm) [openbsd-compat/bsd-poll.c] Include stdlib.h to avoid compile-
time warnings on LynxOS. Patch from ops AT iki.fi
2008-04-04 16:16:35 +11:00
Damien Miller 79a1bc918f - (djm) Release 5.0p1 2008-04-03 20:57:05 +11:00
Damien Miller ffa8302172 - (djm) [README] Update link to release notes 2008-04-03 20:56:38 +11:00
Damien Miller 5a4b6468de - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
[contrib/suse/openssh.spec] Crank version numbers in RPM spec files
2008-04-03 20:55:44 +11:00
Damien Miller a68d31b80c - djm@cvs.openbsd.org 2008/04/03 09:50:14
[version.h]
     openssh-5.0
2008-04-03 20:53:08 +11:00
Damien Miller 13ba9c2439 - jmc@cvs.openbsd.org 2008/03/27 22:37:57
[sshd.8]
     remove trailing whitespace;
2008-04-03 20:52:51 +11:00
Damien Miller 5f5cd746f3 - markus@cvs.openbsd.org 2008/04/02 15:36:51
[channels.c]
     avoid possible hijacking of x11-forwarded connections (back out 1.183)
     CVE-2008-1483; ok djm@
2008-04-03 08:43:57 +11:00
Damien Miller 0abb232428 - (djm) Release 4.9p1 2008-03-27 17:53:09 +11:00
Damien Miller 949fb9033c - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
[contrib/suse/openssh.spec] Crank version numbers in RPM spec files
2008-03-27 17:43:45 +11:00
Damien Miller 59682b5961 - (djm) [README] Update link to release notes 2008-03-27 17:43:34 +11:00
Damien Miller 9c8a427453 - (djm) [regress/Makefile] cleanup PuTTY interop test droppings 2008-03-27 17:42:06 +11:00
Damien Miller 5b1c8b3103 - (djm) [configure.ac] --with-selinux too 2008-03-27 12:33:07 +11:00
Damien Miller da3155e159 - (djm) [configure.ac] fix alignment of --without-stackprotect description 2008-03-27 12:30:18 +11:00
Damien Miller 6f1c462ca3 - djm@cvs.openbsd.org 2008/03/24 21:46:54
[regress/sftp-badcmds.sh]
     disable no-replace rename test now that we prefer a POSIX rename; spotted
     by dkrause@
2008-03-27 11:26:56 +11:00
Damien Miller 2ff24f66bf - djm@cvs.openbsd.org 2008/03/27 00:16:49
[version.h]
     openssh-4.9
2008-03-27 11:18:13 +11:00
Damien Miller 95e80955f2 - djm@cvs.openbsd.org 2008/03/26 21:28:14
[auth-options.c auth-options.h session.c sshd.8]
     add no-user-rc authorized_keys option to disable execution of ~/.ssh/rc
2008-03-27 11:03:05 +11:00
Damien Miller 55360e1ceb - djm@cvs.openbsd.org 2008/03/25 23:01:41
[session.c]
     last patch had backwards test; spotted by termim AT gmail.com
2008-03-27 11:02:27 +11:00
Damien Miller a1b48ccf2d - djm@cvs.openbsd.org 2008/03/25 11:58:02
[session.c sshd_config.5]
     ignore ~/.ssh/rc if a sshd_config ForceCommand is specified;
     from dtucker@ ok deraadt@ djm@
2008-03-27 11:02:02 +11:00
Damien Miller e241e85ad3 - deraadt@cvs.openbsd.org 2008/03/24 16:11:07
[monitor_fdpass.c]
     msg_controllen has to be CMSG_SPACE so that the kernel can account for
     each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len).  This
     works now that kernel fd passing has been fixed to accept a bit of
     sloppiness because of this ABI repair.
     lots of discussion with kettenis
2008-03-27 11:01:15 +11:00
Damien Miller 7a3e1d0bc9 - djm@cvs.openbsd.org 2008/03/23 12:54:01
[sftp-client.c]
     prefer POSIX-style file renaming over filexfer rename behaviour if the
     server supports the posix-rename@openssh.com extension.
     Note that the old (filexfer) behaviour would refuse to clobber an
     existing file. Users who depended on this should adjust their sftp(1)
     usage.
     ok deraadt@ markus@
2008-03-27 10:59:57 +11:00
Damien Miller be71e2d972 - deraadt@cvs.openbsd.org 2008/03/15 16:19:02
[monitor_fdpass.c]
     Repair the simple cases for msg_controllen where it should just be
     CMSG_SIZE(sizeof(int)), not sizeof(buffer) which may be larger because
     of alignment; ok kettenis hshoexer
2008-03-27 10:54:44 +11:00
Damien Miller f92e063872 - deraadt@cvs.openbsd.org 2008/03/13 01:49:53
[monitor_fdpass.c]
     Correct CMSG_SPACE and CMSG_LEN usage everywhere in the tree. Due to
     an extensive discussion with otto, kettenis, millert, and hshoexer
2008-03-27 10:53:23 +11:00
Damien Miller 5447eb2454 - jmc@cvs.openbsd.org 2008/02/11 07:58:28
[ssh.1 sshd.8 sshd_config.5]
     bump Mdocdate for pages committed in "febuary", necessary because
     of a typo in rcs.c;
2008-03-27 10:50:21 +11:00
Damien Miller bc98185cde - (djm) Fix RCS ident in sftp-server-main.c 2008-03-27 10:45:49 +11:00
Darren Tucker b8eb586412 - (dtucker) Cache selinux status earlier so we know if it's enabled after a
chroot.  Allows ChrootDirectory to work with selinux support compiled in
   but not enabled.  Using it with selinux enabled will require some selinux
   support inside the chroot.  "looks sane" djm@
2008-03-27 07:27:20 +11:00
Damien Miller a193900674 - (djm) [session.c] Relocate incorrectly-placed closefrom() that was causing
crashes when used with ChrootDirectory
2008-03-15 17:27:58 +11:00
Damien Miller 8f8b156acc - (djm) [regress/test-exec.sh] Quote putty-related variables in case they are
empty; report and patch from Peter Stuge
 - (djm) [regress/test-exec.sh] Silence noise from detection of putty
   commands; report from Peter Stuge
2008-03-15 09:25:54 +11:00
Tim Rice 02db85bdcb - (tim) [regress/localcommand.sh] Shell portability fix. Reported by imorgan at
nas.nasa.gov
2008-03-14 11:02:51 -07:00
Tim Rice 5143043409 - (tim) [regress/sftp-cmds.sh] s/cd/lcd/ in lls test. Reported by
vinschen at redhat.com. Add () to put echo commands in subshell for lls test
   I mistakenly left out of last commit.
2008-03-14 10:39:17 -07:00
Tim Rice 817d7efb57 forgot to add vinschen at redhat.com on last commit 2008-03-13 18:37:05 -07:00
Tim Rice dce65cfb3c - (tim) [regress/sftp-cmds.sh regress/ssh2putty.sh] Shell portability fixes
from imorgan at nas.nasa.gov
2008-03-13 18:21:06 -07:00
Tim Rice 3eb144911c - (tim) [scp.c] Use poll.h if available, fall back to sys/poll.h if not. Patch
by vinschen at redhat.com.
2008-03-13 17:59:50 -07:00
Damien Miller c2cefb0fe9 - (djm) [Makefile.in regress/test-exec.sh] Find installed plink(1) and
puttygen(1) by $PATH
2008-03-13 12:41:31 +11:00
Damien Miller 6642996134 - (djm) [Makefile.in regress/Makefile] Fix interop-tests target (note to
self: make changes to Makefile.in next time, not the generated Makefile).
2008-03-13 12:05:40 +11:00
Damien Miller af78493bba - djm@cvs.openbsd.org 2007/12/21 04:13:53
[regress/Makefile regress/test-exec.sh regress/putty-ciphers.sh]
     [regress/putty-kex.sh regress/putty-transfer.sh regress/ssh2putty.sh]
     basic (crypto, kex and transfer) interop regression tests against putty
     To run these, install putty and run "make interop-tests" from the build
     directory - the tests aren't run by default yet.
2008-03-13 00:17:00 +11:00
Damien Miller 4cd5fbab4d - djm@cvs.openbsd.org 2007/12/12 05:04:03
[regress/sftp-cmds.sh]
     unbreak lls command and add a regress test that would have caught the
     breakage; spotted by mouring@
     NB. sftp code change already committed.
2008-03-12 23:59:43 +11:00
Damien Miller d666d8e5d4 - jmc@cvs.openbsd.org 2007/11/25 15:35:09
[regress/agent-getpeereid.sh regress/agent.sh]
     more existant -> existent, from Martynas Venckus;
     pfctl changes: ok henning
     ssh changes: ok deraadt
2008-03-12 23:58:55 +11:00
Damien Miller a5e584274d - dtucker@cvs.openbsd.org 2007/10/29 06:57:13
[regress/Makefile regress/localcommand.sh]
     Add simple regress test for LocalCommand; ok djm@
2008-03-12 23:58:05 +11:00
Darren Tucker 1e42689ad5 fix log date 2008-03-11 23:01:44 +11:00
Darren Tucker 52358d6df3 - (dtucker) [auth-pam.c monitor.c session.c sshd.c] Bug #926: Move
pam_open_session and pam_close_session into the privsep monitor, which
   will ensure that pam_session_close is called as root.  Patch from Tomas
   Mraz.
2008-03-11 22:58:25 +11:00
Darren Tucker fe1cf97ee8 - (dtucker) [configure.ac] Run stack-protector tests with -Werror to catch
platforms where gcc understands the option but it's not supported (and
   thus generates a warning).
2008-03-09 22:50:50 +11:00
Darren Tucker 7643e3397d - (dtucker) [openbsd-compat/regress/strtonumtest.c] Bug #1347: Use platform's
equivalent of LLONG_MAX for the compat regression tests, which makes them
   run on AIX and HP-UX.  Patch from David Leonard.
2008-03-09 17:10:09 +11:00
Darren Tucker 16ba6a8ea2 - (dtucker) [openbsd-compat/port-aix.{c,h}] Remove AIX specific initgroups
implementation.  It's not needed to fix bug #1081 and breaks the build
   on some AIX configurations.
2008-03-09 16:36:55 +11:00
Darren Tucker b7918afddf - (dtucker) [configure.ac] It turns out gcc's -fstack-protector-all doesn't
always work for all platforms and versions, so test what we can and
   add a configure flag to turn it of if needed.  ok djm@
2008-03-09 11:34:23 +11:00
Tim Rice 68d293859e - (tim) [regress/sftp-glob.sh] Shell portability fix. 2008-03-07 19:00:33 -08:00
Damien Miller a79bb8ec5e - deraadt@cvs.openbsd.org 2008/03/04 21:15:42
[version.h]
     crank version; from djm
2008-03-07 18:35:47 +11:00
Damien Miller c0c53c3114 - deraadt@cvs.openbsd.org 2008/03/02 18:19:35
[monitor_fdpass.c]
     use a union to ensure alignment of the cmsg (pay attention: various other
     parts of the tree need this treatment too); ok djm
2008-03-07 18:35:26 +11:00
Damien Miller 7c29661471 - djm@cvs.openbsd.org 2008/02/27 20:21:15
[sftp-server.c]
     add an extension method "posix-rename@openssh.com" to perform POSIX atomic
     rename() operations. based on patch from miklos AT szeredi.hu in bz#1400;
     ok dtucker@ markus@
2008-03-07 18:33:53 +11:00
Damien Miller 58226f6068 - dtucker@cvs.openbsd.org 2008/02/22 20:44:02
[clientloop.c packet.c packet.h serverloop.c]
     Allow all SSH2 packet types, including UNIMPLEMENTED to reset the
     keepalive timer (bz #1307).  ok markus@
2008-03-07 18:33:30 +11:00
Damien Miller 7cb2b56b1c - djm@cvs.openbsd.org 2008/02/22 05:58:56
[session.c]
     closefrom() call was too early, delay it until just before we execute
     the user's rc files (if any).
2008-03-07 18:33:12 +11:00
Damien Miller 767087b8ec - markus@cvs.openbsd.org 2008/02/20 15:25:26
[session.c]
     correct boolean encoding for coredump; der Mouse via dugsong
2008-03-07 18:32:42 +11:00
Damien Miller 2ee0c43f98 - mbalmer@cvs.openbsd.org 2008/02/14 13:10:31
[sshd.c]
     When started in configuration test mode (-t) do not check that sshd is
     being started with an absolute path.
     ok djm
2008-03-07 18:31:47 +11:00
Damien Miller 76e95daad1 - djm@cvs.openbsd.org 2008/02/13 22:38:17
[servconf.h session.c sshd.c]
     rekey arc4random and OpenSSL RNG in postauth child
     closefrom fds > 2 before shell/command execution
     ok markus@
2008-03-07 18:31:24 +11:00
Damien Miller 757a38a43b - jmc@cvs.openbsd.org 2008/02/11 07:58:28
[ssh.1 sshd.8 sshd_config.5]
     bump Mdocdate for pages committed in "febuary", necessary because
     of a typo in rcs.c;
2008-03-07 18:27:58 +11:00
Darren Tucker 54e859f63d - (dtucker) [configure.ac] FreeBSD's glob() doesn't behave the way we expect
either, so use our own.
2008-03-02 21:52:27 +11:00