Lines Matching full:options
72 /* Initializes the server options to their default values. */
75 initialize_server_options(ServerOptions *options) in initialize_server_options() argument
77 memset(options, 0, sizeof(*options)); in initialize_server_options()
79 /* Portable-specific options */ in initialize_server_options()
80 options->use_pam = -1; in initialize_server_options()
82 /* Standard Options */ in initialize_server_options()
83 options->num_ports = 0; in initialize_server_options()
84 options->ports_from_cmdline = 0; in initialize_server_options()
85 options->queued_listen_addrs = NULL; in initialize_server_options()
86 options->num_queued_listens = 0; in initialize_server_options()
87 options->listen_addrs = NULL; in initialize_server_options()
88 options->address_family = -1; in initialize_server_options()
89 options->num_host_key_files = 0; in initialize_server_options()
90 options->num_host_cert_files = 0; in initialize_server_options()
91 options->host_key_agent = NULL; in initialize_server_options()
92 options->pid_file = NULL; in initialize_server_options()
93 options->login_grace_time = -1; in initialize_server_options()
94 options->permit_root_login = PERMIT_NOT_SET; in initialize_server_options()
95 options->ignore_rhosts = -1; in initialize_server_options()
96 options->ignore_user_known_hosts = -1; in initialize_server_options()
97 options->print_motd = -1; in initialize_server_options()
98 options->print_lastlog = -1; in initialize_server_options()
99 options->x11_forwarding = -1; in initialize_server_options()
100 options->x11_display_offset = -1; in initialize_server_options()
101 options->x11_use_localhost = -1; in initialize_server_options()
102 options->permit_tty = -1; in initialize_server_options()
103 options->permit_user_rc = -1; in initialize_server_options()
104 options->xauth_location = NULL; in initialize_server_options()
105 options->strict_modes = -1; in initialize_server_options()
106 options->tcp_keep_alive = -1; in initialize_server_options()
107 options->log_facility = SYSLOG_FACILITY_NOT_SET; in initialize_server_options()
108 options->log_level = SYSLOG_LEVEL_NOT_SET; in initialize_server_options()
109 options->hostbased_authentication = -1; in initialize_server_options()
110 options->hostbased_uses_name_from_packet_only = -1; in initialize_server_options()
111 options->hostbased_key_types = NULL; in initialize_server_options()
112 options->hostkeyalgorithms = NULL; in initialize_server_options()
113 options->pubkey_authentication = -1; in initialize_server_options()
114 options->pubkey_key_types = NULL; in initialize_server_options()
115 options->kerberos_authentication = -1; in initialize_server_options()
116 options->kerberos_or_local_passwd = -1; in initialize_server_options()
117 options->kerberos_ticket_cleanup = -1; in initialize_server_options()
118 options->kerberos_get_afs_token = -1; in initialize_server_options()
119 options->gss_authentication=-1; in initialize_server_options()
120 options->gss_cleanup_creds = -1; in initialize_server_options()
121 options->gss_strict_acceptor = -1; in initialize_server_options()
122 options->password_authentication = -1; in initialize_server_options()
123 options->kbd_interactive_authentication = -1; in initialize_server_options()
124 options->challenge_response_authentication = -1; in initialize_server_options()
125 options->permit_empty_passwd = -1; in initialize_server_options()
126 options->permit_user_env = -1; in initialize_server_options()
127 options->compression = -1; in initialize_server_options()
128 options->rekey_limit = -1; in initialize_server_options()
129 options->rekey_interval = -1; in initialize_server_options()
130 options->allow_tcp_forwarding = -1; in initialize_server_options()
131 options->allow_streamlocal_forwarding = -1; in initialize_server_options()
132 options->allow_agent_forwarding = -1; in initialize_server_options()
133 options->num_allow_users = 0; in initialize_server_options()
134 options->num_deny_users = 0; in initialize_server_options()
135 options->num_allow_groups = 0; in initialize_server_options()
136 options->num_deny_groups = 0; in initialize_server_options()
137 options->ciphers = NULL; in initialize_server_options()
138 options->macs = NULL; in initialize_server_options()
139 options->kex_algorithms = NULL; in initialize_server_options()
140 options->fwd_opts.gateway_ports = -1; in initialize_server_options()
141 options->fwd_opts.streamlocal_bind_mask = (mode_t)-1; in initialize_server_options()
142 options->fwd_opts.streamlocal_bind_unlink = -1; in initialize_server_options()
143 options->num_subsystems = 0; in initialize_server_options()
144 options->max_startups_begin = -1; in initialize_server_options()
145 options->max_startups_rate = -1; in initialize_server_options()
146 options->max_startups = -1; in initialize_server_options()
147 options->max_authtries = -1; in initialize_server_options()
148 options->max_sessions = -1; in initialize_server_options()
149 options->banner = NULL; in initialize_server_options()
150 options->use_dns = -1; in initialize_server_options()
151 options->client_alive_interval = -1; in initialize_server_options()
152 options->client_alive_count_max = -1; in initialize_server_options()
153 options->num_authkeys_files = 0; in initialize_server_options()
154 options->num_accept_env = 0; in initialize_server_options()
155 options->permit_tun = -1; in initialize_server_options()
156 options->num_permitted_opens = -1; in initialize_server_options()
157 options->adm_forced_command = NULL; in initialize_server_options()
158 options->chroot_directory = NULL; in initialize_server_options()
159 options->authorized_keys_command = NULL; in initialize_server_options()
160 options->authorized_keys_command_user = NULL; in initialize_server_options()
161 options->revoked_keys_file = NULL; in initialize_server_options()
162 options->trusted_user_ca_keys = NULL; in initialize_server_options()
163 options->authorized_principals_file = NULL; in initialize_server_options()
164 options->authorized_principals_command = NULL; in initialize_server_options()
165 options->authorized_principals_command_user = NULL; in initialize_server_options()
166 options->ip_qos_interactive = -1; in initialize_server_options()
167 options->ip_qos_bulk = -1; in initialize_server_options()
168 options->version_addendum = NULL; in initialize_server_options()
169 options->fingerprint_hash = -1; in initialize_server_options()
170 options->disable_forwarding = -1; in initialize_server_options()
195 fill_default_server_options(ServerOptions *options) in fill_default_server_options() argument
199 /* Portable-specific options */ in fill_default_server_options()
200 if (options->use_pam == -1) in fill_default_server_options()
201 options->use_pam = 0; in fill_default_server_options()
203 /* Standard Options */ in fill_default_server_options()
204 if (options->num_host_key_files == 0) { in fill_default_server_options()
206 options->host_key_files[options->num_host_key_files++] = in fill_default_server_options()
208 options->host_key_files[options->num_host_key_files++] = in fill_default_server_options()
211 options->host_key_files[options->num_host_key_files++] = in fill_default_server_options()
214 options->host_key_files[options->num_host_key_files++] = in fill_default_server_options()
218 if (options->num_ports == 0) in fill_default_server_options()
219 options->ports[options->num_ports++] = SSH_DEFAULT_PORT; in fill_default_server_options()
220 if (options->address_family == -1) in fill_default_server_options()
221 options->address_family = AF_UNSPEC; in fill_default_server_options()
222 if (options->listen_addrs == NULL) in fill_default_server_options()
223 add_listen_addr(options, NULL, 0); in fill_default_server_options()
224 if (options->pid_file == NULL) in fill_default_server_options()
225 options->pid_file = xstrdup(_PATH_SSH_DAEMON_PID_FILE); in fill_default_server_options()
226 if (options->login_grace_time == -1) in fill_default_server_options()
227 options->login_grace_time = 120; in fill_default_server_options()
228 if (options->permit_root_login == PERMIT_NOT_SET) in fill_default_server_options()
229 options->permit_root_login = PERMIT_NO_PASSWD; in fill_default_server_options()
230 if (options->ignore_rhosts == -1) in fill_default_server_options()
231 options->ignore_rhosts = 1; in fill_default_server_options()
232 if (options->ignore_user_known_hosts == -1) in fill_default_server_options()
233 options->ignore_user_known_hosts = 0; in fill_default_server_options()
234 if (options->print_motd == -1) in fill_default_server_options()
235 options->print_motd = 1; in fill_default_server_options()
236 if (options->print_lastlog == -1) in fill_default_server_options()
237 options->print_lastlog = 1; in fill_default_server_options()
238 if (options->x11_forwarding == -1) in fill_default_server_options()
239 options->x11_forwarding = 0; in fill_default_server_options()
240 if (options->x11_display_offset == -1) in fill_default_server_options()
241 options->x11_display_offset = 10; in fill_default_server_options()
242 if (options->x11_use_localhost == -1) in fill_default_server_options()
243 options->x11_use_localhost = 1; in fill_default_server_options()
244 if (options->xauth_location == NULL) in fill_default_server_options()
245 options->xauth_location = xstrdup(_PATH_XAUTH); in fill_default_server_options()
246 if (options->permit_tty == -1) in fill_default_server_options()
247 options->permit_tty = 1; in fill_default_server_options()
248 if (options->permit_user_rc == -1) in fill_default_server_options()
249 options->permit_user_rc = 1; in fill_default_server_options()
250 if (options->strict_modes == -1) in fill_default_server_options()
251 options->strict_modes = 1; in fill_default_server_options()
252 if (options->tcp_keep_alive == -1) in fill_default_server_options()
253 options->tcp_keep_alive = 1; in fill_default_server_options()
254 if (options->log_facility == SYSLOG_FACILITY_NOT_SET) in fill_default_server_options()
255 options->log_facility = SYSLOG_FACILITY_AUTH; in fill_default_server_options()
256 if (options->log_level == SYSLOG_LEVEL_NOT_SET) in fill_default_server_options()
257 options->log_level = SYSLOG_LEVEL_INFO; in fill_default_server_options()
258 if (options->hostbased_authentication == -1) in fill_default_server_options()
259 options->hostbased_authentication = 0; in fill_default_server_options()
260 if (options->hostbased_uses_name_from_packet_only == -1) in fill_default_server_options()
261 options->hostbased_uses_name_from_packet_only = 0; in fill_default_server_options()
262 if (options->pubkey_authentication == -1) in fill_default_server_options()
263 options->pubkey_authentication = 1; in fill_default_server_options()
264 if (options->kerberos_authentication == -1) in fill_default_server_options()
265 options->kerberos_authentication = 0; in fill_default_server_options()
266 if (options->kerberos_or_local_passwd == -1) in fill_default_server_options()
267 options->kerberos_or_local_passwd = 1; in fill_default_server_options()
268 if (options->kerberos_ticket_cleanup == -1) in fill_default_server_options()
269 options->kerberos_ticket_cleanup = 1; in fill_default_server_options()
270 if (options->kerberos_get_afs_token == -1) in fill_default_server_options()
271 options->kerberos_get_afs_token = 0; in fill_default_server_options()
272 if (options->gss_authentication == -1) in fill_default_server_options()
273 options->gss_authentication = 0; in fill_default_server_options()
274 if (options->gss_cleanup_creds == -1) in fill_default_server_options()
275 options->gss_cleanup_creds = 1; in fill_default_server_options()
276 if (options->gss_strict_acceptor == -1) in fill_default_server_options()
277 options->gss_strict_acceptor = 1; in fill_default_server_options()
278 if (options->password_authentication == -1) in fill_default_server_options()
279 options->password_authentication = 1; in fill_default_server_options()
280 if (options->kbd_interactive_authentication == -1) in fill_default_server_options()
281 options->kbd_interactive_authentication = 0; in fill_default_server_options()
282 if (options->challenge_response_authentication == -1) in fill_default_server_options()
283 options->challenge_response_authentication = 1; in fill_default_server_options()
284 if (options->permit_empty_passwd == -1) in fill_default_server_options()
285 options->permit_empty_passwd = 0; in fill_default_server_options()
286 if (options->permit_user_env == -1) in fill_default_server_options()
287 options->permit_user_env = 0; in fill_default_server_options()
288 if (options->compression == -1) in fill_default_server_options()
289 options->compression = COMP_DELAYED; in fill_default_server_options()
290 if (options->rekey_limit == -1) in fill_default_server_options()
291 options->rekey_limit = 0; in fill_default_server_options()
292 if (options->rekey_interval == -1) in fill_default_server_options()
293 options->rekey_interval = 0; in fill_default_server_options()
294 if (options->allow_tcp_forwarding == -1) in fill_default_server_options()
295 options->allow_tcp_forwarding = FORWARD_ALLOW; in fill_default_server_options()
296 if (options->allow_streamlocal_forwarding == -1) in fill_default_server_options()
297 options->allow_streamlocal_forwarding = FORWARD_ALLOW; in fill_default_server_options()
298 if (options->allow_agent_forwarding == -1) in fill_default_server_options()
299 options->allow_agent_forwarding = 1; in fill_default_server_options()
300 if (options->fwd_opts.gateway_ports == -1) in fill_default_server_options()
301 options->fwd_opts.gateway_ports = 0; in fill_default_server_options()
302 if (options->max_startups == -1) in fill_default_server_options()
303 options->max_startups = 100; in fill_default_server_options()
304 if (options->max_startups_rate == -1) in fill_default_server_options()
305 options->max_startups_rate = 30; /* 30% */ in fill_default_server_options()
306 if (options->max_startups_begin == -1) in fill_default_server_options()
307 options->max_startups_begin = 10; in fill_default_server_options()
308 if (options->max_authtries == -1) in fill_default_server_options()
309 options->max_authtries = DEFAULT_AUTH_FAIL_MAX; in fill_default_server_options()
310 if (options->max_sessions == -1) in fill_default_server_options()
311 options->max_sessions = DEFAULT_SESSIONS_MAX; in fill_default_server_options()
312 if (options->use_dns == -1) in fill_default_server_options()
313 options->use_dns = 0; in fill_default_server_options()
314 if (options->client_alive_interval == -1) in fill_default_server_options()
315 options->client_alive_interval = 0; in fill_default_server_options()
316 if (options->client_alive_count_max == -1) in fill_default_server_options()
317 options->client_alive_count_max = 3; in fill_default_server_options()
318 if (options->num_authkeys_files == 0) { in fill_default_server_options()
319 options->authorized_keys_files[options->num_authkeys_files++] = in fill_default_server_options()
321 options->authorized_keys_files[options->num_authkeys_files++] = in fill_default_server_options()
324 if (options->permit_tun == -1) in fill_default_server_options()
325 options->permit_tun = SSH_TUNMODE_NO; in fill_default_server_options()
326 if (options->ip_qos_interactive == -1) in fill_default_server_options()
327 options->ip_qos_interactive = IPTOS_LOWDELAY; in fill_default_server_options()
328 if (options->ip_qos_bulk == -1) in fill_default_server_options()
329 options->ip_qos_bulk = IPTOS_THROUGHPUT; in fill_default_server_options()
330 if (options->version_addendum == NULL) in fill_default_server_options()
331 options->version_addendum = xstrdup(""); in fill_default_server_options()
332 if (options->fwd_opts.streamlocal_bind_mask == (mode_t)-1) in fill_default_server_options()
333 options->fwd_opts.streamlocal_bind_mask = 0177; in fill_default_server_options()
334 if (options->fwd_opts.streamlocal_bind_unlink == -1) in fill_default_server_options()
335 options->fwd_opts.streamlocal_bind_unlink = 0; in fill_default_server_options()
336 if (options->fingerprint_hash == -1) in fill_default_server_options()
337 options->fingerprint_hash = SSH_FP_HASH_DEFAULT; in fill_default_server_options()
338 if (options->disable_forwarding == -1) in fill_default_server_options()
339 options->disable_forwarding = 0; in fill_default_server_options()
341 assemble_algorithms(options); in fill_default_server_options()
354 CLEAR_ON_NONE(options->pid_file); in fill_default_server_options()
355 CLEAR_ON_NONE(options->xauth_location); in fill_default_server_options()
356 CLEAR_ON_NONE(options->banner); in fill_default_server_options()
357 CLEAR_ON_NONE(options->trusted_user_ca_keys); in fill_default_server_options()
358 CLEAR_ON_NONE(options->revoked_keys_file); in fill_default_server_options()
359 CLEAR_ON_NONE(options->authorized_principals_file); in fill_default_server_options()
360 CLEAR_ON_NONE(options->adm_forced_command); in fill_default_server_options()
361 CLEAR_ON_NONE(options->chroot_directory); in fill_default_server_options()
362 for (i = 0; i < options->num_host_key_files; i++) in fill_default_server_options()
363 CLEAR_ON_NONE(options->host_key_files[i]); in fill_default_server_options()
364 for (i = 0; i < options->num_host_cert_files; i++) in fill_default_server_options()
365 CLEAR_ON_NONE(options->host_cert_files[i]); in fill_default_server_options()
369 if (options->num_auth_methods == 1 && in fill_default_server_options()
370 strcmp(options->auth_methods[0], "any") == 0) { in fill_default_server_options()
371 free(options->auth_methods[0]); in fill_default_server_options()
372 options->auth_methods[0] = NULL; in fill_default_server_options()
373 options->num_auth_methods = 0; in fill_default_server_options()
377 if (use_privsep && options->compression == 1) { in fill_default_server_options()
381 options->compression = 0; in fill_default_server_options()
390 /* Portable-specific options */
392 /* Standard Options */
438 /* Portable-specific options */
445 /* Standard Options */
621 add_listen_addr(ServerOptions *options, char *addr, int port) in add_listen_addr() argument
626 for (i = 0; i < options->num_ports; i++) in add_listen_addr()
627 add_one_listen_addr(options, addr, options->ports[i]); in add_listen_addr()
629 add_one_listen_addr(options, addr, port); in add_listen_addr()
633 add_one_listen_addr(ServerOptions *options, char *addr, int port) in add_one_listen_addr() argument
640 hints.ai_family = options->address_family; in add_one_listen_addr()
650 ai->ai_next = options->listen_addrs; in add_one_listen_addr()
651 options->listen_addrs = aitop; in add_one_listen_addr()
656 * and AddressFamily options.
659 queue_listen_addr(ServerOptions *options, char *addr, int port) in queue_listen_addr() argument
661 options->queued_listen_addrs = xreallocarray( in queue_listen_addr()
662 options->queued_listen_addrs, options->num_queued_listens + 1, in queue_listen_addr()
664 options->queued_listen_ports = xreallocarray( in queue_listen_addr()
665 options->queued_listen_ports, options->num_queued_listens + 1, in queue_listen_addr()
667 options->queued_listen_addrs[options->num_queued_listens] = in queue_listen_addr()
669 options->queued_listen_ports[options->num_queued_listens] = port; in queue_listen_addr()
670 options->num_queued_listens++; in queue_listen_addr()
677 process_queued_listen_addrs(ServerOptions *options) in process_queued_listen_addrs() argument
681 if (options->num_ports == 0) in process_queued_listen_addrs()
682 options->ports[options->num_ports++] = SSH_DEFAULT_PORT; in process_queued_listen_addrs()
683 if (options->address_family == -1) in process_queued_listen_addrs()
684 options->address_family = AF_UNSPEC; in process_queued_listen_addrs()
686 for (i = 0; i < options->num_queued_listens; i++) { in process_queued_listen_addrs()
687 add_listen_addr(options, options->queued_listen_addrs[i], in process_queued_listen_addrs()
688 options->queued_listen_ports[i]); in process_queued_listen_addrs()
689 free(options->queued_listen_addrs[i]); in process_queued_listen_addrs()
690 options->queued_listen_addrs[i] = NULL; in process_queued_listen_addrs()
692 free(options->queued_listen_addrs); in process_queued_listen_addrs()
693 options->queued_listen_addrs = NULL; in process_queued_listen_addrs()
694 free(options->queued_listen_ports); in process_queued_listen_addrs()
695 options->queued_listen_ports = NULL; in process_queued_listen_addrs()
696 options->num_queued_listens = 0; in process_queued_listen_addrs()
727 * options set are copied into the main server config.
959 process_server_config_line(ServerOptions *options, char *line, in process_server_config_line() argument
1012 /* Portable-specific options */ in process_server_config_line()
1014 intptr = &options->use_pam; in process_server_config_line()
1017 /* Standard Options */ in process_server_config_line()
1022 if (options->ports_from_cmdline) in process_server_config_line()
1024 if (options->num_ports >= MAX_PORTS) in process_server_config_line()
1031 options->ports[options->num_ports++] = a2port(arg); in process_server_config_line()
1032 if (options->ports[options->num_ports-1] <= 0) in process_server_config_line()
1038 intptr = &options->login_grace_time; in process_server_config_line()
1059 queue_listen_addr(options, arg, 0); in process_server_config_line()
1072 queue_listen_addr(options, p, port); in process_server_config_line()
1077 intptr = &options->address_family; in process_server_config_line()
1099 intptr = &options->num_host_key_files; in process_server_config_line()
1103 charptr = &options->host_key_files[*intptr]; in process_server_config_line()
1118 charptr = &options->host_key_agent; in process_server_config_line()
1129 intptr = &options->num_host_cert_files; in process_server_config_line()
1134 charptr = &options->host_cert_files[*intptr]; in process_server_config_line()
1138 charptr = &options->pid_file; in process_server_config_line()
1142 intptr = &options->permit_root_login; in process_server_config_line()
1147 intptr = &options->ignore_rhosts; in process_server_config_line()
1166 intptr = &options->ignore_user_known_hosts; in process_server_config_line()
1170 intptr = &options->hostbased_authentication; in process_server_config_line()
1174 intptr = &options->hostbased_uses_name_from_packet_only; in process_server_config_line()
1178 charptr = &options->hostbased_key_types; in process_server_config_line()
1193 charptr = &options->hostkeyalgorithms; in process_server_config_line()
1197 intptr = &options->pubkey_authentication; in process_server_config_line()
1201 charptr = &options->pubkey_key_types; in process_server_config_line()
1205 intptr = &options->kerberos_authentication; in process_server_config_line()
1209 intptr = &options->kerberos_or_local_passwd; in process_server_config_line()
1213 intptr = &options->kerberos_ticket_cleanup; in process_server_config_line()
1217 intptr = &options->kerberos_get_afs_token; in process_server_config_line()
1221 intptr = &options->gss_authentication; in process_server_config_line()
1225 intptr = &options->gss_cleanup_creds; in process_server_config_line()
1229 intptr = &options->gss_strict_acceptor; in process_server_config_line()
1233 intptr = &options->password_authentication; in process_server_config_line()
1237 intptr = &options->kbd_interactive_authentication; in process_server_config_line()
1241 intptr = &options->challenge_response_authentication; in process_server_config_line()
1245 intptr = &options->print_motd; in process_server_config_line()
1249 intptr = &options->print_lastlog; in process_server_config_line()
1253 intptr = &options->x11_forwarding; in process_server_config_line()
1257 intptr = &options->x11_display_offset; in process_server_config_line()
1269 intptr = &options->x11_use_localhost; in process_server_config_line()
1273 charptr = &options->xauth_location; in process_server_config_line()
1277 intptr = &options->permit_tty; in process_server_config_line()
1281 intptr = &options->permit_user_rc; in process_server_config_line()
1285 intptr = &options->strict_modes; in process_server_config_line()
1289 intptr = &options->tcp_keep_alive; in process_server_config_line()
1293 intptr = &options->permit_empty_passwd; in process_server_config_line()
1297 intptr = &options->permit_user_env; in process_server_config_line()
1301 intptr = &options->compression; in process_server_config_line()
1320 if (*activep && options->rekey_limit == -1) in process_server_config_line()
1321 options->rekey_limit = val64; in process_server_config_line()
1327 intptr = &options->rekey_interval; in process_server_config_line()
1333 intptr = &options->fwd_opts.gateway_ports; in process_server_config_line()
1338 intptr = &options->use_dns; in process_server_config_line()
1342 log_facility_ptr = &options->log_facility; in process_server_config_line()
1353 log_level_ptr = &options->log_level; in process_server_config_line()
1364 intptr = &options->allow_tcp_forwarding; in process_server_config_line()
1369 intptr = &options->allow_streamlocal_forwarding; in process_server_config_line()
1374 intptr = &options->allow_agent_forwarding; in process_server_config_line()
1378 intptr = &options->disable_forwarding; in process_server_config_line()
1383 if (options->num_allow_users >= MAX_ALLOW_USERS) in process_server_config_line()
1391 options->allow_users[options->num_allow_users++] = in process_server_config_line()
1398 if (options->num_deny_users >= MAX_DENY_USERS) in process_server_config_line()
1406 options->deny_users[options->num_deny_users++] = in process_server_config_line()
1413 if (options->num_allow_groups >= MAX_ALLOW_GROUPS) in process_server_config_line()
1418 options->allow_groups[options->num_allow_groups++] = in process_server_config_line()
1425 if (options->num_deny_groups >= MAX_DENY_GROUPS) in process_server_config_line()
1430 options->deny_groups[options->num_deny_groups++] = in process_server_config_line()
1442 if (options->ciphers == NULL) in process_server_config_line()
1443 options->ciphers = xstrdup(arg); in process_server_config_line()
1453 if (options->macs == NULL) in process_server_config_line()
1454 options->macs = xstrdup(arg); in process_server_config_line()
1466 if (options->kex_algorithms == NULL) in process_server_config_line()
1467 options->kex_algorithms = xstrdup(arg); in process_server_config_line()
1471 if (options->num_subsystems >= MAX_SUBSYSTEMS) { in process_server_config_line()
1483 for (i = 0; i < options->num_subsystems; i++) in process_server_config_line()
1484 if (strcmp(arg, options->subsystem_name[i]) == 0) in process_server_config_line()
1487 options->subsystem_name[options->num_subsystems] = xstrdup(arg); in process_server_config_line()
1492 options->subsystem_command[options->num_subsystems] = xstrdup(arg); in process_server_config_line()
1503 options->subsystem_args[options->num_subsystems] = p; in process_server_config_line()
1504 options->num_subsystems++; in process_server_config_line()
1513 &options->max_startups_begin, in process_server_config_line()
1514 &options->max_startups_rate, in process_server_config_line()
1515 &options->max_startups)) == 3) { in process_server_config_line()
1516 if (options->max_startups_begin > in process_server_config_line()
1517 options->max_startups || in process_server_config_line()
1518 options->max_startups_rate > 100 || in process_server_config_line()
1519 options->max_startups_rate < 1) in process_server_config_line()
1526 options->max_startups = options->max_startups_begin; in process_server_config_line()
1530 intptr = &options->max_authtries; in process_server_config_line()
1534 intptr = &options->max_sessions; in process_server_config_line()
1538 charptr = &options->banner; in process_server_config_line()
1542 * These options can contain %X options expanded at in process_server_config_line()
1548 if (*activep && options->num_authkeys_files == 0) { in process_server_config_line()
1550 if (options->num_authkeys_files >= in process_server_config_line()
1555 options->authorized_keys_files[ in process_server_config_line()
1556 options->num_authkeys_files++] = in process_server_config_line()
1563 charptr = &options->authorized_principals_file; in process_server_config_line()
1577 intptr = &options->client_alive_interval; in process_server_config_line()
1581 intptr = &options->client_alive_count_max; in process_server_config_line()
1589 if (options->num_accept_env >= MAX_ACCEPT_ENV) in process_server_config_line()
1594 options->accept_env[options->num_accept_env++] = in process_server_config_line()
1600 intptr = &options->permit_tun; in process_server_config_line()
1634 n = options->num_permitted_opens; /* modified later */ in process_server_config_line()
1638 options->num_permitted_opens = 0; in process_server_config_line()
1644 options->num_permitted_opens = 1; in process_server_config_line()
1661 options->num_permitted_opens = in process_server_config_line()
1671 if (*activep && options->adm_forced_command == NULL) in process_server_config_line()
1672 options->adm_forced_command = xstrdup(cp + len); in process_server_config_line()
1676 charptr = &options->chroot_directory; in process_server_config_line()
1687 charptr = &options->trusted_user_ca_keys; in process_server_config_line()
1691 charptr = &options->revoked_keys_file; in process_server_config_line()
1706 options->ip_qos_interactive = value; in process_server_config_line()
1707 options->ip_qos_bulk = value2; in process_server_config_line()
1716 if (*activep && options->version_addendum == NULL) { in process_server_config_line()
1718 options->version_addendum = xstrdup(""); in process_server_config_line()
1723 options->version_addendum = xstrdup(cp + len); in process_server_config_line()
1732 if (*activep && options->authorized_keys_command == NULL) { in process_server_config_line()
1737 options->authorized_keys_command = xstrdup(cp + len); in process_server_config_line()
1742 charptr = &options->authorized_keys_command_user; in process_server_config_line()
1758 options->authorized_principals_command == NULL) { in process_server_config_line()
1763 options->authorized_principals_command = in process_server_config_line()
1769 charptr = &options->authorized_principals_command_user; in process_server_config_line()
1781 if (options->num_auth_methods == 0) { in process_server_config_line()
1785 if (options->num_auth_methods >= in process_server_config_line()
1791 if (options->num_auth_methods > 0) { in process_server_config_line()
1810 options->auth_methods[ in process_server_config_line()
1811 options->num_auth_methods++] = xstrdup(arg); in process_server_config_line()
1830 options->fwd_opts.streamlocal_bind_mask = (mode_t)value; in process_server_config_line()
1834 intptr = &options->fwd_opts.streamlocal_bind_unlink; in process_server_config_line()
1846 options->fingerprint_hash = value; in process_server_config_line()
1906 parse_server_match_config(ServerOptions *options, in parse_server_match_config() argument
1923 copy_set_server_options(options, &mo, 0); in parse_server_match_config()
2045 * The only things that should be below this point are string options in copy_set_server_options()
2051 /* These options may be "none" to clear a global setting */ in copy_set_server_options()
2069 parse_server_config(ServerOptions *options, const char *filename, Buffer *conf, in parse_server_config() argument
2082 if (process_server_config_line(options, cp, filename, in parse_server_config()
2088 fatal("%s: terminating, %d bad configuration options", in parse_server_config()
2090 process_queued_listen_addrs(options); in parse_server_config()