diff options
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/readconf.c b/readconf.c index 3c4d12662..4a1094685 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.81 2001/06/23 02:34:30 markus Exp $"); | 15 | RCSID("$OpenBSD: readconf.c,v 1.82 2001/06/26 16:15:23 dugsong Exp $"); |
16 | 16 | ||
17 | #include "ssh.h" | 17 | #include "ssh.h" |
18 | #include "xmalloc.h" | 18 | #include "xmalloc.h" |
@@ -96,11 +96,14 @@ typedef enum { | |||
96 | oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication, | 96 | oForwardAgent, oForwardX11, oGatewayPorts, oRhostsAuthentication, |
97 | oPasswordAuthentication, oRSAAuthentication, oFallBackToRsh, oUseRsh, | 97 | oPasswordAuthentication, oRSAAuthentication, oFallBackToRsh, oUseRsh, |
98 | oChallengeResponseAuthentication, oXAuthLocation, | 98 | oChallengeResponseAuthentication, oXAuthLocation, |
99 | #ifdef KRB4 | 99 | #if defined(KRB4) || defined(KRB5) |
100 | oKerberosAuthentication, | 100 | oKerberosAuthentication, |
101 | #endif /* KRB4 */ | 101 | #endif |
102 | #if defined(AFS) || defined(KRB5) | ||
103 | oKerberosTgtPassing, | ||
104 | #endif | ||
102 | #ifdef AFS | 105 | #ifdef AFS |
103 | oKerberosTgtPassing, oAFSTokenPassing, | 106 | oAFSTokenPassing, |
104 | #endif | 107 | #endif |
105 | oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, | 108 | oIdentityFile, oHostName, oPort, oCipher, oRemoteForward, oLocalForward, |
106 | oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, | 109 | oUser, oHost, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, |
@@ -137,11 +140,13 @@ static struct { | |||
137 | { "challengeresponseauthentication", oChallengeResponseAuthentication }, | 140 | { "challengeresponseauthentication", oChallengeResponseAuthentication }, |
138 | { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */ | 141 | { "skeyauthentication", oChallengeResponseAuthentication }, /* alias */ |
139 | { "tisauthentication", oChallengeResponseAuthentication }, /* alias */ | 142 | { "tisauthentication", oChallengeResponseAuthentication }, /* alias */ |
140 | #ifdef KRB4 | 143 | #if defined(KRB4) || defined(KRB5) |
141 | { "kerberosauthentication", oKerberosAuthentication }, | 144 | { "kerberosauthentication", oKerberosAuthentication }, |
142 | #endif /* KRB4 */ | 145 | #endif |
143 | #ifdef AFS | 146 | #if defined(AFS) || defined(KRB5) |
144 | { "kerberostgtpassing", oKerberosTgtPassing }, | 147 | { "kerberostgtpassing", oKerberosTgtPassing }, |
148 | #endif | ||
149 | #ifdef AFS | ||
145 | { "afstokenpassing", oAFSTokenPassing }, | 150 | { "afstokenpassing", oAFSTokenPassing }, |
146 | #endif | 151 | #endif |
147 | { "fallbacktorsh", oFallBackToRsh }, | 152 | { "fallbacktorsh", oFallBackToRsh }, |
@@ -335,23 +340,21 @@ parse_flag: | |||
335 | case oChallengeResponseAuthentication: | 340 | case oChallengeResponseAuthentication: |
336 | intptr = &options->challenge_response_authentication; | 341 | intptr = &options->challenge_response_authentication; |
337 | goto parse_flag; | 342 | goto parse_flag; |
338 | 343 | #if defined(KRB4) || defined(KRB5) | |
339 | #ifdef KRB4 | ||
340 | case oKerberosAuthentication: | 344 | case oKerberosAuthentication: |
341 | intptr = &options->kerberos_authentication; | 345 | intptr = &options->kerberos_authentication; |
342 | goto parse_flag; | 346 | goto parse_flag; |
343 | #endif /* KRB4 */ | 347 | #endif |
344 | 348 | #if defined(AFS) || defined(KRB5) | |
345 | #ifdef AFS | ||
346 | case oKerberosTgtPassing: | 349 | case oKerberosTgtPassing: |
347 | intptr = &options->kerberos_tgt_passing; | 350 | intptr = &options->kerberos_tgt_passing; |
348 | goto parse_flag; | 351 | goto parse_flag; |
349 | 352 | #endif | |
353 | #ifdef AFS | ||
350 | case oAFSTokenPassing: | 354 | case oAFSTokenPassing: |
351 | intptr = &options->afs_token_passing; | 355 | intptr = &options->afs_token_passing; |
352 | goto parse_flag; | 356 | goto parse_flag; |
353 | #endif | 357 | #endif |
354 | |||
355 | case oFallBackToRsh: | 358 | case oFallBackToRsh: |
356 | intptr = &options->fallback_to_rsh; | 359 | intptr = &options->fallback_to_rsh; |
357 | goto parse_flag; | 360 | goto parse_flag; |
@@ -724,11 +727,13 @@ initialize_options(Options * options) | |||
724 | options->rsa_authentication = -1; | 727 | options->rsa_authentication = -1; |
725 | options->pubkey_authentication = -1; | 728 | options->pubkey_authentication = -1; |
726 | options->challenge_response_authentication = -1; | 729 | options->challenge_response_authentication = -1; |
727 | #ifdef KRB4 | 730 | #if defined(KRB4) || defined(KRB5) |
728 | options->kerberos_authentication = -1; | 731 | options->kerberos_authentication = -1; |
729 | #endif | 732 | #endif |
730 | #ifdef AFS | 733 | #if defined(AFS) || defined(KRB5) |
731 | options->kerberos_tgt_passing = -1; | 734 | options->kerberos_tgt_passing = -1; |
735 | #endif | ||
736 | #ifdef AFS | ||
732 | options->afs_token_passing = -1; | 737 | options->afs_token_passing = -1; |
733 | #endif | 738 | #endif |
734 | options->password_authentication = -1; | 739 | options->password_authentication = -1; |
@@ -799,16 +804,18 @@ fill_default_options(Options * options) | |||
799 | options->pubkey_authentication = 1; | 804 | options->pubkey_authentication = 1; |
800 | if (options->challenge_response_authentication == -1) | 805 | if (options->challenge_response_authentication == -1) |
801 | options->challenge_response_authentication = 0; | 806 | options->challenge_response_authentication = 0; |
802 | #ifdef KRB4 | 807 | #if defined(KRB4) || defined(KRB5) |
803 | if (options->kerberos_authentication == -1) | 808 | if (options->kerberos_authentication == -1) |
804 | options->kerberos_authentication = 1; | 809 | options->kerberos_authentication = 1; |
805 | #endif /* KRB4 */ | 810 | #endif |
806 | #ifdef AFS | 811 | #if defined(AFS) || defined(KRB5) |
807 | if (options->kerberos_tgt_passing == -1) | 812 | if (options->kerberos_tgt_passing == -1) |
808 | options->kerberos_tgt_passing = 1; | 813 | options->kerberos_tgt_passing = 1; |
814 | #endif | ||
815 | #ifdef AFS | ||
809 | if (options->afs_token_passing == -1) | 816 | if (options->afs_token_passing == -1) |
810 | options->afs_token_passing = 1; | 817 | options->afs_token_passing = 1; |
811 | #endif /* AFS */ | 818 | #endif |
812 | if (options->password_authentication == -1) | 819 | if (options->password_authentication == -1) |
813 | options->password_authentication = 1; | 820 | options->password_authentication = 1; |
814 | if (options->kbd_interactive_authentication == -1) | 821 | if (options->kbd_interactive_authentication == -1) |