summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/readconf.c b/readconf.c
index 3f2ac4e3e..fee7a8993 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.109 2003/05/15 04:08:44 jakob Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.110 2003/05/15 14:02:47 jakob Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -107,7 +107,7 @@ typedef enum {
107 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, 107 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
108 oClearAllForwardings, oNoHostAuthenticationForLocalhost, 108 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
109 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, 109 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS,
110 oDeprecated 110 oDeprecated, oUnsupported
111} OpCodes; 111} OpCodes;
112 112
113/* Textual representations of the tokens. */ 113/* Textual representations of the tokens. */
@@ -133,9 +133,18 @@ static struct {
133 { "challengeresponseauthentication", oChallengeResponseAuthentication }, 133 { "challengeresponseauthentication", oChallengeResponseAuthentication },
134 { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */ 134 { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */
135 { "tisauthentication", oChallengeResponseAuthentication }, /* alias */ 135 { "tisauthentication", oChallengeResponseAuthentication }, /* alias */
136#if defined(KRB4) || defined(KRB5)
136 { "kerberosauthentication", oKerberosAuthentication }, 137 { "kerberosauthentication", oKerberosAuthentication },
137 { "kerberostgtpassing", oKerberosTgtPassing }, 138 { "kerberostgtpassing", oKerberosTgtPassing },
139#else
140 { "kerberosauthentication", oUnsupported },
141 { "kerberostgtpassing", oUnsupported },
142#endif
143#if defined(AFS)
138 { "afstokenpassing", oAFSTokenPassing }, 144 { "afstokenpassing", oAFSTokenPassing },
145#else
146 { "afstokenpassing", oUnsupported },
147#endif
139 { "fallbacktorsh", oDeprecated }, 148 { "fallbacktorsh", oDeprecated },
140 { "usersh", oDeprecated }, 149 { "usersh", oDeprecated },
141 { "identityfile", oIdentityFile }, 150 { "identityfile", oIdentityFile },
@@ -170,10 +179,18 @@ static struct {
170 { "preferredauthentications", oPreferredAuthentications }, 179 { "preferredauthentications", oPreferredAuthentications },
171 { "hostkeyalgorithms", oHostKeyAlgorithms }, 180 { "hostkeyalgorithms", oHostKeyAlgorithms },
172 { "bindaddress", oBindAddress }, 181 { "bindaddress", oBindAddress },
182#ifdef SMARTCARD
173 { "smartcarddevice", oSmartcardDevice }, 183 { "smartcarddevice", oSmartcardDevice },
184#else
185 { "smartcarddevice", oUnsupported },
186#endif
174 { "clearallforwardings", oClearAllForwardings }, 187 { "clearallforwardings", oClearAllForwardings },
175 { "enablesshkeysign", oEnableSSHKeysign }, 188 { "enablesshkeysign", oEnableSSHKeysign },
189#ifdef DNS
176 { "verifyhostkeydns", oVerifyHostKeyDNS }, 190 { "verifyhostkeydns", oVerifyHostKeyDNS },
191#else
192 { "verifyhostkeydns", oUnsupported },
193#endif
177 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, 194 { "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },
178 { "rekeylimit", oRekeyLimit }, 195 { "rekeylimit", oRekeyLimit },
179 { NULL, oBadOption } 196 { NULL, oBadOption }
@@ -697,6 +714,11 @@ parse_int:
697 filename, linenum, keyword); 714 filename, linenum, keyword);
698 return 0; 715 return 0;
699 716
717 case oUnsupported:
718 error("%s line %d: Unsupported option \"%s\"",
719 filename, linenum, keyword);
720 return 0;
721
700 default: 722 default:
701 fatal("process_config_line: Unimplemented opcode %d", opcode); 723 fatal("process_config_line: Unimplemented opcode %d", opcode);
702 } 724 }
@@ -844,23 +866,11 @@ fill_default_options(Options * options)
844 if (options->challenge_response_authentication == -1) 866 if (options->challenge_response_authentication == -1)
845 options->challenge_response_authentication = 1; 867 options->challenge_response_authentication = 1;
846 if (options->kerberos_authentication == -1) 868 if (options->kerberos_authentication == -1)
847#if defined(KRB4) || defined(KRB5)
848 options->kerberos_authentication = 1; 869 options->kerberos_authentication = 1;
849#else
850 options->kerberos_authentication = 0;
851#endif
852 if (options->kerberos_tgt_passing == -1) 870 if (options->kerberos_tgt_passing == -1)
853#if defined(KRB4) || defined(KRB5)
854 options->kerberos_tgt_passing = 1; 871 options->kerberos_tgt_passing = 1;
855#else
856 options->kerberos_tgt_passing = 0;
857#endif
858 if (options->afs_token_passing == -1) 872 if (options->afs_token_passing == -1)
859#if defined(AFS)
860 options->afs_token_passing = 1; 873 options->afs_token_passing = 1;
861#else
862 options->afs_token_passing = 0;
863#endif
864 if (options->password_authentication == -1) 874 if (options->password_authentication == -1)
865 options->password_authentication = 1; 875 options->password_authentication = 1;
866 if (options->kbd_interactive_authentication == -1) 876 if (options->kbd_interactive_authentication == -1)