summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2003-12-09 21:53:36 +0000
committermarkus <markus@openbsd.org>2003-12-09 21:53:36 +0000
commit3bdbdd8e5337fc585c7a34e4c6bc77f35db2493b (patch)
tree27034dbe7e10c971241d81c30fd061335cb49e62
parentbetter management of list of installed packages. Allow pkg_add/delete -n (diff)
downloadwireguard-openbsd-3bdbdd8e5337fc585c7a34e4c6bc77f35db2493b.tar.xz
wireguard-openbsd-3bdbdd8e5337fc585c7a34e4c6bc77f35db2493b.zip
rename keepalive to tcpkeepalive; the old name causes too much
confusion; ok djm, dtucker; with help from jmc@
-rw-r--r--usr.bin/ssh/readconf.c19
-rw-r--r--usr.bin/ssh/readconf.h4
-rw-r--r--usr.bin/ssh/scp.14
-rw-r--r--usr.bin/ssh/servconf.c17
-rw-r--r--usr.bin/ssh/servconf.h4
-rw-r--r--usr.bin/ssh/sftp.14
-rw-r--r--usr.bin/ssh/ssh.14
-rw-r--r--usr.bin/ssh/ssh_config.536
-rw-r--r--usr.bin/ssh/sshconnect.c6
-rw-r--r--usr.bin/ssh/sshd.c6
-rw-r--r--usr.bin/ssh/sshd_config.548
11 files changed, 77 insertions, 75 deletions
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c
index 51c1dd3a530..afa918ca350 100644
--- a/usr.bin/ssh/readconf.c
+++ b/usr.bin/ssh/readconf.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.125 2003/11/12 16:39:58 jakob Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.126 2003/12/09 21:53:36 markus Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -78,7 +78,7 @@ RCSID("$OpenBSD: readconf.c,v 1.125 2003/11/12 16:39:58 jakob Exp $");
RSAAuthentication yes
RhostsRSAAuthentication yes
StrictHostKeyChecking yes
- KeepAlives no
+ TcpKeepAlive no
IdentityFile ~/.ssh/identity
Port 22
EscapeChar ~
@@ -96,7 +96,7 @@ typedef enum {
oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
- oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts,
+ oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts,
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication,
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
@@ -169,7 +169,8 @@ static struct {
{ "stricthostkeychecking", oStrictHostKeyChecking },
{ "compression", oCompression },
{ "compressionlevel", oCompressionLevel },
- { "keepalive", oKeepAlives },
+ { "tcpkeepalive", oTCPKeepAlive },
+ { "keepalive", oTCPKeepAlive }, /* obsolete */
{ "numberofpasswordprompts", oNumberOfPasswordPrompts },
{ "loglevel", oLogLevel },
{ "dynamicforward", oDynamicForward },
@@ -425,8 +426,8 @@ parse_yesnoask:
intptr = &options->compression;
goto parse_flag;
- case oKeepAlives:
- intptr = &options->keepalives;
+ case oTCPKeepAlive:
+ intptr = &options->tcp_keep_alive;
goto parse_flag;
case oNoHostAuthenticationForLocalhost:
@@ -824,7 +825,7 @@ initialize_options(Options * options)
options->check_host_ip = -1;
options->strict_host_key_checking = -1;
options->compression = -1;
- options->keepalives = -1;
+ options->tcp_keep_alive = -1;
options->compression_level = -1;
options->port = -1;
options->address_family = -1;
@@ -907,8 +908,8 @@ fill_default_options(Options * options)
options->strict_host_key_checking = 2; /* 2 is default */
if (options->compression == -1)
options->compression = 0;
- if (options->keepalives == -1)
- options->keepalives = 1;
+ if (options->tcp_keep_alive == -1)
+ options->tcp_keep_alive = 1;
if (options->compression_level == -1)
options->compression_level = 6;
if (options->port == -1)
diff --git a/usr.bin/ssh/readconf.h b/usr.bin/ssh/readconf.h
index 6501323461b..f2a859fbe84 100644
--- a/usr.bin/ssh/readconf.h
+++ b/usr.bin/ssh/readconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.h,v 1.57 2003/11/21 11:57:03 djm Exp $ */
+/* $OpenBSD: readconf.h,v 1.58 2003/12/09 21:53:36 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -53,7 +53,7 @@ typedef struct {
int compression; /* Compress packets in both directions. */
int compression_level; /* Compression level 1 (fast) to 9
* (best). */
- int keepalives; /* Set SO_KEEPALIVE. */
+ int tcp_keep_alive; /* Set SO_KEEPALIVE. */
LogLevel log_level; /* Level for logging. */
int port; /* Port to connect. */
diff --git a/usr.bin/ssh/scp.1 b/usr.bin/ssh/scp.1
index 4dab2a1dbb9..cbebb949afa 100644
--- a/usr.bin/ssh/scp.1
+++ b/usr.bin/ssh/scp.1
@@ -9,7 +9,7 @@
.\"
.\" Created: Sun May 7 00:14:37 1995 ylo
.\"
-.\" $OpenBSD: scp.1,v 1.30 2003/10/13 08:22:25 markus Exp $
+.\" $OpenBSD: scp.1,v 1.31 2003/12/09 21:53:36 markus Exp $
.\"
.Dd September 25, 1999
.Dt SCP 1
@@ -137,7 +137,6 @@ For full details of the options listed below, and their possible values, see
.It HostKeyAlias
.It HostName
.It IdentityFile
-.It KeepAlive
.It LogLevel
.It MACs
.It NoHostAuthenticationForLocalhost
@@ -152,6 +151,7 @@ For full details of the options listed below, and their possible values, see
.It RSAAuthentication
.It SmartcardDevice
.It StrictHostKeyChecking
+.It TCPKeepAlive
.It UsePrivilegedPort
.It User
.It UserKnownHostsFile
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c
index f1e273177bf..1706691de7d 100644
--- a/usr.bin/ssh/servconf.c
+++ b/usr.bin/ssh/servconf.c
@@ -10,7 +10,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: servconf.c,v 1.128 2003/09/29 20:19:57 markus Exp $");
+RCSID("$OpenBSD: servconf.c,v 1.129 2003/12/09 21:53:36 markus Exp $");
#include "ssh.h"
#include "log.h"
@@ -56,7 +56,7 @@ initialize_server_options(ServerOptions *options)
options->x11_use_localhost = -1;
options->xauth_location = NULL;
options->strict_modes = -1;
- options->keepalives = -1;
+ options->tcp_keep_alive = -1;
options->log_facility = SYSLOG_FACILITY_NOT_SET;
options->log_level = SYSLOG_LEVEL_NOT_SET;
options->rhosts_rsa_authentication = -1;
@@ -149,8 +149,8 @@ fill_default_server_options(ServerOptions *options)
options->xauth_location = _PATH_XAUTH;
if (options->strict_modes == -1)
options->strict_modes = 1;
- if (options->keepalives == -1)
- options->keepalives = 1;
+ if (options->tcp_keep_alive == -1)
+ options->tcp_keep_alive = 1;
if (options->log_facility == SYSLOG_FACILITY_NOT_SET)
options->log_facility = SYSLOG_FACILITY_AUTH;
if (options->log_level == SYSLOG_LEVEL_NOT_SET)
@@ -231,7 +231,7 @@ typedef enum {
sPasswordAuthentication, sKbdInteractiveAuthentication, sListenAddress,
sPrintMotd, sPrintLastLog, sIgnoreRhosts,
sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
- sStrictModes, sEmptyPasswd, sKeepAlives,
+ sStrictModes, sEmptyPasswd, sTCPKeepAlive,
sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression,
sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
@@ -303,7 +303,8 @@ static struct {
{ "permituserenvironment", sPermitUserEnvironment },
{ "uselogin", sUseLogin },
{ "compression", sCompression },
- { "keepalive", sKeepAlives },
+ { "tcpkeepalive", sTCPKeepAlive },
+ { "keepalive", sTCPKeepAlive }, /* obsolete alias */
{ "allowtcpforwarding", sAllowTcpForwarding },
{ "allowusers", sAllowUsers },
{ "denyusers", sDenyUsers },
@@ -640,8 +641,8 @@ parse_flag:
intptr = &options->strict_modes;
goto parse_flag;
- case sKeepAlives:
- intptr = &options->keepalives;
+ case sTCPKeepAlive:
+ intptr = &options->tcp_keep_alive;
goto parse_flag;
case sEmptyPasswd:
diff --git a/usr.bin/ssh/servconf.h b/usr.bin/ssh/servconf.h
index 0f6f064e0f8..13f8345ec9d 100644
--- a/usr.bin/ssh/servconf.h
+++ b/usr.bin/ssh/servconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.h,v 1.65 2003/09/01 18:15:50 markus Exp $ */
+/* $OpenBSD: servconf.h,v 1.66 2003/12/09 21:53:37 markus Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -58,7 +58,7 @@ typedef struct {
int x11_use_localhost; /* If true, use localhost for fake X11 server. */
char *xauth_location; /* Location of xauth program */
int strict_modes; /* If true, require string home dir modes. */
- int keepalives; /* If true, set SO_KEEPALIVE. */
+ int tcp_keep_alive; /* If true, set SO_KEEPALIVE. */
char *ciphers; /* Supported SSH2 ciphers. */
char *macs; /* Supported SSH2 macs. */
int protocol; /* Supported protocol versions. */
diff --git a/usr.bin/ssh/sftp.1 b/usr.bin/ssh/sftp.1
index 00253037de6..91a288dfc67 100644
--- a/usr.bin/ssh/sftp.1
+++ b/usr.bin/ssh/sftp.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sftp.1,v 1.47 2003/10/13 08:22:25 markus Exp $
+.\" $OpenBSD: sftp.1,v 1.48 2003/12/09 21:53:37 markus Exp $
.\"
.\" Copyright (c) 2001 Damien Miller. All rights reserved.
.\"
@@ -158,7 +158,6 @@ For full details of the options listed below, and their possible values, see
.It HostKeyAlias
.It HostName
.It IdentityFile
-.It KeepAlive
.It LogLevel
.It MACs
.It NoHostAuthenticationForLocalhost
@@ -173,6 +172,7 @@ For full details of the options listed below, and their possible values, see
.It RSAAuthentication
.It SmartcardDevice
.It StrictHostKeyChecking
+.It TCPKeepAlive
.It UsePrivilegedPort
.It User
.It UserKnownHostsFile
diff --git a/usr.bin/ssh/ssh.1 b/usr.bin/ssh/ssh.1
index 25de869ad87..33521268bb7 100644
--- a/usr.bin/ssh/ssh.1
+++ b/usr.bin/ssh/ssh.1
@@ -34,7 +34,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: ssh.1,v 1.179 2003/11/24 00:16:35 dtucker Exp $
+.\" $OpenBSD: ssh.1,v 1.180 2003/12/09 21:53:37 markus Exp $
.Dd September 25, 1999
.Dt SSH 1
.Os
@@ -634,7 +634,6 @@ For full details of the options listed below, and their possible values, see
.It HostKeyAlias
.It HostName
.It IdentityFile
-.It KeepAlive
.It LocalForward
.It LogLevel
.It MACs
@@ -651,6 +650,7 @@ For full details of the options listed below, and their possible values, see
.It RSAAuthentication
.It SmartcardDevice
.It StrictHostKeyChecking
+.It TCPKeepAlive
.It UsePrivilegedPort
.It User
.It UserKnownHostsFile
diff --git a/usr.bin/ssh/ssh_config.5 b/usr.bin/ssh/ssh_config.5
index 8857073a5ae..3aafa4e7d25 100644
--- a/usr.bin/ssh/ssh_config.5
+++ b/usr.bin/ssh/ssh_config.5
@@ -34,7 +34,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: ssh_config.5,v 1.25 2003/11/12 20:14:51 jmc Exp $
+.\" $OpenBSD: ssh_config.5,v 1.26 2003/12/09 21:53:37 markus Exp $
.Dd September 25, 1999
.Dt SSH_CONFIG 5
.Os
@@ -408,23 +408,6 @@ syntax to refer to a user's home directory.
It is possible to have
multiple identity files specified in configuration files; all these
identities will be tried in sequence.
-.It Cm KeepAlive
-Specifies whether the system should send TCP keepalive messages to the
-other side.
-If they are sent, death of the connection or crash of one
-of the machines will be properly noticed.
-However, this means that
-connections will die if the route is down temporarily, and some people
-find it annoying.
-.Pp
-The default is
-.Dq yes
-(to send keepalives), and the client will notice
-if the network goes down or the remote host dies.
-This is important in scripts, and many users want it too.
-.Pp
-To disable keepalives, the value should be set to
-.Dq no .
.It Cm LocalForward
Specifies that a TCP/IP port on the local machine be forwarded over
the secure channel to the specified host and port from the remote machine.
@@ -613,6 +596,23 @@ or
.Dq ask .
The default is
.Dq ask .
+.It Cm TCPKeepAlive
+Specifies whether the system should send TCP keepalive messages to the
+other side.
+If they are sent, death of the connection or crash of one
+of the machines will be properly noticed.
+However, this means that
+connections will die if the route is down temporarily, and some people
+find it annoying.
+.Pp
+The default is
+.Dq yes
+(to send TCP keepalive messages), and the client will notice
+if the network goes down or the remote host dies.
+This is important in scripts, and many users want it too.
+.Pp
+To disable TCP keepalive messages, the value should be set to
+.Dq no .
.It Cm UsePrivilegedPort
Specifies whether to use a privileged port for outgoing connections.
The argument must be
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c
index 6d3ae7336f9..f08e9591140 100644
--- a/usr.bin/ssh/sshconnect.c
+++ b/usr.bin/ssh/sshconnect.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.154 2003/11/21 11:57:03 djm Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.155 2003/12/09 21:53:37 markus Exp $");
#include <openssl/bn.h>
@@ -411,8 +411,8 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
debug("Connection established.");
- /* Set keepalives if requested. */
- if (options.keepalives &&
+ /* Set SO_KEEPALIVE if requested. */
+ if (options.tcp_keep_alive &&
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&on,
sizeof(on)) < 0)
error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index 383d4b90cfa..1c3fc49f924 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -42,7 +42,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.283 2003/12/09 17:29:04 markus Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.284 2003/12/09 21:53:37 markus Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -1331,8 +1331,8 @@ main(int ac, char **av)
signal(SIGQUIT, SIG_DFL);
signal(SIGCHLD, SIG_DFL);
- /* Set keepalives if requested. */
- if (options.keepalives &&
+ /* Set SO_KEEPALIVE if requested. */
+ if (options.tcp_keep_alive &&
setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on,
sizeof(on)) < 0)
error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
diff --git a/usr.bin/ssh/sshd_config.5 b/usr.bin/ssh/sshd_config.5
index 2128c06d215..7f0b353bf16 100644
--- a/usr.bin/ssh/sshd_config.5
+++ b/usr.bin/ssh/sshd_config.5
@@ -34,7 +34,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $OpenBSD: sshd_config.5,v 1.26 2003/11/21 11:57:03 djm Exp $
+.\" $OpenBSD: sshd_config.5,v 1.27 2003/12/09 21:53:37 markus Exp $
.Dd September 25, 1999
.Dt SSHD_CONFIG 5
.Os
@@ -156,12 +156,12 @@ If this threshold is reached while client alive messages are being sent,
will disconnect the client, terminating the session.
It is important to note that the use of client alive messages is very
different from
-.Cm KeepAlive
+.Cm TCPKeepAlive
(below).
The client alive messages are sent through the encrypted channel
and therefore will not be spoofable.
The TCP keepalive option enabled by
-.Cm KeepAlive
+.Cm TCPKeepAlive
is spoofable.
The client alive mechanism is valuable when the client or
server depend on knowing when a connection has become inactive.
@@ -292,27 +292,6 @@ or
.Cm HostbasedAuthentication .
The default is
.Dq no .
-.It Cm KeepAlive
-Specifies whether the system should send TCP keepalive messages to the
-other side.
-If they are sent, death of the connection or crash of one
-of the machines will be properly noticed.
-However, this means that
-connections will die if the route is down temporarily, and some people
-find it annoying.
-On the other hand, if keepalives are not sent,
-sessions may hang indefinitely on the server, leaving
-.Dq ghost
-users and consuming server resources.
-.Pp
-The default is
-.Dq yes
-(to send keepalives), and the server will notice
-if the network goes down or the client host crashes.
-This avoids infinitely hanging sessions.
-.Pp
-To disable keepalives, the value should be set to
-.Dq no .
.It Cm KerberosAuthentication
Specifies whether the password provided by the user for
.Cm PasswordAuthentication
@@ -580,6 +559,27 @@ Gives the facility code that is used when logging messages from
The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
The default is AUTH.
+.It Cm TCPKeepAlive
+Specifies whether the system should send TCP keepalive messages to the
+other side.
+If they are sent, death of the connection or crash of one
+of the machines will be properly noticed.
+However, this means that
+connections will die if the route is down temporarily, and some people
+find it annoying.
+On the other hand, if TCP keepalives are not sent,
+sessions may hang indefinitely on the server, leaving
+.Dq ghost
+users and consuming server resources.
+.Pp
+The default is
+.Dq yes
+(to send TCP keepalive messages), and the server will notice
+if the network goes down or the client host crashes.
+This avoids infinitely hanging sessions.
+.Pp
+To disable TCP keepalive messages, the value should be set to
+.Dq no .
.It Cm UseDNS
Specifies whether
.Nm sshd