version 1.31.2.2, 2000/09/01 18:23:21 |
version 1.31.2.3, 2000/11/08 21:31:07 |
|
|
/* |
/* |
* |
|
* readconf.c |
|
* |
|
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* Author: Tatu Ylonen <ylo@cs.hut.fi> |
* |
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
* All rights reserved |
* All rights reserved |
* |
|
* Created: Sat Apr 22 00:03:10 1995 ylo |
|
* |
|
* Functions for reading the configuration files. |
* Functions for reading the configuration files. |
* |
* |
|
* As far as I am concerned, the code I have written for this software |
|
* can be used freely for any purpose. Any derived versions of this |
|
* software must be clearly marked as such, and if the derived work is |
|
* incompatible with the protocol description in the RFC file, it must be |
|
* called by a name other than "ssh" or "Secure Shell". |
*/ |
*/ |
|
|
#include "includes.h" |
#include "includes.h" |
RCSID("$OpenBSD$"); |
RCSID("$OpenBSD$"); |
|
|
#include "ssh.h" |
#include "ssh.h" |
#include "cipher.h" |
|
#include "readconf.h" |
#include "readconf.h" |
#include "match.h" |
#include "match.h" |
#include "xmalloc.h" |
#include "xmalloc.h" |
|
|
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, |
oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, oTISAuthentication, |
oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, oTISAuthentication, |
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oIdentityFile2, |
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oIdentityFile2, |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oDSAAuthentication |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oDSAAuthentication, |
|
oKbdInteractiveAuthentication, oKbdInteractiveDevices |
} OpCodes; |
} OpCodes; |
|
|
/* Textual representations of the tokens. */ |
/* Textual representations of the tokens. */ |
|
|
{ "useprivilegedport", oUsePrivilegedPort }, |
{ "useprivilegedport", oUsePrivilegedPort }, |
{ "rhostsauthentication", oRhostsAuthentication }, |
{ "rhostsauthentication", oRhostsAuthentication }, |
{ "passwordauthentication", oPasswordAuthentication }, |
{ "passwordauthentication", oPasswordAuthentication }, |
|
{ "kbdinteractiveauthentication", oKbdInteractiveAuthentication }, |
|
{ "kbdinteractivedevices", oKbdInteractiveDevices }, |
{ "rsaauthentication", oRSAAuthentication }, |
{ "rsaauthentication", oRSAAuthentication }, |
{ "dsaauthentication", oDSAAuthentication }, |
{ "dsaauthentication", oDSAAuthentication }, |
{ "skeyauthentication", oSkeyAuthentication }, |
{ "skeyauthentication", oSkeyAuthentication }, |
|
|
intptr = &options->password_authentication; |
intptr = &options->password_authentication; |
goto parse_flag; |
goto parse_flag; |
|
|
|
case oKbdInteractiveAuthentication: |
|
intptr = &options->kbd_interactive_authentication; |
|
goto parse_flag; |
|
|
|
case oKbdInteractiveDevices: |
|
charptr = &options->kbd_interactive_devices; |
|
goto parse_string; |
|
|
case oDSAAuthentication: |
case oDSAAuthentication: |
intptr = &options->dsa_authentication; |
intptr = &options->dsa_authentication; |
goto parse_flag; |
goto parse_flag; |
|
|
options->afs_token_passing = -1; |
options->afs_token_passing = -1; |
#endif |
#endif |
options->password_authentication = -1; |
options->password_authentication = -1; |
|
options->kbd_interactive_authentication = -1; |
|
options->kbd_interactive_devices = NULL; |
options->rhosts_rsa_authentication = -1; |
options->rhosts_rsa_authentication = -1; |
options->fallback_to_rsh = -1; |
options->fallback_to_rsh = -1; |
options->use_rsh = -1; |
options->use_rsh = -1; |
|
|
#endif /* AFS */ |
#endif /* AFS */ |
if (options->password_authentication == -1) |
if (options->password_authentication == -1) |
options->password_authentication = 1; |
options->password_authentication = 1; |
|
if (options->kbd_interactive_authentication == -1) |
|
options->kbd_interactive_authentication = 0; |
if (options->rhosts_rsa_authentication == -1) |
if (options->rhosts_rsa_authentication == -1) |
options->rhosts_rsa_authentication = 1; |
options->rhosts_rsa_authentication = 1; |
if (options->fallback_to_rsh == -1) |
if (options->fallback_to_rsh == -1) |