summaryrefslogtreecommitdiff
path: root/readconf.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-25 00:26:21 +1100
committerDamien Miller <djm@mindrot.org>1999-11-25 00:26:21 +1100
commit95def09838fc61b37b6ea7cd5c234a465b4b129b (patch)
tree042744f76f40a326b873cb1c3690a6d7d966bc3e /readconf.h
parent4d2f15f895f4c795afc008aeff3fd2ceffbc44f4 (diff)
- Merged very large OpenBSD source code reformat
- OpenBSD CVS updates - [channels.c cipher.c compat.c log-client.c scp.c serverloop.c] [ssh.h sshd.8 sshd.c] syslog changes: * Unified Logmessage for all auth-types, for success and for failed * Standard connections get only ONE line in the LOG when level==LOG: Auth-attempts are logged only, if authentication is: a) successfull or b) with passwd or c) we had more than AUTH_FAIL_LOG failues * many log() became verbose() * old behaviour with level=VERBOSE - [readconf.c readconf.h ssh.1 ssh.h sshconnect.c sshd.c] tranfer s/key challenge/response data in SSH_SMSG_AUTH_TIS_CHALLENGE messages. allows use of s/key in windows (ttssh, securecrt) and ssh-1.2.27 clients without 'ssh -v', ok: niels@ - [sshd.8] -V, for fallback to openssh in SSH2 compatibility mode - [sshd.c] fix sigchld race; cjc5@po.cwru.edu
Diffstat (limited to 'readconf.h')
-rw-r--r--readconf.h170
1 files changed, 89 insertions, 81 deletions
diff --git a/readconf.h b/readconf.h
index d2d387df1..aeec53a75 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,118 +1,126 @@
1/* 1/*
2 2 *
3readconf.h 3 * readconf.h
4 4 *
5Author: Tatu Ylonen <ylo@cs.hut.fi> 5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 6 *
7Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 All rights reserved 8 * All rights reserved
9 9 *
10Created: Sat Apr 22 00:25:29 1995 ylo 10 * Created: Sat Apr 22 00:25:29 1995 ylo
11 11 *
12Functions for reading the configuration file. 12 * Functions for reading the configuration file.
13 13 *
14*/ 14 */
15 15
16/* RCSID("$Id: readconf.h,v 1.3 1999/11/15 04:25:10 damien Exp $"); */ 16/* RCSID("$Id: readconf.h,v 1.4 1999/11/24 13:26:22 damien Exp $"); */
17 17
18#ifndef READCONF_H 18#ifndef READCONF_H
19#define READCONF_H 19#define READCONF_H
20 20
21/* Data structure for representing a forwarding request. */ 21/* Data structure for representing a forwarding request. */
22 22
23typedef struct 23typedef struct {
24{ 24 int port; /* Port to forward. */
25 int port; /* Port to forward. */ 25 char *host; /* Host to connect. */
26 char *host; /* Host to connect. */ 26 int host_port; /* Port to connect on host. */
27 int host_port; /* Port to connect on host. */ 27} Forward;
28} Forward;
29
30/* Data structure for representing option data. */ 28/* Data structure for representing option data. */
31 29
32typedef struct 30typedef struct {
33{ 31 int forward_agent; /* Forward authentication agent. */
34 int forward_agent; /* Forward authentication agent. */ 32 int forward_x11; /* Forward X11 display. */
35 int forward_x11; /* Forward X11 display. */ 33 int gateway_ports; /* Allow remote connects to forwarded ports. */
36 int gateway_ports; /* Allow remote connects to forwarded ports. */ 34 int use_privileged_port; /* Don't use privileged port if false. */
37 int use_privileged_port; /* Don't use privileged port if false. */ 35 int rhosts_authentication; /* Try rhosts authentication. */
38 int rhosts_authentication; /* Try rhosts authentication. */ 36 int rhosts_rsa_authentication; /* Try rhosts with RSA
39 int rhosts_rsa_authentication;/* Try rhosts with RSA authentication. */ 37 * authentication. */
40 int rsa_authentication; /* Try RSA authentication. */ 38 int rsa_authentication; /* Try RSA authentication. */
39 int skey_authentication; /* Try S/Key or TIS authentication. */
41#ifdef KRB4 40#ifdef KRB4
42 int kerberos_authentication; /* Try Kerberos authentication. */ 41 int kerberos_authentication; /* Try Kerberos
42 * authentication. */
43#endif 43#endif
44#ifdef AFS 44#ifdef AFS
45 int kerberos_tgt_passing; /* Try Kerberos tgt passing. */ 45 int kerberos_tgt_passing; /* Try Kerberos tgt passing. */
46 int afs_token_passing; /* Try AFS token passing. */ 46 int afs_token_passing; /* Try AFS token passing. */
47#endif 47#endif
48 int password_authentication; /* Try password authentication. */ 48 int password_authentication; /* Try password
49 int fallback_to_rsh; /* Use rsh if cannot connect with ssh. */ 49 * authentication. */
50 int use_rsh; /* Always use rsh (don\'t try ssh). */ 50 int fallback_to_rsh;/* Use rsh if cannot connect with ssh. */
51 int batch_mode; /* Batch mode: do not ask for passwords. */ 51 int use_rsh; /* Always use rsh (don\'t try ssh). */
52 int check_host_ip; /* Also keep track of keys for IP address */ 52 int batch_mode; /* Batch mode: do not ask for passwords. */
53 int strict_host_key_checking; /* Strict host key checking. */ 53 int check_host_ip; /* Also keep track of keys for IP address */
54 int compression; /* Compress packets in both directions. */ 54 int strict_host_key_checking; /* Strict host key checking. */
55 int compression_level; /* Compression level 1 (fast) to 9 (best). */ 55 int compression; /* Compress packets in both directions. */
56 int keepalives; /* Set SO_KEEPALIVE. */ 56 int compression_level; /* Compression level 1 (fast) to 9
57 LogLevel log_level; /* Level for logging. */ 57 * (best). */
58 58 int keepalives; /* Set SO_KEEPALIVE. */
59 int port; /* Port to connect. */ 59 LogLevel log_level; /* Level for logging. */
60 int connection_attempts; /* Max attempts (seconds) before giving up */ 60
61 int number_of_password_prompts; /* Max number of password prompts. */ 61 int port; /* Port to connect. */
62 int cipher; /* Cipher to use. */ 62 int connection_attempts; /* Max attempts (seconds) before
63 char *hostname; /* Real host to connect. */ 63 * giving up */
64 char *proxy_command; /* Proxy command for connecting the host. */ 64 int number_of_password_prompts; /* Max number of password
65 char *user; /* User to log in as. */ 65 * prompts. */
66 int escape_char; /* Escape character; -2 = none */ 66 int cipher; /* Cipher to use. */
67 67 char *hostname; /* Real host to connect. */
68 char *system_hostfile; /* Path for /etc/ssh_known_hosts. */ 68 char *proxy_command; /* Proxy command for connecting the host. */
69 char *user_hostfile; /* Path for $HOME/.ssh/known_hosts. */ 69 char *user; /* User to log in as. */
70 70 int escape_char; /* Escape character; -2 = none */
71 int num_identity_files; /* Number of files for RSA identities. */ 71
72 char *identity_files[SSH_MAX_IDENTITY_FILES]; 72 char *system_hostfile;/* Path for /etc/ssh_known_hosts. */
73 73 char *user_hostfile; /* Path for $HOME/.ssh/known_hosts. */
74 /* Local TCP/IP forward requests. */ 74
75 int num_local_forwards; 75 int num_identity_files; /* Number of files for RSA identities. */
76 Forward local_forwards[SSH_MAX_FORWARDS_PER_DIRECTION]; 76 char *identity_files[SSH_MAX_IDENTITY_FILES];
77 77
78 /* Remote TCP/IP forward requests. */ 78 /* Local TCP/IP forward requests. */
79 int num_remote_forwards; 79 int num_local_forwards;
80 Forward remote_forwards[SSH_MAX_FORWARDS_PER_DIRECTION]; 80 Forward local_forwards[SSH_MAX_FORWARDS_PER_DIRECTION];
81} Options; 81
82 /* Remote TCP/IP forward requests. */
83 int num_remote_forwards;
84 Forward remote_forwards[SSH_MAX_FORWARDS_PER_DIRECTION];
85} Options;
82 86
83 87
84/* Initializes options to special values that indicate that they have not 88/* Initializes options to special values that indicate that they have not
85 yet been set. Read_config_file will only set options with this value. 89 yet been set. Read_config_file will only set options with this value.
86 Options are processed in the following order: command line, user config 90 Options are processed in the following order: command line, user config
87 file, system config file. Last, fill_default_options is called. */ 91 file, system config file. Last, fill_default_options is called. */
88void initialize_options(Options *options); 92void initialize_options(Options * options);
89 93
90/* Called after processing other sources of option data, this fills those 94/* Called after processing other sources of option data, this fills those
91 options for which no value has been specified with their default values. */ 95 options for which no value has been specified with their default values. */
92void fill_default_options(Options *options); 96void fill_default_options(Options * options);
93 97
94/* Processes a single option line as used in the configuration files. 98/* Processes a single option line as used in the configuration files.
95 This only sets those values that have not already been set. 99 This only sets those values that have not already been set.
96 Returns 0 for legal options */ 100 Returns 0 for legal options */
97int process_config_line(Options *options, const char *host, 101int
98 char *line, const char *filename, int linenum, 102process_config_line(Options * options, const char *host,
99 int *activep); 103 char *line, const char *filename, int linenum,
104 int *activep);
100 105
101/* Reads the config file and modifies the options accordingly. Options should 106/* Reads the config file and modifies the options accordingly. Options should
102 already be initialized before this call. This never returns if there 107 already be initialized before this call. This never returns if there
103 is an error. If the file does not exist, this returns immediately. */ 108 is an error. If the file does not exist, this returns immediately. */
104void read_config_file(const char *filename, const char *host, 109void
105 Options *options); 110read_config_file(const char *filename, const char *host,
111 Options * options);
106 112
107/* Adds a local TCP/IP port forward to options. Never returns if there 113/* Adds a local TCP/IP port forward to options. Never returns if there
108 is an error. */ 114 is an error. */
109void add_local_forward(Options *options, int port, const char *host, 115void
110 int host_port); 116add_local_forward(Options * options, int port, const char *host,
117 int host_port);
111 118
112/* Adds a remote TCP/IP port forward to options. Never returns if there 119/* Adds a remote TCP/IP port forward to options. Never returns if there
113 is an error. */ 120 is an error. */
114void add_remote_forward(Options *options, int port, const char *host, 121void
115 int host_port); 122add_remote_forward(Options * options, int port, const char *host,
123 int host_port);
116 124
117 125
118#endif /* READCONF_H */ 126#endif /* READCONF_H */