djm [Fri, 7 Mar 2008 07:33:30 +0000 (07:33 +0000)]
- 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@
djm [Fri, 7 Mar 2008 07:33:12 +0000 (07:33 +0000)]
- 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).
djm [Fri, 7 Mar 2008 07:31:47 +0000 (07:31 +0000)]
- 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
djm [Fri, 7 Mar 2008 07:27:58 +0000 (07:27 +0000)]
- 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;
dtucker [Fri, 29 Feb 2008 02:57:47 +0000 (02:57 +0000)]
- (dtucker) [openbsd-compat/bsd-poll.c] We don't check for select(2) in
configure (and there's not much point, as openssh won't work without it)
so HAVE_SELECT is not defined and the poll(2) compat code doesn't get
built in. Remove HAVE_SELECT so we can build on platforms without poll.
dtucker [Thu, 28 Feb 2008 12:16:04 +0000 (12:16 +0000)]
- (dtucker) [configure.ac openbsd-compat/port-aix.{c,h}] Bug #1081: Implement
getgrouplist via getgrset on AIX, rather than iterating over getgrent.
This allows, eg, Match and AllowGroups directives to work with NIS and
LDAP groups.
dtucker [Thu, 28 Feb 2008 08:13:52 +0000 (08:13 +0000)]
- (dtucker) [includes.h ssh-add.c ssh-agent.c ssh-keygen.c ssh.c sshd.c
openbsd-compat/openssl-compat.{c,h}] Bug #1437 Move the OpenSSL compat
header to after OpenSSL headers, since some versions of OpenSSL have
SSLeay_add_all_algorithms as a macro already.
dtucker [Mon, 25 Feb 2008 10:05:04 +0000 (10:05 +0000)]
- (dtucker) [configure.ac audit-bsm.c] Bug #1420: Add a local implementation
of aug_get_machine for systems that don't have their own (eg OS X, FreeBSD). Help and testing from csjp at FreeBSD org, vgiffin at apple com. ok djm@
dtucker [Mon, 25 Feb 2008 09:21:20 +0000 (09:21 +0000)]
- (dtucker) [openbsd-compat/fake-rfc2553.h] rename ssh_gai_strerror hack
since it now conflicts with the helper function in misc.c. From
vinschen AT redhat.com.
dtucker [Mon, 25 Feb 2008 09:18:31 +0000 (09:18 +0000)]
20080224
- (tim) [contrib/cygwin/ssh-host-config]
Grammar changes on SYSCONFDIR LOCALSTATEDIR messages.
Check more thoroughly that it's possible to create the /var/empty directory.
Patch by vinschen AT redhat.com
tim [Sat, 23 Feb 2008 22:47:37 +0000 (22:47 +0000)]
[contrib/cygwin/ssh-host-config]
Grammar changes on SYSCONFDIR LOCALSTATEDIR messages.
Check more thoroughly that it's possible to create the /var/empty directory.
Patch by vinschen AT redhat.com
djm [Sun, 10 Feb 2008 11:48:55 +0000 (11:48 +0000)]
- djm@cvs.openbsd.org 2008/02/10 10:54:29
[servconf.c session.c]
delay ~ expansion for ChrootDirectory so it expands to the logged-in user's
home, rather than the user who starts sshd (probably root)
djm [Sun, 10 Feb 2008 11:44:20 +0000 (11:44 +0000)]
- djm@cvs.openbsd.org 2008/02/08 23:24:07
[servconf.c servconf.h session.c sftp-server.c sftp.h sshd_config]
[sshd_config.5]
add sshd_config ChrootDirectory option to chroot(2) users to a directory
and tweak internal sftp server to work with it (no special files in chroot
required). ok markus@
djm [Sun, 10 Feb 2008 11:40:12 +0000 (11:40 +0000)]
- djm@cvs.openbsd.org 2008/02/08 23:24:07
[servconf.c servconf.h session.c sftp-server.c sftp.h sshd_config]
[sshd_config.5]
add sshd_config ChrootDirectory option to chroot(2) users to a directory
and tweak internal sftp server to work with it (no special files in
chroot required). ok markus@
djm [Sun, 10 Feb 2008 11:27:47 +0000 (11:27 +0000)]
- dtucker@cvs.openbsd.org 2008/01/23 01:56:54
[clientloop.c packet.c serverloop.c]
Revert the change for bz #1307 as it causes connection aborts if an IGNORE
packet arrives while we're waiting in packet_read_expect (and possibly
elsewhere).
djm [Sun, 10 Feb 2008 11:27:24 +0000 (11:27 +0000)]
- djm@cvs.openbsd.org 2008/01/21 19:20:17
[sftp-client.c]
when a remote write error occurs during an upload, ensure that ACKs for
all issued requests are properly drained. patch from t8m AT centrum.cz
djm [Sun, 10 Feb 2008 11:26:51 +0000 (11:26 +0000)]
- djm@cvs.openbsd.org 2008/01/21 17:24:30
[sftp-server.c]
Remove the fixed 100 handle limit in sftp-server and allocate as many
as we have available file descriptors. Patch from miklos AT szeredi.hu;
ok dtucker@ markus@
djm [Sun, 10 Feb 2008 11:26:24 +0000 (11:26 +0000)]
- djm@cvs.openbsd.org 2008/01/20 00:38:30
[sftp.c]
When uploading, correctly handle the case of an unquoted filename with
glob metacharacters that match a file exactly but not as a glob, e.g. a
file called "[abcd]". report and test cases from duncan2nd AT gmx.de
djm [Sun, 10 Feb 2008 11:25:52 +0000 (11:25 +0000)]
- djm@cvs.openbsd.org 2008/01/19 23:09:49
[readconf.c readconf.h sshconnect2.c]
promote rekeylimit to a int64 so it can hold the maximum useful limit
of 2^32; report and patch from Jan.Pechanec AT Sun.COM, ok dtucker@
djm [Sun, 10 Feb 2008 11:25:24 +0000 (11:25 +0000)]
- djm@cvs.openbsd.org 2008/01/19 23:02:40
[channels.c]
When we added support for specified bind addresses for port forwards, we
added a quirk SSH_OLD_FORWARD_ADDR. There is a bug in our handling of
this for -L port forwards that causes the client to listen on both v4
and v6 addresses when connected to a server with this quirk, despite
having set 0.0.0.0 as a bind_address.
report and patch from Jan.Pechanec AT Sun.COM; ok dtucker@
djm [Sun, 10 Feb 2008 11:24:30 +0000 (11:24 +0000)]
- djm@cvs.openbsd.org 2008/01/19 22:22:58
[ssh-keygen.c]
when hashing individual hosts (ssh-keygen -Hf hostname), make sure we
hash just the specified hostname and not the entire hostspec from the
keyfile. It may be of the form "hostname,ipaddr", which would lead to
a hash that never matches. report and fix from jp AT devnull.cz
djm [Sun, 10 Feb 2008 11:23:41 +0000 (11:23 +0000)]
- djm@cvs.openbsd.org 2008/01/19 22:04:57
[sftp-client.c]
fix remote handle leak in do_download() local file open error path;
report and fix from sworley AT chkno.net
djm [Sun, 10 Feb 2008 11:23:18 +0000 (11:23 +0000)]
- djm@cvs.openbsd.org 2008/01/19 20:51:26
[ssh.c]
ignore SIGPIPE in multiplex client mode - we can receive this if the
server runs out of fds on us midway. Report and patch from
gregory_shively AT fanniemae.com
djm [Sun, 10 Feb 2008 11:22:53 +0000 (11:22 +0000)]
- djm@cvs.openbsd.org 2008/01/19 20:48:53
[clientloop.c]
fd leak on session multiplexing error path. Report and patch from
gregory_shively AT fanniemae.com
djm [Sun, 10 Feb 2008 11:21:28 +0000 (11:21 +0000)]
- djm@cvs.openbsd.org 2008/01/19 19:13:28
[ssh.1]
satisfy the pedants: -q does not suppress all diagnostic messages (e.g.
some commandline parsing warnings go unconditionally to stdout).
djm [Sun, 10 Feb 2008 11:20:44 +0000 (11:20 +0000)]
- chl@cvs.openbsd.org 2008/01/11 07:22:28
[sftp-client.c sftp-client.h]
disable unused functions
initially from tobias@, but disabled them by placing them in
"#ifdef notyet" which was asked by djm@
ok djm@ tobias@
dtucker [Tue, 1 Jan 2008 09:36:56 +0000 (09:36 +0000)]
- dtucker@cvs.openbsd.org 2008/01/01 09:27:33
[sshd_config.5 servconf.c]
Allow PermitRootLogin in a Match block. Allows for, eg, permitting root
only from the local network. ok markus@, man page bit ok jmc@
dtucker [Tue, 1 Jan 2008 09:33:57 +0000 (09:33 +0000)]
- dtucker@cvs.openbsd.org 2008/01/01 09:06:39
[scp.c]
If scp -p encounters a pre-epoch timestamp, use the epoch which is
as close as we can get given that it's used unsigned. Add a little
debugging while there. bz #828, ok djm@
dtucker [Tue, 1 Jan 2008 09:33:09 +0000 (09:33 +0000)]
- dtucker@cvs.openbsd.org 2007/12/31 15:27:04
[sshd.c]
When in inetd mode, have sshd generate a Protocol 1 ephemeral server
key only for connections where the client chooses Protocol 1 as opposed
to when it's enabled in the server's config. Speeds up Protocol 2
connections to inetd-mode servers that also allow Protocol 1. bz #440,
based on a patch from bruno at wolff.to, ok markus@
dtucker [Mon, 31 Dec 2007 10:29:26 +0000 (10:29 +0000)]
- (dtucker) [configure.ac openbsd-compat/glob.{c,h}] Bug #1407: force use of
builtin glob implementation on Mac OS X. Based on a patch from
vgiffin at apple.
dtucker [Fri, 28 Dec 2007 22:37:10 +0000 (22:37 +0000)]
- dtucker@cvs.openbsd.org 2007/12/28 22:34:47
[clientloop.c]
Use the correct packet maximum sizes for remote port and agent forwarding.
Prevents the server from killing the connection if too much data is queued
and an excessively large packet gets sent. bz #1360, ok djm@.
dtucker [Fri, 28 Dec 2007 15:45:07 +0000 (15:45 +0000)]
- dtucker@cvs.openbsd.org 2007/12/28 15:32:24
[clientloop.c serverloop.c packet.c]
Make SSH2_MSG_UNIMPLEMENTED and SSH2_MSG_IGNORE messages reset the
ServerAlive and ClientAlive timers. Prevents dropping a connection
when these are enabled but the peer does not support our keepalives.
bz #1307, ok djm@.
dtucker [Fri, 28 Dec 2007 15:43:51 +0000 (15:43 +0000)]
- dtucker@cvs.openbsd.org 2007/12/27 14:22:08
[servconf.c canohost.c misc.c channels.c sshconnect.c misc.h ssh-keyscan.c
sshd.c]
Add a small helper function to consistently handle the EAI_SYSTEM error
code of getaddrinfo. Prompted by vgiffin at apple com via bz #1417.
ok markus@ stevesk@
dtucker [Sun, 2 Dec 2007 12:16:32 +0000 (12:16 +0000)]
- deraadt@cvs.openbsd.org 2007/11/03 01:24:06
[ssh.c]
bz #1377: getpwuid results were being clobbered by another getpw* call
inside tilde_expand_filename(); save the data we need carefully
ok djm
dtucker [Sun, 2 Dec 2007 12:02:15 +0000 (12:02 +0000)]
- dtucker@cvs.openbsd.org 2007/10/29 04:08:08
[monitor_wrap.c monitor.c]
Send config block back to slave for invalid users too so options
set by a Match block (eg Banner) behave the same for non-existent
users. Found by and ok djm@
djm [Mon, 29 Oct 2007 23:52:44 +0000 (23:52 +0000)]
- djm@cvs.openbsd.org 2007/10/29 23:49:41
[openbsd-compat/sys-tree.h]
remove extra backslash at the end of RB_PROTOTYPE, report from
Jan.Pechanec AT Sun.COM; ok deraadt@
djm [Fri, 26 Oct 2007 06:48:13 +0000 (06:48 +0000)]
- millert@cvs.openbsd.org 2004/10/07 16:56:11
GLOB_NOESCAPE is POSIX so move it out of the #ifndef _POSIX_SOURCE
block.
(NB. mostly an RCS ID sync, as portable strips out the conditionals)
djm [Fri, 26 Oct 2007 06:45:32 +0000 (06:45 +0000)]
- otto@cvs.openbsd.org 2005/11/25 08:06:25
[openbsd-compat/sys-queue.h]
Introduce debugging aid for queue macros. Disabled by default; but
developers are encouraged to run with this enabled.
ok krw@ fgsch@ deraadt@
djm [Fri, 26 Oct 2007 06:44:27 +0000 (06:44 +0000)]
- otto@cvs.openbsd.org 2005/10/25 06:37:47
[openbsd-compat/sys-queue.h]
Some uvm problem is being exposed with the more strict macros.
Revert until we've found out what's causing the panics.
djm [Fri, 26 Oct 2007 06:43:22 +0000 (06:43 +0000)]
- otto@cvs.openbsd.org 2005/10/24 20:25:14
[openbsd-compat/sys-queue.h]
Partly backout. NOLIST, used in LISTs is probably interfering.
requested by deraadt@
djm [Fri, 26 Oct 2007 06:42:18 +0000 (06:42 +0000)]
- otto@cvs.openbsd.org 2005/10/17 20:19:42
[openbsd-compat/sys-queue.h]
Performing certain operations on queue.h data structurs produced
funny results. An example is calling LIST_REMOVE on the same
element twice. This will not fail, but result in a data structure
referencing who knows what. Prevent these accidents by NULLing some
fields on remove and replace. This way, either a panic or segfault
will be produced on the faulty operation.
djm [Fri, 26 Oct 2007 06:40:20 +0000 (06:40 +0000)]
- grange@cvs.openbsd.org 2004/05/04 16:59:32
[openbsd-compat/sys-queue.h]
Remove useless ``elm'' argument from the SIMPLEQ_REMOVE_HEAD macro.
This matches our SLIST behaviour and NetBSD's SIMPLEQ as well.
ok millert krw deraadt
djm [Fri, 26 Oct 2007 06:26:46 +0000 (06:26 +0000)]
- jakob@cvs.openbsd.org 2007/10/11 18:36:41
[openbsd-compat/getrrsetbyname.c openbsd-compat/getrrsetbyname.h]
use RRSIG instead of SIG for DNSSEC. ok djm@
djm [Fri, 26 Oct 2007 06:17:24 +0000 (06:17 +0000)]
- otto@cvs.openbsd.org 2006/10/21 09:55:03
[openbsd-compat/base64.c]
remove calls to abort(3) that can't happen anyway; from
<bret dot lambert at gmail.com>; ok millert@ deraadt@
djm [Fri, 26 Oct 2007 05:39:15 +0000 (05:39 +0000)]
- djm@cvs.openbsd.org 2007/10/24 03:44:02
[scp.c]
factor out network read/write into an atomicio()-like function, and
use it to handle short reads, apply bandwidth limits and update
counters. make network IO non-blocking, so a small trickle of
reads/writes has a chance of updating the progress meter; bz #799
ok dtucker@
djm [Fri, 26 Oct 2007 05:37:50 +0000 (05:37 +0000)]
- (djm) [regress/sftp-cmds.sh]
Use more restrictive glob to pick up test files from /bin - some platforms
ship broken symlinks there which could spoil the test.
djm [Fri, 26 Oct 2007 05:35:54 +0000 (05:35 +0000)]
- djm@cvs.openbsd.org 2007/10/26 05:30:01
[regress/sftp-glob.sh regress/test-exec.sh]
remove "echo -E" crap that I added in last commit and use printf(1) for
cases where we strictly require echo not to reprocess escape characters.
djm [Fri, 26 Oct 2007 04:54:12 +0000 (04:54 +0000)]
- djm@cvs.openbsd.org 2007/10/24 03:32:35
[regress/sftp-cmds.sh regress/sftp-glob.sh regress/test-exec.sh]
comprehensive tests for sftp escaping its interaction with globbing;
ok dtucker@
djm [Fri, 26 Oct 2007 04:28:01 +0000 (04:28 +0000)]
- djm@cvs.openbsd.org 2007/10/24 03:44:02
[scp.c]
factor out network read/write into an atomicio()-like function, and
use it to handle short reads, apply bandwidth limits and update
counters. make network IO non-blocking, so a small trickle of
reads/writes has a chance of updating the progress meter; bz #799
ok dtucker@
djm [Fri, 26 Oct 2007 04:27:45 +0000 (04:27 +0000)]
- djm@cvs.openbsd.org 2007/10/24 03:30:02
[sftp.c]
rework argument splitting and parsing to cope correctly with common
shell escapes and make handling of escaped characters consistent
with sh(1) and between sftp commands (especially between ones that
glob their arguments and ones that don't).
parse command flags using getopt(3) rather than hand-rolled parsers.
ok dtucker@
djm [Fri, 26 Oct 2007 04:27:22 +0000 (04:27 +0000)]
- markus@cvs.openbsd.org 2007/10/22 19:10:24
[readconf.c]
make sure that both the local and remote port are correct when
parsing -L; Jan Pechanec (bz #1378)
djm [Fri, 26 Oct 2007 04:25:55 +0000 (04:25 +0000)]
- ray@cvs.openbsd.org 2007/09/27 00:15:57
[dh.c]
Don't return -1 on error in dh_pub_is_valid(), since it evaluates
to true.
Also fix a typo.
Initial diff from Matthew Dempsky, input from djm.
OK djm, markus.