summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-10-03 17:39:38 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-10-03 17:39:38 +0000
commit3cecc9a41f32681b8729a7e4b32dbe8fe80a3f8a (patch)
tree2738b5bdd1b2cae3fc86685b3ce5075f583153ad
parent908afed17f97a3f5814f8d0d16be27b9f487f93d (diff)
- markus@cvs.openbsd.org 2001/10/01 21:51:16
[readconf.c readconf.h ssh.1 sshconnect.c] add NoHostAuthenticationForLocalhost; note that the hostkey is now check for localhost, too.
-rw-r--r--ChangeLog6
-rw-r--r--readconf.c12
-rw-r--r--readconf.h3
-rw-r--r--ssh.112
-rw-r--r--sshconnect.c5
5 files changed, 31 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d6a3ca25a..65655e587 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
3120011001 3520011001
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"
15RCSID("$OpenBSD: readconf.c,v 1.90 2001/09/19 19:24:18 stevesk Exp $"); 15RCSID("$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
diff --git a/ssh.1 b/ssh.1
index e3dc75069..9b924bd5c 100644
--- a/ssh.1
+++ b/ssh.1
@@ -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.
981Multiple algorithms must be comma-separated. 981Multiple algorithms must be comma-separated.
982The default is 982The 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
985This option can be used if the home directory is shared across machines.
986In this case localhost will refer to a different machine on each of
987the machines and the user will get many warnings about changed host keys.
988However, this option disables host authentication for localhost.
989The argument to this keyword must be
990.Dq yes
991or
992.Dq no .
993The default is to check the host key for localhost.
984.It Cm NumberOfPasswordPrompts 994.It Cm NumberOfPasswordPrompts
985Specifies the number of password prompts before giving up. 995Specifies the number of password prompts before giving up.
986The argument to this keyword must be an integer. 996The 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"
16RCSID("$OpenBSD: sshconnect.c,v 1.110 2001/07/25 14:35:18 markus Exp $"); 16RCSID("$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;