Deleted Added
full compact
readconf.c (126277) readconf.c (128460)
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Functions for reading the configuration files.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 */
13
14#include "includes.h"
1/*
2 * Author: Tatu Ylonen <ylo@cs.hut.fi>
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved
5 * Functions for reading the configuration files.
6 *
7 * As far as I am concerned, the code I have written for this software
8 * can be used freely for any purpose. Any derived versions of this
9 * software must be clearly marked as such, and if the derived work is
10 * incompatible with the protocol description in the RFC file, it must be
11 * called by a name other than "ssh" or "Secure Shell".
12 */
13
14#include "includes.h"
15RCSID("$FreeBSD: head/crypto/openssh/readconf.c 128460 2004-04-20 09:46:41Z des $");
15RCSID("$OpenBSD: readconf.c,v 1.127 2003/12/16 15:49:51 markus Exp $");
16RCSID("$OpenBSD: readconf.c,v 1.127 2003/12/16 15:49:51 markus Exp $");
16RCSID("$FreeBSD: head/crypto/openssh/readconf.c 126277 2004-02-26 10:52:33Z des $");
17
18#include "ssh.h"
19#include "xmalloc.h"
20#include "compat.h"
21#include "cipher.h"
22#include "pathnames.h"
23#include "log.h"
24#include "readconf.h"

--- 76 unchanged lines hidden (view full) ---

101 oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,
102 oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication,
103 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
104 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
105 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
106 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
107 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
108 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
17
18#include "ssh.h"
19#include "xmalloc.h"
20#include "compat.h"
21#include "cipher.h"
22#include "pathnames.h"
23#include "log.h"
24#include "readconf.h"

--- 76 unchanged lines hidden (view full) ---

101 oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,
102 oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication,
103 oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
104 oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
105 oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
106 oClearAllForwardings, oNoHostAuthenticationForLocalhost,
107 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
108 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
109<<<<<<< readconf.c
109 oServerAliveInterval, oServerAliveCountMax,
110 oVersionAddendum,
110 oServerAliveInterval, oServerAliveCountMax,
111 oVersionAddendum,
112=======
113 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
114>>>>>>> 1.1.1.15
111 oDeprecated, oUnsupported
112} OpCodes;
113
114/* Textual representations of the tokens. */
115
116static struct {
117 const char *name;
118 OpCodes opcode;

--- 25 unchanged lines hidden (view full) ---

144#else
145 { "gssapiauthentication", oUnsupported },
146 { "gssapidelegatecredentials", oUnsupported },
147#endif
148 { "fallbacktorsh", oDeprecated },
149 { "usersh", oDeprecated },
150 { "identityfile", oIdentityFile },
151 { "identityfile2", oIdentityFile }, /* alias */
115 oDeprecated, oUnsupported
116} OpCodes;
117
118/* Textual representations of the tokens. */
119
120static struct {
121 const char *name;
122 OpCodes opcode;

--- 25 unchanged lines hidden (view full) ---

148#else
149 { "gssapiauthentication", oUnsupported },
150 { "gssapidelegatecredentials", oUnsupported },
151#endif
152 { "fallbacktorsh", oDeprecated },
153 { "usersh", oDeprecated },
154 { "identityfile", oIdentityFile },
155 { "identityfile2", oIdentityFile }, /* alias */
156 { "identitiesonly", oIdentitiesOnly },
152 { "hostname", oHostName },
153 { "hostkeyalias", oHostKeyAlias },
154 { "proxycommand", oProxyCommand },
155 { "port", oPort },
156 { "cipher", oCipher },
157 { "ciphers", oCiphers },
158 { "macs", oMacs },
159 { "protocol", oProtocol },

--- 574 unchanged lines hidden (view full) ---

734 if (*activep && *intptr == -1)
735 *intptr = value;
736 break;
737
738 case oEnableSSHKeysign:
739 intptr = &options->enable_ssh_keysign;
740 goto parse_flag;
741
157 { "hostname", oHostName },
158 { "hostkeyalias", oHostKeyAlias },
159 { "proxycommand", oProxyCommand },
160 { "port", oPort },
161 { "cipher", oCipher },
162 { "ciphers", oCiphers },
163 { "macs", oMacs },
164 { "protocol", oProtocol },

--- 574 unchanged lines hidden (view full) ---

739 if (*activep && *intptr == -1)
740 *intptr = value;
741 break;
742
743 case oEnableSSHKeysign:
744 intptr = &options->enable_ssh_keysign;
745 goto parse_flag;
746
747 case oIdentitiesOnly:
748 intptr = &options->identities_only;
749 goto parse_flag;
750
742 case oServerAliveInterval:
743 intptr = &options->server_alive_interval;
744 goto parse_time;
745
746 case oServerAliveCountMax:
747 intptr = &options->server_alive_count_max;
748 goto parse_int;
749

--- 124 unchanged lines hidden (view full) ---

874 options->num_remote_forwards = 0;
875 options->clear_forwardings = -1;
876 options->log_level = SYSLOG_LEVEL_NOT_SET;
877 options->preferred_authentications = NULL;
878 options->bind_address = NULL;
879 options->smartcard_device = NULL;
880 options->enable_ssh_keysign = - 1;
881 options->no_host_authentication_for_localhost = - 1;
751 case oServerAliveInterval:
752 intptr = &options->server_alive_interval;
753 goto parse_time;
754
755 case oServerAliveCountMax:
756 intptr = &options->server_alive_count_max;
757 goto parse_int;
758

--- 124 unchanged lines hidden (view full) ---

883 options->num_remote_forwards = 0;
884 options->clear_forwardings = -1;
885 options->log_level = SYSLOG_LEVEL_NOT_SET;
886 options->preferred_authentications = NULL;
887 options->bind_address = NULL;
888 options->smartcard_device = NULL;
889 options->enable_ssh_keysign = - 1;
890 options->no_host_authentication_for_localhost = - 1;
891 options->identities_only = - 1;
882 options->rekey_limit = - 1;
883 options->verify_host_key_dns = -1;
884 options->server_alive_interval = -1;
885 options->server_alive_count_max = -1;
886}
887
888/*
889 * Called after processing other sources of option data, this fills those

--- 96 unchanged lines hidden (view full) ---

986 if (options->user_hostfile2 == NULL)
987 options->user_hostfile2 = _PATH_SSH_USER_HOSTFILE2;
988 if (options->log_level == SYSLOG_LEVEL_NOT_SET)
989 options->log_level = SYSLOG_LEVEL_INFO;
990 if (options->clear_forwardings == 1)
991 clear_forwardings(options);
992 if (options->no_host_authentication_for_localhost == - 1)
993 options->no_host_authentication_for_localhost = 0;
892 options->rekey_limit = - 1;
893 options->verify_host_key_dns = -1;
894 options->server_alive_interval = -1;
895 options->server_alive_count_max = -1;
896}
897
898/*
899 * Called after processing other sources of option data, this fills those

--- 96 unchanged lines hidden (view full) ---

996 if (options->user_hostfile2 == NULL)
997 options->user_hostfile2 = _PATH_SSH_USER_HOSTFILE2;
998 if (options->log_level == SYSLOG_LEVEL_NOT_SET)
999 options->log_level = SYSLOG_LEVEL_INFO;
1000 if (options->clear_forwardings == 1)
1001 clear_forwardings(options);
1002 if (options->no_host_authentication_for_localhost == - 1)
1003 options->no_host_authentication_for_localhost = 0;
1004 if (options->identities_only == -1)
1005 options->identities_only = 0;
994 if (options->enable_ssh_keysign == -1)
995 options->enable_ssh_keysign = 0;
996 if (options->rekey_limit == -1)
997 options->rekey_limit = 0;
998 if (options->verify_host_key_dns == -1)
999 options->verify_host_key_dns = 0;
1000 if (options->server_alive_interval == -1)
1001 options->server_alive_interval = 0;
1002 if (options->server_alive_count_max == -1)
1003 options->server_alive_count_max = 3;
1004 /* options->proxy_command should not be set by default */
1005 /* options->user will be set in the main program if appropriate */
1006 /* options->hostname will be set in the main program if appropriate */
1007 /* options->host_key_alias should not be set by default */
1008 /* options->preferred_authentications will be set in ssh */
1009}
1006 if (options->enable_ssh_keysign == -1)
1007 options->enable_ssh_keysign = 0;
1008 if (options->rekey_limit == -1)
1009 options->rekey_limit = 0;
1010 if (options->verify_host_key_dns == -1)
1011 options->verify_host_key_dns = 0;
1012 if (options->server_alive_interval == -1)
1013 options->server_alive_interval = 0;
1014 if (options->server_alive_count_max == -1)
1015 options->server_alive_count_max = 3;
1016 /* options->proxy_command should not be set by default */
1017 /* options->user will be set in the main program if appropriate */
1018 /* options->hostname will be set in the main program if appropriate */
1019 /* options->host_key_alias should not be set by default */
1020 /* options->preferred_authentications will be set in ssh */
1021}