diff options
author | Damien Miller <djm@mindrot.org> | 2003-05-18 20:50:30 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2003-05-18 20:50:30 +1000 |
commit | 20a8f97b034df418d0e5e04b11000b44ab07e628 (patch) | |
tree | f5bf1076934a1f5724d2f267a4b9921693746b81 | |
parent | 25d9342f04249e3af01058bb9ba2a539f928bab0 (diff) |
- djm@cvs.openbsd.org 2003/05/16 03:27:12
[readconf.c ssh_config ssh_config.5 ssh-keysign.c]
add AddressFamily option to ssh_config (like -4, -6 on commandline).
Portable bug #534; ok markus@
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | readconf.c | 17 | ||||
-rw-r--r-- | ssh-keysign.c | 6 | ||||
-rw-r--r-- | ssh_config | 3 | ||||
-rw-r--r-- | ssh_config.5 | 9 |
5 files changed, 36 insertions, 6 deletions
@@ -1,6 +1,11 @@ | |||
1 | 20030517 | 1 | 20030517 |
2 | - (djm) Return of the dreaded PAM_TTY_KLUDGE, which went missing in | 2 | - (djm) Return of the dreaded PAM_TTY_KLUDGE, which went missing in |
3 | recent merge | 3 | recent merge |
4 | - (djm) OpenBSD CVS Sync | ||
5 | - djm@cvs.openbsd.org 2003/05/16 03:27:12 | ||
6 | [readconf.c ssh_config ssh_config.5 ssh-keysign.c] | ||
7 | add AddressFamily option to ssh_config (like -4, -6 on commandline). | ||
8 | Portable bug #534; ok markus@ | ||
4 | 9 | ||
5 | 20030517 | 10 | 20030517 |
6 | - (bal) strcat -> strlcat on openbsd-compat/realpath.c (rev 1.8 OpenBSD) | 11 | - (bal) strcat -> strlcat on openbsd-compat/realpath.c (rev 1.8 OpenBSD) |
@@ -1556,4 +1561,4 @@ | |||
1556 | save auth method before monitor_reset_key_state(); bugzilla bug #284; | 1561 | save auth method before monitor_reset_key_state(); bugzilla bug #284; |
1557 | ok provos@ | 1562 | ok provos@ |
1558 | 1563 | ||
1559 | $Id: ChangeLog,v 1.2732 2003/05/18 10:45:47 djm Exp $ | 1564 | $Id: ChangeLog,v 1.2733 2003/05/18 10:50:30 djm Exp $ |
diff --git a/readconf.c b/readconf.c index a0cf3d687..2a77ea14f 100644 --- a/readconf.c +++ b/readconf.c | |||
@@ -12,7 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include "includes.h" | 14 | #include "includes.h" |
15 | RCSID("$OpenBSD: readconf.c,v 1.111 2003/05/15 14:55:25 djm Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.112 2003/05/16 03:27:12 djm Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -107,6 +107,7 @@ typedef enum { | |||
107 | oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, | 107 | oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, |
108 | oClearAllForwardings, oNoHostAuthenticationForLocalhost, | 108 | oClearAllForwardings, oNoHostAuthenticationForLocalhost, |
109 | oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, | 109 | oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, |
110 | oAddressFamily, | ||
110 | oDeprecated, oUnsupported | 111 | oDeprecated, oUnsupported |
111 | } OpCodes; | 112 | } OpCodes; |
112 | 113 | ||
@@ -194,6 +195,7 @@ static struct { | |||
194 | { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, | 195 | { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, |
195 | { "rekeylimit", oRekeyLimit }, | 196 | { "rekeylimit", oRekeyLimit }, |
196 | { "connecttimeout", oConnectTimeout }, | 197 | { "connecttimeout", oConnectTimeout }, |
198 | { "addressfamily", oAddressFamily }, | ||
197 | { NULL, oBadOption } | 199 | { NULL, oBadOption } |
198 | }; | 200 | }; |
199 | 201 | ||
@@ -286,6 +288,7 @@ process_config_line(Options *options, const char *host, | |||
286 | size_t len; | 288 | size_t len; |
287 | u_short fwd_port, fwd_host_port; | 289 | u_short fwd_port, fwd_host_port; |
288 | char sfwd_host_port[6]; | 290 | char sfwd_host_port[6]; |
291 | extern int IPv4or6; | ||
289 | 292 | ||
290 | /* Strip trailing whitespace */ | 293 | /* Strip trailing whitespace */ |
291 | for(len = strlen(line) - 1; len > 0; len--) { | 294 | for(len = strlen(line) - 1; len > 0; len--) { |
@@ -720,6 +723,18 @@ parse_int: | |||
720 | *intptr = value; | 723 | *intptr = value; |
721 | break; | 724 | break; |
722 | 725 | ||
726 | case oAddressFamily: | ||
727 | arg = strdelim(&s); | ||
728 | if (strcasecmp(arg, "inet") == 0) | ||
729 | IPv4or6 = AF_INET; | ||
730 | else if (strcasecmp(arg, "inet6") == 0) | ||
731 | IPv4or6 = AF_INET6; | ||
732 | else if (strcasecmp(arg, "any") == 0) | ||
733 | IPv4or6 = AF_UNSPEC; | ||
734 | else | ||
735 | fatal("Unsupported AddressFamily \"%s\"", arg); | ||
736 | break; | ||
737 | |||
723 | case oEnableSSHKeysign: | 738 | case oEnableSSHKeysign: |
724 | intptr = &options->enable_ssh_keysign; | 739 | intptr = &options->enable_ssh_keysign; |
725 | goto parse_flag; | 740 | goto parse_flag; |
diff --git a/ssh-keysign.c b/ssh-keysign.c index 97a76cd9f..063364ee7 100644 --- a/ssh-keysign.c +++ b/ssh-keysign.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
23 | */ | 23 | */ |
24 | #include "includes.h" | 24 | #include "includes.h" |
25 | RCSID("$OpenBSD: ssh-keysign.c,v 1.11 2003/04/02 14:36:26 markus Exp $"); | 25 | RCSID("$OpenBSD: ssh-keysign.c,v 1.12 2003/05/16 03:27:12 djm Exp $"); |
26 | 26 | ||
27 | #include <openssl/evp.h> | 27 | #include <openssl/evp.h> |
28 | #include <openssl/rand.h> | 28 | #include <openssl/rand.h> |
@@ -42,7 +42,9 @@ RCSID("$OpenBSD: ssh-keysign.c,v 1.11 2003/04/02 14:36:26 markus Exp $"); | |||
42 | #include "pathnames.h" | 42 | #include "pathnames.h" |
43 | #include "readconf.h" | 43 | #include "readconf.h" |
44 | 44 | ||
45 | uid_t original_real_uid; /* XXX readconf.c needs this */ | 45 | /* XXX readconf.c needs these */ |
46 | uid_t original_real_uid; | ||
47 | int IPv4or6; | ||
46 | 48 | ||
47 | #ifdef HAVE___PROGNAME | 49 | #ifdef HAVE___PROGNAME |
48 | extern char *__progname; | 50 | extern char *__progname; |
diff --git a/ssh_config b/ssh_config index 8a0acc17f..721e374e0 100644 --- a/ssh_config +++ b/ssh_config | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: ssh_config,v 1.17 2003/05/15 14:55:25 djm Exp $ | 1 | # $OpenBSD: ssh_config,v 1.18 2003/05/16 03:27:12 djm Exp $ |
2 | 2 | ||
3 | # This is the ssh client system-wide configuration file. See | 3 | # This is the ssh client system-wide configuration file. See |
4 | # ssh_config(5) for more information. This file provides defaults for | 4 | # ssh_config(5) for more information. This file provides defaults for |
@@ -25,6 +25,7 @@ | |||
25 | # HostbasedAuthentication no | 25 | # HostbasedAuthentication no |
26 | # BatchMode no | 26 | # BatchMode no |
27 | # CheckHostIP yes | 27 | # CheckHostIP yes |
28 | # AddressFamily any | ||
28 | # ConnectTimeout 0 | 29 | # ConnectTimeout 0 |
29 | # StrictHostKeyChecking ask | 30 | # StrictHostKeyChecking ask |
30 | # IdentityFile ~/.ssh/identity | 31 | # IdentityFile ~/.ssh/identity |
diff --git a/ssh_config.5 b/ssh_config.5 index c5de4a9de..67166b758 100644 --- a/ssh_config.5 +++ b/ssh_config.5 | |||
@@ -34,7 +34,7 @@ | |||
34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 34 | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 35 | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
36 | .\" | 36 | .\" |
37 | .\" $OpenBSD: ssh_config.5,v 1.9 2003/05/15 14:55:25 djm Exp $ | 37 | .\" $OpenBSD: ssh_config.5,v 1.10 2003/05/16 03:27:12 djm Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSH_CONFIG 5 | 39 | .Dt SSH_CONFIG 5 |
40 | .Os | 40 | .Os |
@@ -115,6 +115,13 @@ The host is the | |||
115 | .Ar hostname | 115 | .Ar hostname |
116 | argument given on the command line (i.e., the name is not converted to | 116 | argument given on the command line (i.e., the name is not converted to |
117 | a canonicalized host name before matching). | 117 | a canonicalized host name before matching). |
118 | .It Cm AddressFamily | ||
119 | Specifies which address family to use when connecting. Valid arguments are | ||
120 | .Dq any , | ||
121 | .Dq inet | ||
122 | (Use IPv4 only) or | ||
123 | .Dq inet6 | ||
124 | (Use IPv6 only.) | ||
118 | .It Cm AFSTokenPassing | 125 | .It Cm AFSTokenPassing |
119 | Specifies whether to pass AFS tokens to remote host. | 126 | Specifies whether to pass AFS tokens to remote host. |
120 | The argument to this keyword must be | 127 | The argument to this keyword must be |