summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-11-09 15:52:31 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-11-09 15:52:31 +0000
commitb6df73b06abb12772d816e64f210ad30ebaf54cb (patch)
treeb3a9026cac5d7f9213ef0685c70ef02b584d4971
parentc2faa4a504188d8fdf27467fca136f69e451fc27 (diff)
- markus@cvs.openbsd.org 2002/11/07 22:08:07
[readconf.c readconf.h ssh-keysign.8 ssh-keysign.c] we cannot use HostbasedAuthentication for enabling ssh-keysign(8), because HostbasedAuthentication might be enabled based on the target host and ssh-keysign(8) does not know the remote hostname and not trust ssh(1) about the hostname, so we add a new option EnableSSHKeysign; ok djm@, report from zierke@informatik.uni-hamburg.de
-rw-r--r--ChangeLog9
-rw-r--r--readconf.c11
-rw-r--r--readconf.h4
-rw-r--r--ssh-keysign.84
-rw-r--r--ssh-keysign.c6
5 files changed, 26 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index f3ca4cfcb..5ca11a877 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,13 @@
25 - markus@cvs.openbsd.org 2002/11/07 16:28:47 25 - markus@cvs.openbsd.org 2002/11/07 16:28:47
26 [sshd.c] 26 [sshd.c]
27 log to stderr if -ie is given, bug #414, prj@po.cwru.edu 27 log to stderr if -ie is given, bug #414, prj@po.cwru.edu
28 - markus@cvs.openbsd.org 2002/11/07 22:08:07
29 [readconf.c readconf.h ssh-keysign.8 ssh-keysign.c]
30 we cannot use HostbasedAuthentication for enabling ssh-keysign(8),
31 because HostbasedAuthentication might be enabled based on the
32 target host and ssh-keysign(8) does not know the remote hostname
33 and not trust ssh(1) about the hostname, so we add a new option
34 EnableSSHKeysign; ok djm@, report from zierke@informatik.uni-hamburg.de
28 35
2920021021 3620021021
30 - (djm) Bug #400: Kill ssh-rand-helper children on timeout, patch from 37 - (djm) Bug #400: Kill ssh-rand-helper children on timeout, patch from
@@ -802,4 +809,4 @@
802 save auth method before monitor_reset_key_state(); bugzilla bug #284; 809 save auth method before monitor_reset_key_state(); bugzilla bug #284;
803 ok provos@ 810 ok provos@
804 811
805$Id: ChangeLog,v 1.2507 2002/11/09 15:50:03 mouring Exp $ 812$Id: ChangeLog,v 1.2508 2002/11/09 15:52:31 mouring Exp $
diff --git a/readconf.c b/readconf.c
index bae06be12..b9f1b7ddc 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.100 2002/06/19 00:27:55 deraadt Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.101 2002/11/07 22:08:07 markus Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -114,6 +114,7 @@ typedef enum {
114 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, 114 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
115 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, 115 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
116 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 116 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
117 oEnableSSHKeysign,
117 oDeprecated 118 oDeprecated
118} OpCodes; 119} OpCodes;
119 120
@@ -185,6 +186,7 @@ static struct {
185 { "bindaddress", oBindAddress }, 186 { "bindaddress", oBindAddress },
186 { "smartcarddevice", oSmartcardDevice }, 187 { "smartcarddevice", oSmartcardDevice },
187 { "clearallforwardings", oClearAllForwardings }, 188 { "clearallforwardings", oClearAllForwardings },
189 { "enablesshkeysign", oEnableSSHKeysign },
188 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, 190 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },
189 { NULL, oBadOption } 191 { NULL, oBadOption }
190}; 192};
@@ -669,6 +671,10 @@ parse_int:
669 *intptr = value; 671 *intptr = value;
670 break; 672 break;
671 673
674 case oEnableSSHKeysign:
675 intptr = &options->enable_ssh_keysign;
676 goto parse_flag;
677
672 case oDeprecated: 678 case oDeprecated:
673 debug("%s line %d: Deprecated option \"%s\"", 679 debug("%s line %d: Deprecated option \"%s\"",
674 filename, linenum, keyword); 680 filename, linenum, keyword);
@@ -792,6 +798,7 @@ initialize_options(Options * options)
792 options->preferred_authentications = NULL; 798 options->preferred_authentications = NULL;
793 options->bind_address = NULL; 799 options->bind_address = NULL;
794 options->smartcard_device = NULL; 800 options->smartcard_device = NULL;
801 options->enable_ssh_keysign = - 1;
795 options->no_host_authentication_for_localhost = - 1; 802 options->no_host_authentication_for_localhost = - 1;
796} 803}
797 804
@@ -907,6 +914,8 @@ fill_default_options(Options * options)
907 clear_forwardings(options); 914 clear_forwardings(options);
908 if (options->no_host_authentication_for_localhost == - 1) 915 if (options->no_host_authentication_for_localhost == - 1)
909 options->no_host_authentication_for_localhost = 0; 916 options->no_host_authentication_for_localhost = 0;
917 if (options->enable_ssh_keysign == -1)
918 options->enable_ssh_keysign = 0;
910 /* options->proxy_command should not be set by default */ 919 /* options->proxy_command should not be set by default */
911 /* options->user will be set in the main program if appropriate */ 920 /* options->user will be set in the main program if appropriate */
912 /* options->hostname will be set in the main program if appropriate */ 921 /* options->hostname will be set in the main program if appropriate */
diff --git a/readconf.h b/readconf.h
index 92af535d0..bc5968843 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.43 2002/06/08 05:17:01 markus Exp $ */ 1/* $OpenBSD: readconf.h,v 1.44 2002/11/07 22:08:07 markus Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -99,6 +99,8 @@ typedef struct {
99 int num_remote_forwards; 99 int num_remote_forwards;
100 Forward remote_forwards[SSH_MAX_FORWARDS_PER_DIRECTION]; 100 Forward remote_forwards[SSH_MAX_FORWARDS_PER_DIRECTION];
101 int clear_forwardings; 101 int clear_forwardings;
102
103 int enable_ssh_keysign;
102 int no_host_authentication_for_localhost; 104 int no_host_authentication_for_localhost;
103} Options; 105} Options;
104 106
diff --git a/ssh-keysign.8 b/ssh-keysign.8
index cea4a8244..9a87731f9 100644
--- a/ssh-keysign.8
+++ b/ssh-keysign.8
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keysign.8,v 1.3 2002/07/03 14:21:05 markus Exp $ 1.\" $OpenBSD: ssh-keysign.8,v 1.4 2002/11/07 22:08:07 markus Exp $
2.\" 2.\"
3.\" Copyright (c) 2002 Markus Friedl. All rights reserved. 3.\" Copyright (c) 2002 Markus Friedl. All rights reserved.
4.\" 4.\"
@@ -42,7 +42,7 @@ is disabled by default and can only be enabled in the
42the global client configuration file 42the global client configuration file
43.Pa /etc/ssh/ssh_config 43.Pa /etc/ssh/ssh_config
44by setting 44by setting
45.Cm HostbasedAuthentication 45.Cm EnableSSHKeysign
46to 46to
47.Dq yes . 47.Dq yes .
48.Pp 48.Pp
diff --git a/ssh-keysign.c b/ssh-keysign.c
index 79aee17c0..3288eb182 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"
25RCSID("$OpenBSD: ssh-keysign.c,v 1.7 2002/07/03 14:21:05 markus Exp $"); 25RCSID("$OpenBSD: ssh-keysign.c,v 1.8 2002/11/07 22:08:07 markus Exp $");
26 26
27#include <openssl/evp.h> 27#include <openssl/evp.h>
28#include <openssl/rand.h> 28#include <openssl/rand.h>
@@ -168,8 +168,8 @@ main(int argc, char **argv)
168 initialize_options(&options); 168 initialize_options(&options);
169 (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", &options); 169 (void)read_config_file(_PATH_HOST_CONFIG_FILE, "", &options);
170 fill_default_options(&options); 170 fill_default_options(&options);
171 if (options.hostbased_authentication != 1) 171 if (options.enable_ssh_keysign != 1)
172 fatal("Hostbased authentication not enabled in %s", 172 fatal("ssh-keysign not enabled in %s",
173 _PATH_HOST_CONFIG_FILE); 173 _PATH_HOST_CONFIG_FILE);
174 174
175 if (key_fd[0] == -1 && key_fd[1] == -1) 175 if (key_fd[0] == -1 && key_fd[1] == -1)