dtucker [Wed, 28 Feb 2007 10:19:58 +0000 (10:19 +0000)]
- dtucker@cvs.openbsd.org 2007/02/28 00:55:30
[ssh-agent.c]
Remove expired keys periodically so they don't remain in memory when
the agent is entirely idle, as noted by David R. Piegdon. This is the
simple fix, a more efficient one will be done later. With markus,
deraadt, with & ok djm.
dtucker [Sun, 25 Feb 2007 09:38:55 +0000 (09:38 +0000)]
- ray@cvs.openbsd.org 2007/02/24 03:30:11
[moduli.c]
- strlen returns size_t, not int.
- Pass full buffer size to fgets.
OK djm@, millert@, and moritz@.
dtucker [Sun, 25 Feb 2007 09:37:21 +0000 (09:37 +0000)]
- dtucker@cvs.openbsd.org 2007/02/21 11:00:05
[sshd.c]
Clear alarm() before restarting sshd on SIGHUP. Without this, if there's
a SIGALRM pending (for SSH1 key regeneration) when sshd is SIGHUP'ed, the
newly exec'ed sshd will get the SIGALRM and not have a handler for it,
and the default action will terminate the listening sshd. Analysis and
patch from andrew at gaul.org.
dtucker [Sun, 25 Feb 2007 09:36:49 +0000 (09:36 +0000)]
- djm@cvs.openbsd.org 2007/02/20 10:25:14
[clientloop.c]
set maximum packet and window sizes the same for multiplexed clients
as normal connections; ok markus@
dtucker [Mon, 19 Feb 2007 11:56:55 +0000 (11:56 +0000)]
- (dtucker) [openbsd-compat/getrrsetbyname.c] Don't attempt to calloc
an array for signatures when there are none since "calloc(0, n) returns
NULL on some platforms (eg Tru64), which is explicitly permitted by
POSIX. Diagnosis and patch by svallet genoscope.cns.fr.
dtucker [Mon, 19 Feb 2007 11:25:37 +0000 (11:25 +0000)]
- dtucker@cvs.openbsd.org 2007/02/19 10:45:58
[monitor_wrap.c servconf.c servconf.h monitor.c sshd_config.5]
Teach Match how handle config directives that are used before
authentication. This allows configurations such as permitting password
authentication from the local net only while requiring pubkey from
offsite. ok djm@, man page bits ok jmc@
dtucker [Mon, 19 Feb 2007 11:14:11 +0000 (11:14 +0000)]
- djm@cvs.openbsd.org 2007/01/22 13:06:21
[scp.c]
fix detection of whether we should show progress meter or not: scp
tested isatty(stderr) but wrote the progress meter to stdout. This patch
makes it test stdout. bz#1265 reported by junkmail AT bitsculpture.com;
of dtucker@
dtucker [Mon, 19 Feb 2007 11:13:39 +0000 (11:13 +0000)]
- djm@cvs.openbsd.org 2007/01/22 11:32:50
[sftp-client.c]
return error from do_upload() when a write fails. fixes bz#1252: zero
exit status from sftp when uploading to a full device. report from
jirkat AT atlas.cz; ok dtucker@
dtucker [Mon, 19 Feb 2007 11:09:45 +0000 (11:09 +0000)]
- dtucker@cvs.openbsd.org 2007/01/17 23:22:52
[readconf.c]
Honour activep for times (eg ServerAliveInterval) while parsing
ssh_config and ~/.ssh/config so they work properly with Host directives.
From mario.lorenz@wincor-nixdorf.com via bz #1275. ok markus@
dtucker [Mon, 19 Feb 2007 11:08:17 +0000 (11:08 +0000)]
- jmc@cvs.openbsd.org 2007/01/10 13:23:22
[ssh_config.5]
do not use a list for SYNOPSIS;
this is actually part of a larger report sent by eric s. raymond
and forwarded by brad, but i only read half of it. spotted by brad.
djm [Sun, 28 Jan 2007 23:16:28 +0000 (23:16 +0000)]
- (djm) [channels.c serverloop.c] Fix so-called "hang on exit" (bz #52)
when closing a tty session when a background process still holds tty
fds open. Great detective work and patch by Marc Aurele La France,
slightly tweaked by me; ok dtucker@
dtucker [Tue, 23 Jan 2007 13:07:29 +0000 (13:07 +0000)]
- (dtucker) [openbsd-compat/bsd-snprintf.c] Static declarations for public
library interfaces aren't very helpful. Fix up the DOPR_OUTCH macro
so it works properly and modify its callers so that they don't pre or
post decrement arguments that are conditionally evaluated. While there,
put SNPRINTF_CONST back as it prevents build failures in some
configurations. ok djm@ (for most of it)
dtucker [Wed, 17 Jan 2007 00:00:13 +0000 (00:00 +0000)]
- (dtucker) [packet.c] Re-remove in_systm.h since it's already in includes.h
and multiple including it causes problems on old IRIXes. (It snuck back
in during a sync.) Found (again) by Georg Schwarz.
djm [Sun, 14 Jan 2007 10:20:30 +0000 (10:20 +0000)]
- (djm) [openbsd-compat/bsd-snprintf.c] Fix integer overflow in return
value of snprintf replacement, similar to bugs in various libc
implementations. This overflow is not exploitable in OpenSSH.
While I'm fiddling with it, make it a fair bit faster by inlining the
append-char routine; ok dtucker@
djm [Fri, 5 Jan 2007 05:29:02 +0000 (05:29 +0000)]
- dtucker@cvs.openbsd.org 2006/12/14 10:01:14
[servconf.c]
Make "PermitOpen all" first-match within a block to match the way other
options work. ok markus@ djm@
djm [Fri, 5 Jan 2007 05:28:36 +0000 (05:28 +0000)]
- dtucker@cvs.openbsd.org 2006/12/13 08:34:39
[servconf.c]
Make PermitOpen work with multiple values like the man pages says.
bz #1267 with details from peter at dmtz.com, with & ok djm@
djm [Fri, 5 Jan 2007 05:26:45 +0000 (05:26 +0000)]
- djm@cvs.openbsd.org 2006/12/12 03:58:42
[channels.c compat.c compat.h]
bz #1019: some ssh.com versions apparently can't cope with the
remote port forwarding bind_address being a hostname, so send
them an address for cases where they are not explicitly
specified (wildcard or localhost bind). reported by daveroth AT
acm.org; ok dtucker@ deraadt@
djm [Mon, 4 Dec 2006 22:08:54 +0000 (22:08 +0000)]
- (djm) [auth.c] Fix NULL pointer dereference in fakepw(). Crash would
occur if the server did not have the privsep user and an invalid user
tried to login and both privsep and krb5 auth are disabled.
dtucker [Tue, 7 Nov 2006 12:16:08 +0000 (12:16 +0000)]
- markus@cvs.openbsd.org 2006/11/07 10:31:31
[monitor.c version.h]
correctly check for bad signatures in the monitor, otherwise the monitor
and the unpriv process can get out of sync. with dtucker@, ok djm@,
dtucker@
djm [Sat, 4 Nov 2006 18:32:02 +0000 (18:32 +0000)]
- markus@cvs.openbsd.org 2006/10/31 16:33:12
[kexdhc.c kexdhs.c kexgexc.c kexgexs.c]
check DH_compute_key() for -1 even if it should not happen because of
earlier calls to dh_pub_is_valid(); report krahmer at suse.de; ok djm
dtucker [Tue, 31 Oct 2006 23:28:49 +0000 (23:28 +0000)]
- (dtucker) [openbsd-compat/port-solaris.c] Bug #1255: Make only hwerr
events fatal in Solaris process contract support and tell it to signal
only processes in the same process group when something happens.
Based on information from andrew.benham at thus.net and similar to
a patch from Chad Mynhier. ok djm@
djm [Mon, 23 Oct 2006 17:02:41 +0000 (17:02 +0000)]
- markus@cvs.openbsd.org 2006/10/11 12:38:03
[clientloop.c serverloop.c]
exit instead of doing a blocking tcp send if we detect a client/server
timeout, since the tcp sendqueue might be already full (of alive
requests); ok dtucker, report mpf
djm [Mon, 23 Oct 2006 17:01:56 +0000 (17:01 +0000)]
- djm@cvs.openbsd.org 2006/10/09 23:36:11
[session.c]
xmalloc -> xcalloc that was missed previously, from portable
(NB. Id sync only for portable, obviously)
djm [Mon, 23 Oct 2006 17:01:16 +0000 (17:01 +0000)]
- djm@cvs.openbsd.org 2006/10/06 02:29:19
[ssh-agent.c ssh-keyscan.c ssh.c]
sys/resource.h needs sys/time.h; prompted by brad@
(NB. Id sync only for portable)
djm [Mon, 23 Oct 2006 17:00:12 +0000 (17:00 +0000)]
- (djm) OpenBSD CVS Sync
- ray@cvs.openbsd.org 2006/09/30 17:48:22
[sftp.c]
Clear errno before calling the strtol functions.
From Paul Stoeber <x0001 at x dot de1 dot cc>.
OK deraadt@.
dtucker [Tue, 17 Oct 2006 21:53:06 +0000 (21:53 +0000)]
- ray@cvs.openbsd.org 2006/09/25 04:55:38
[ssh-keyscan.1 ssh.1]
Change "a SSH" to "an SSH". Hurray, I'm not the only one who
pronounces "SSH" as "ess-ess-aich".
OK jmc@ and stevesk@.
dtucker [Fri, 6 Oct 2006 23:07:20 +0000 (23:07 +0000)]
- (dtucker) [configure.ac] Set put -lselinux into $LIBS while testing for
SELinux functions so they're detected correctly. Patch from pebenito at
gentoo.org.
tim [Tue, 3 Oct 2006 16:34:35 +0000 (16:34 +0000)]
- (tim) [configure.ac] Move CHECK_HEADERS test before platform specific
section so additional platform specific CHECK_HEADER tests will work
correctly. Fixes "<net/if_tap.h> on FreeBSD" problem report by des AT des.no
Feedback and "seems like a good idea" dtucker@
- (dtucker) [entropy.c] Bug #1238: include signal.h to fix compilation error
on Solaris 8 w/out /dev/random or prngd. Patch from rl at
math.technion.ac.il.
- otto@cvs.openbsd.org 2006/09/19 05:52:23
[sftp.c]
Use S_IS* macros insted of masking with S_IF* flags. The latter may
have multiple bits set, which lead to surprising results. Spotted by
Paul Stoeber, more to come. ok millert@ pedro@ jaredy@ djm@
- (dtucker) [configure.ac] On AIX, check to see if the compiler will allow
macro redefinitions, and if not, remove "-qlanglvl=ansi" from the flags.
Allows build out of the box with older VAC and XLC compilers. Found by
David Bronder and Bernhard Simon.
- (dtucker) [auth-pam.c] Propogate TZ environment variable to PAM auth
process so that any logging it does is with the right timezone. From
Scott Strickler, ok djm@.
- djm@cvs.openbsd.org 2006/09/16 19:53:37
[deattack.c deattack.h packet.c]
limit maximum work performed by the CRC compensation attack detector,
problem reported by Tavis Ormandy, Google Security Team;
ok markus@ deraadt@
- (djm) [Makefile.in buildpkg.sh.in configure.ac openssh.xml.in]
Support SMF in Solaris Packages if enabled by configure. Patch from
Chad Mynhier, tested by dtucker@
- (djm) [sshd.c auth.c] Set up fakepw() with privsep uid/gid, so it can
be used to drop privilege to; fixes Solaris GSSAPI crash reported by
Magnus Abrante; suggestion and feedback dtucker@
NB. this change will require that the privilege separation user must
exist on all the time, not just when UsePrivilegeSeparation=yes
- (dtucker) [configure.ac] Define BROKEN_UPDWTMP on SCO OSR6 as the native
updwdtmp seems to generate invalid wtmp entries. From Roger Cornelius,
ok djm@
- (dtucker) [configure.ac openbsd-compat/openbsd-compat.h] Check for
declaration of writev(2) and declare it ourselves if necessary. Makes
the atomiciov() calls build on really old systems. ok djm@
- (dtucker) [ssh-keyscan.c ssh-rand-helper.c ssh.c sshconnect.c
openbsd-compat/bindresvport.c openbsd-compat/getrrsetbyname.c
openbsd-compat/port-tun.c openbsd-compat/rresvport.c] Include <arpa/inet.h>
for hton* and ntoh* macros. Required on (at least) HP-UX since we define
_XOPEN_SOURCE_EXTENDED. Found by santhi.amirta at gmail com.