diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | readconf.c | 12 | ||||
-rw-r--r-- | readconf.h | 3 | ||||
-rw-r--r-- | ssh.1 | 12 | ||||
-rw-r--r-- | sshconnect.c | 5 |
5 files changed, 31 insertions, 7 deletions
@@ -27,6 +27,10 @@ | |||
27 | - markus@cvs.openbsd.org 2001/10/01 21:38:53 | 27 | - markus@cvs.openbsd.org 2001/10/01 21:38:53 |
28 | [channels.c channels.h ssh.c sshd.c] | 28 | [channels.c channels.h ssh.c sshd.c] |
29 | remove ugliness; vp@drexel.edu via angelos | 29 | remove ugliness; vp@drexel.edu via angelos |
30 | - markus@cvs.openbsd.org 2001/10/01 21:51:16 | ||
31 | [readconf.c readconf.h ssh.1 sshconnect.c] | ||
32 | add NoHostAuthenticationForLocalhost; note that the hostkey is | ||
33 | now check for localhost, too. | ||
30 | 34 | ||
31 | 20011001 | 35 | 20011001 |
32 | - (stevesk) loginrec.c: fix type conversion problems exposed when using | 36 | - (stevesk) loginrec.c: fix type conversion problems exposed when using |
@@ -6619,4 +6623,4 @@ | |||
6619 | - Wrote replacements for strlcpy and mkdtemp | 6623 | - Wrote replacements for strlcpy and mkdtemp |
6620 | - Released 1.0pre1 | 6624 | - Released 1.0pre1 |
6621 | 6625 | ||
6622 | $Id: ChangeLog,v 1.1577 2001/10/03 17:34:59 mouring Exp $ | 6626 | $Id: ChangeLog,v 1.1578 2001/10/03 17:39:38 mouring Exp $ |
diff --git a/readconf.c b/readconf.c index 83069d3ad..63035b37f 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.90 2001/09/19 19:24:18 stevesk Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.91 2001/10/01 21:51:16 markus Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -115,7 +115,7 @@ typedef enum { | |||
115 | oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, | 115 | oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
116 | oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, | 116 | oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, |
117 | oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, | 117 | oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, |
118 | oClearAllForwardings | 118 | oClearAllForwardings, oNoHostAuthenticationForLocalhost |
119 | } OpCodes; | 119 | } OpCodes; |
120 | 120 | ||
121 | /* Textual representations of the tokens. */ | 121 | /* Textual representations of the tokens. */ |
@@ -186,6 +186,7 @@ static struct { | |||
186 | { "bindaddress", oBindAddress }, | 186 | { "bindaddress", oBindAddress }, |
187 | { "smartcarddevice", oSmartcardDevice }, | 187 | { "smartcarddevice", oSmartcardDevice }, |
188 | { "clearallforwardings", oClearAllForwardings }, | 188 | { "clearallforwardings", oClearAllForwardings }, |
189 | { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, | ||
189 | { NULL, 0 } | 190 | { NULL, 0 } |
190 | }; | 191 | }; |
191 | 192 | ||
@@ -415,6 +416,10 @@ parse_flag: | |||
415 | intptr = &options->keepalives; | 416 | intptr = &options->keepalives; |
416 | goto parse_flag; | 417 | goto parse_flag; |
417 | 418 | ||
419 | case oNoHostAuthenticationForLocalhost: | ||
420 | intptr = &options->no_host_authentication_for_localhost; | ||
421 | goto parse_flag; | ||
422 | |||
418 | case oNumberOfPasswordPrompts: | 423 | case oNumberOfPasswordPrompts: |
419 | intptr = &options->number_of_password_prompts; | 424 | intptr = &options->number_of_password_prompts; |
420 | goto parse_int; | 425 | goto parse_int; |
@@ -793,6 +798,7 @@ initialize_options(Options * options) | |||
793 | options->preferred_authentications = NULL; | 798 | options->preferred_authentications = NULL; |
794 | options->bind_address = NULL; | 799 | options->bind_address = NULL; |
795 | options->smartcard_device = NULL; | 800 | options->smartcard_device = NULL; |
801 | options->no_host_authentication_for_localhost = - 1; | ||
796 | } | 802 | } |
797 | 803 | ||
798 | /* | 804 | /* |
@@ -911,6 +917,8 @@ fill_default_options(Options * options) | |||
911 | options->log_level = SYSLOG_LEVEL_INFO; | 917 | options->log_level = SYSLOG_LEVEL_INFO; |
912 | if (options->clear_forwardings == 1) | 918 | if (options->clear_forwardings == 1) |
913 | clear_forwardings(options); | 919 | clear_forwardings(options); |
920 | if (options->no_host_authentication_for_localhost == - 1) | ||
921 | options->no_host_authentication_for_localhost = 0; | ||
914 | /* options->proxy_command should not be set by default */ | 922 | /* options->proxy_command should not be set by default */ |
915 | /* options->user will be set in the main program if appropriate */ | 923 | /* options->user will be set in the main program if appropriate */ |
916 | /* options->hostname will be set in the main program if appropriate */ | 924 | /* options->hostname will be set in the main program if appropriate */ |
diff --git a/readconf.h b/readconf.h index bde9eaa1c..25ffa4668 100644 --- a/readconf.h +++ b/readconf.h | |||
@@ -11,7 +11,7 @@ | |||
11 | * called by a name other than "ssh" or "Secure Shell". | 11 | * called by a name other than "ssh" or "Secure Shell". |
12 | */ | 12 | */ |
13 | 13 | ||
14 | /* RCSID("$OpenBSD: readconf.h,v 1.39 2001/09/19 19:24:18 stevesk Exp $"); */ | 14 | /* RCSID("$OpenBSD: readconf.h,v 1.40 2001/10/01 21:51:16 markus Exp $"); */ |
15 | 15 | ||
16 | #ifndef READCONF_H | 16 | #ifndef READCONF_H |
17 | #define READCONF_H | 17 | #define READCONF_H |
@@ -101,6 +101,7 @@ typedef struct { | |||
101 | int num_remote_forwards; | 101 | int num_remote_forwards; |
102 | Forward remote_forwards[SSH_MAX_FORWARDS_PER_DIRECTION]; | 102 | Forward remote_forwards[SSH_MAX_FORWARDS_PER_DIRECTION]; |
103 | int clear_forwardings; | 103 | int clear_forwardings; |
104 | int no_host_authentication_for_localhost; | ||
104 | } Options; | 105 | } Options; |
105 | 106 | ||
106 | 107 | ||
@@ -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.1,v 1.138 2001/09/19 19:24:19 stevesk Exp $ | 37 | .\" $OpenBSD: ssh.1,v 1.139 2001/10/01 21:51:16 markus Exp $ |
38 | .Dd September 25, 1999 | 38 | .Dd September 25, 1999 |
39 | .Dt SSH 1 | 39 | .Dt SSH 1 |
40 | .Os | 40 | .Os |
@@ -981,6 +981,16 @@ for data integrity protection. | |||
981 | Multiple algorithms must be comma-separated. | 981 | Multiple algorithms must be comma-separated. |
982 | The default is | 982 | The default is |
983 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . | 983 | .Dq hmac-md5,hmac-sha1,hmac-ripemd160,hmac-sha1-96,hmac-md5-96 . |
984 | .It Cm NoHostAuthenticationForLocalhost | ||
985 | This option can be used if the home directory is shared across machines. | ||
986 | In this case localhost will refer to a different machine on each of | ||
987 | the machines and the user will get many warnings about changed host keys. | ||
988 | However, this option disables host authentication for localhost. | ||
989 | The argument to this keyword must be | ||
990 | .Dq yes | ||
991 | or | ||
992 | .Dq no . | ||
993 | The default is to check the host key for localhost. | ||
984 | .It Cm NumberOfPasswordPrompts | 994 | .It Cm NumberOfPasswordPrompts |
985 | Specifies the number of password prompts before giving up. | 995 | Specifies the number of password prompts before giving up. |
986 | The argument to this keyword must be an integer. | 996 | The argument to this keyword must be an integer. |
diff --git a/sshconnect.c b/sshconnect.c index 0ae100fed..6a9b5489e 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: sshconnect.c,v 1.110 2001/07/25 14:35:18 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect.c,v 1.111 2001/10/01 21:51:16 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | 19 | ||
@@ -587,7 +587,8 @@ check_host_key(char *host, struct sockaddr *hostaddr, Key *host_key, | |||
587 | salen = sizeof(struct sockaddr_storage); | 587 | salen = sizeof(struct sockaddr_storage); |
588 | break; | 588 | break; |
589 | } | 589 | } |
590 | if (local && options.host_key_alias == NULL) { | 590 | if (options.no_host_authentication_for_localhost == 1 && local && |
591 | options.host_key_alias == NULL) { | ||
591 | debug("Forcing accepting of host key for " | 592 | debug("Forcing accepting of host key for " |
592 | "loopback/localhost."); | 593 | "loopback/localhost."); |
593 | return 0; | 594 | return 0; |