• Home
  • Raw
  • Download

Lines Matching full:options

74    #  1. command line options
119 # Defaults for various options
133 const char *host, const char *original_host, Options *options,
135 static int process_config_line_depth(Options *options, struct passwd *pw,
185 /* Deprecated options */
196 /* Unsupported options */
204 /* Sometimes-unsupported options */
346 * Adds a local TCP/IP port forward to options. Never returns if there is an
351 add_local_forward(Options *options, const struct Forward *newfwd) in add_local_forward() argument
357 for (i = 0; i < options->num_local_forwards; i++) { in add_local_forward()
358 if (forward_equals(newfwd, options->local_forwards + i)) in add_local_forward()
361 options->local_forwards = xreallocarray(options->local_forwards, in add_local_forward()
362 options->num_local_forwards + 1, in add_local_forward()
363 sizeof(*options->local_forwards)); in add_local_forward()
364 fwd = &options->local_forwards[options->num_local_forwards++]; in add_local_forward()
375 * Adds a remote TCP/IP port forward to options. Never returns if there is
380 add_remote_forward(Options *options, const struct Forward *newfwd) in add_remote_forward() argument
386 for (i = 0; i < options->num_remote_forwards; i++) { in add_remote_forward()
387 if (forward_equals(newfwd, options->remote_forwards + i)) in add_remote_forward()
390 options->remote_forwards = xreallocarray(options->remote_forwards, in add_remote_forward()
391 options->num_remote_forwards + 1, in add_remote_forward()
392 sizeof(*options->remote_forwards)); in add_remote_forward()
393 fwd = &options->remote_forwards[options->num_remote_forwards++]; in add_remote_forward()
406 clear_forwardings(Options *options) in clear_forwardings() argument
410 for (i = 0; i < options->num_local_forwards; i++) { in clear_forwardings()
411 free(options->local_forwards[i].listen_host); in clear_forwardings()
412 free(options->local_forwards[i].listen_path); in clear_forwardings()
413 free(options->local_forwards[i].connect_host); in clear_forwardings()
414 free(options->local_forwards[i].connect_path); in clear_forwardings()
416 if (options->num_local_forwards > 0) { in clear_forwardings()
417 free(options->local_forwards); in clear_forwardings()
418 options->local_forwards = NULL; in clear_forwardings()
420 options->num_local_forwards = 0; in clear_forwardings()
421 for (i = 0; i < options->num_remote_forwards; i++) { in clear_forwardings()
422 free(options->remote_forwards[i].listen_host); in clear_forwardings()
423 free(options->remote_forwards[i].listen_path); in clear_forwardings()
424 free(options->remote_forwards[i].connect_host); in clear_forwardings()
425 free(options->remote_forwards[i].connect_path); in clear_forwardings()
427 if (options->num_remote_forwards > 0) { in clear_forwardings()
428 free(options->remote_forwards); in clear_forwardings()
429 options->remote_forwards = NULL; in clear_forwardings()
431 options->num_remote_forwards = 0; in clear_forwardings()
432 options->tun_open = SSH_TUNMODE_NO; in clear_forwardings()
436 add_certificate_file(Options *options, const char *path, int userprovided) in add_certificate_file() argument
440 if (options->num_certificate_files >= SSH_MAX_CERTIFICATE_FILES) in add_certificate_file()
445 for (i = 0; i < options->num_certificate_files; i++) { in add_certificate_file()
446 if (options->certificate_file_userprovided[i] == userprovided && in add_certificate_file()
447 strcmp(options->certificate_files[i], path) == 0) { in add_certificate_file()
453 options->certificate_file_userprovided[options->num_certificate_files] = in add_certificate_file()
455 options->certificate_files[options->num_certificate_files++] = in add_certificate_file()
460 add_identity_file(Options *options, const char *dir, const char *filename, in add_identity_file() argument
466 if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES) in add_identity_file()
476 for (i = 0; i < options->num_identity_files; i++) { in add_identity_file()
477 if (options->identity_file_userprovided[i] == userprovided && in add_identity_file()
478 strcmp(options->identity_files[i], path) == 0) { in add_identity_file()
485 options->identity_file_userprovided[options->num_identity_files] = in add_identity_file()
487 options->identity_files[options->num_identity_files++] = path; in add_identity_file()
575 match_cfg_line(Options *options, char **condition, struct passwd *pw, in match_cfg_line() argument
589 port = options->port <= 0 ? default_ssh_port() : options->port; in match_cfg_line()
590 ruser = options->user == NULL ? pw->pw_name : options->user; in match_cfg_line()
592 host = xstrdup(options->hostname); in match_cfg_line()
593 } else if (options->hostname != NULL) { in match_cfg_line()
595 host = percent_expand(options->hostname, in match_cfg_line()
736 rm_env(Options *options, const char *arg, const char *filename, int linenum) in rm_env() argument
742 for (i = 0; i < options->num_send_env; ) { in rm_env()
743 cp = xstrdup(options->send_env[i]); in rm_env()
752 free(options->send_env[i]); in rm_env()
753 options->send_env[i] = NULL; in rm_env()
754 for (j = i; j < options->num_send_env - 1; j++) { in rm_env()
755 options->send_env[j] = options->send_env[j + 1]; in rm_env()
756 options->send_env[j + 1] = NULL; in rm_env()
758 options->num_send_env--; in rm_env()
877 process_config_line(Options *options, struct passwd *pw, const char *host, in process_config_line() argument
881 return process_config_line_depth(options, pw, host, original_host, in process_config_line()
887 process_config_line_depth(Options *options, struct passwd *pw, const char *host, in process_config_line_depth() argument
933 options->ignored_unknown); in process_config_line_depth()
937 /* don't panic, but count bad options */ in process_config_line_depth()
946 intptr = &options->connection_timeout; in process_config_line_depth()
962 intptr = &options->forward_agent; in process_config_line_depth()
986 charptr = &options->forward_agent_sock_path; in process_config_line_depth()
990 intptr = &options->forward_x11; in process_config_line_depth()
1013 intptr = &options->forward_x11_trusted; in process_config_line_depth()
1017 intptr = &options->forward_x11_timeout; in process_config_line_depth()
1021 intptr = &options->fwd_opts.gateway_ports; in process_config_line_depth()
1025 intptr = &options->exit_on_forward_failure; in process_config_line_depth()
1029 intptr = &options->password_authentication; in process_config_line_depth()
1033 intptr = &options->kbd_interactive_authentication; in process_config_line_depth()
1037 charptr = &options->kbd_interactive_devices; in process_config_line_depth()
1041 intptr = &options->pubkey_authentication; in process_config_line_depth()
1045 intptr = &options->hostbased_authentication; in process_config_line_depth()
1049 intptr = &options->challenge_response_authentication; in process_config_line_depth()
1053 intptr = &options->gss_authentication; in process_config_line_depth()
1057 intptr = &options->gss_deleg_creds; in process_config_line_depth()
1061 intptr = &options->batch_mode; in process_config_line_depth()
1065 intptr = &options->check_host_ip; in process_config_line_depth()
1069 intptr = &options->verify_host_key_dns; in process_config_line_depth()
1074 intptr = &options->strict_host_key_checking; in process_config_line_depth()
1079 intptr = &options->compression; in process_config_line_depth()
1084 intptr = &options->tcp_keep_alive; in process_config_line_depth()
1088 intptr = &options->no_host_authentication_for_localhost; in process_config_line_depth()
1092 intptr = &options->number_of_password_prompts; in process_config_line_depth()
1110 if (*activep && options->rekey_limit == -1) in process_config_line_depth()
1111 options->rekey_limit = val64; in process_config_line_depth()
1117 intptr = &options->rekey_interval; in process_config_line_depth()
1127 intptr = &options->num_identity_files; in process_config_line_depth()
1131 add_identity_file(options, NULL, in process_config_line_depth()
1142 intptr = &options->num_certificate_files; in process_config_line_depth()
1149 add_certificate_file(options, arg, in process_config_line_depth()
1155 charptr=&options->xauth_location; in process_config_line_depth()
1159 charptr = &options->user; in process_config_line_depth()
1170 cpptr = (char **)&options->system_hostfiles; in process_config_line_depth()
1171 uintptr = &options->num_system_hostfiles; in process_config_line_depth()
1186 cpptr = (char **)&options->user_hostfiles; in process_config_line_depth()
1187 uintptr = &options->num_user_hostfiles; in process_config_line_depth()
1192 charptr = &options->hostname; in process_config_line_depth()
1196 charptr = &options->host_key_alias; in process_config_line_depth()
1200 charptr = &options->preferred_authentications; in process_config_line_depth()
1204 charptr = &options->bind_address; in process_config_line_depth()
1208 charptr = &options->bind_interface; in process_config_line_depth()
1212 charptr = &options->pkcs11_provider; in process_config_line_depth()
1216 charptr = &options->sk_provider; in process_config_line_depth()
1220 charptr = &options->proxy_command; in process_config_line_depth()
1222 if (options->jump_host != NULL) in process_config_line_depth()
1223 charptr = &options->jump_host; /* Skip below */ in process_config_line_depth()
1238 if (parse_jump(s + len, options, *activep) == -1) { in process_config_line_depth()
1253 if (*activep && options->port == -1) in process_config_line_depth()
1254 options->port = value; in process_config_line_depth()
1258 intptr = &options->connection_attempts; in process_config_line_depth()
1276 if (*activep && options->ciphers == NULL) in process_config_line_depth()
1277 options->ciphers = xstrdup(arg); in process_config_line_depth()
1288 if (*activep && options->macs == NULL) in process_config_line_depth()
1289 options->macs = xstrdup(arg); in process_config_line_depth()
1302 if (*activep && options->kex_algorithms == NULL) in process_config_line_depth()
1303 options->kex_algorithms = xstrdup(arg); in process_config_line_depth()
1307 charptr = &options->hostkeyalgorithms; in process_config_line_depth()
1323 charptr = &options->ca_sign_algorithms; in process_config_line_depth()
1327 log_level_ptr = &options->log_level; in process_config_line_depth()
1338 log_facility_ptr = &options->log_facility; in process_config_line_depth()
1382 add_remote_forward(options, &fwd); in process_config_line_depth()
1384 add_local_forward(options, &fwd); in process_config_line_depth()
1390 intptr = &options->clear_forwardings; in process_config_line_depth()
1420 debug("%.200s line %d: Applying options for %.100s", in process_config_line_depth()
1429 value = match_cfg_line(options, &s, pw, host, original_host, in process_config_line_depth()
1439 intptr = &options->escape_char; in process_config_line_depth()
1461 intptr = &options->address_family; in process_config_line_depth()
1466 intptr = &options->enable_ssh_keysign; in process_config_line_depth()
1470 intptr = &options->identities_only; in process_config_line_depth()
1474 intptr = &options->server_alive_interval; in process_config_line_depth()
1478 intptr = &options->server_alive_count_max; in process_config_line_depth()
1490 rm_env(options, arg, filename, linenum); in process_config_line_depth()
1494 if (options->num_send_env >= INT_MAX) in process_config_line_depth()
1497 options->send_env = xrecallocarray( in process_config_line_depth()
1498 options->send_env, options->num_send_env, in process_config_line_depth()
1499 options->num_send_env + 1, in process_config_line_depth()
1500 sizeof(*options->send_env)); in process_config_line_depth()
1501 options->send_env[options->num_send_env++] = in process_config_line_depth()
1508 value = options->num_setenv; in process_config_line_depth()
1516 if (options->num_setenv >= INT_MAX) in process_config_line_depth()
1519 options->setenv = xrecallocarray( in process_config_line_depth()
1520 options->setenv, options->num_setenv, in process_config_line_depth()
1521 options->num_setenv + 1, sizeof(*options->setenv)); in process_config_line_depth()
1522 options->setenv[options->num_setenv++] = xstrdup(arg); in process_config_line_depth()
1527 charptr = &options->control_path; in process_config_line_depth()
1531 intptr = &options->control_master; in process_config_line_depth()
1537 intptr = &options->control_persist; in process_config_line_depth()
1555 options->control_persist_timeout = value2; in process_config_line_depth()
1560 intptr = &options->hash_known_hosts; in process_config_line_depth()
1564 intptr = &options->tun_open; in process_config_line_depth()
1576 options->tun_local = value; in process_config_line_depth()
1577 options->tun_remote = value2; in process_config_line_depth()
1582 charptr = &options->local_command; in process_config_line_depth()
1586 intptr = &options->permit_local_command; in process_config_line_depth()
1590 charptr = &options->remote_command; in process_config_line_depth()
1594 intptr = &options->visual_host_key; in process_config_line_depth()
1637 pw, host, original_host, options, in process_config_line_depth()
1672 options->ip_qos_interactive = value; in process_config_line_depth()
1673 options->ip_qos_bulk = value2; in process_config_line_depth()
1678 intptr = &options->request_tty; in process_config_line_depth()
1683 charptr = &options->ignored_unknown; in process_config_line_depth()
1687 intptr = &options->proxy_use_fdpass; in process_config_line_depth()
1691 value = options->num_canonical_domains != 0; in process_config_line_depth()
1699 if (options->num_canonical_domains >= MAX_CANON_DOMAINS) in process_config_line_depth()
1702 options->canonical_domains[ in process_config_line_depth()
1703 options->num_canonical_domains++] = xstrdup(arg); in process_config_line_depth()
1708 value = options->num_permitted_cnames != 0; in process_config_line_depth()
1726 if (options->num_permitted_cnames >= MAX_CANON_DOMAINS) in process_config_line_depth()
1729 cname = options->permitted_cnames + in process_config_line_depth()
1730 options->num_permitted_cnames++; in process_config_line_depth()
1737 intptr = &options->canonicalize_hostname; in process_config_line_depth()
1742 intptr = &options->canonicalize_max_dots; in process_config_line_depth()
1746 intptr = &options->canonicalize_fallback_local; in process_config_line_depth()
1757 options->fwd_opts.streamlocal_bind_mask = (mode_t)value; in process_config_line_depth()
1761 intptr = &options->fwd_opts.streamlocal_bind_unlink; in process_config_line_depth()
1765 charptr = &options->revoked_host_keys; in process_config_line_depth()
1769 intptr = &options->fingerprint_hash; in process_config_line_depth()
1782 intptr = &options->update_hostkeys; in process_config_line_depth()
1787 charptr = &options->hostbased_key_types; in process_config_line_depth()
1791 charptr = &options->pubkey_key_types; in process_config_line_depth()
1795 intptr = &options->add_keys_to_agent; in process_config_line_depth()
1800 charptr = &options->identity_agent; in process_config_line_depth()
1838 * Reads the config file and modifies the options accordingly. Options
1844 const char *original_host, Options *options, int flags, in read_config_file() argument
1850 options, flags, &active, want_final_pass, 0); in read_config_file()
1856 const char *host, const char *original_host, Options *options, in read_config_file_depth() argument
1884 * Mark that we are now processing the options. This flag is turned in read_config_file_depth()
1891 if (process_config_line_depth(options, pw, host, original_host, in read_config_file_depth()
1899 fatal("%s: terminating, %d bad configuration options", in read_config_file_depth()
1912 * Initializes options to special values that indicate that they have not yet
1913 * been set. Read_config_file will only set options with this value. Options
1919 initialize_options(Options * options) in initialize_options() argument
1921 memset(options, 'X', sizeof(*options)); in initialize_options()
1922 options->forward_agent = -1; in initialize_options()
1923 options->forward_agent_sock_path = NULL; in initialize_options()
1924 options->forward_x11 = -1; in initialize_options()
1925 options->forward_x11_trusted = -1; in initialize_options()
1926 options->forward_x11_timeout = -1; in initialize_options()
1927 options->stdio_forward_host = NULL; in initialize_options()
1928 options->stdio_forward_port = 0; in initialize_options()
1929 options->clear_forwardings = -1; in initialize_options()
1930 options->exit_on_forward_failure = -1; in initialize_options()
1931 options->xauth_location = NULL; in initialize_options()
1932 options->fwd_opts.gateway_ports = -1; in initialize_options()
1933 options->fwd_opts.streamlocal_bind_mask = (mode_t)-1; in initialize_options()
1934 options->fwd_opts.streamlocal_bind_unlink = -1; in initialize_options()
1935 options->pubkey_authentication = -1; in initialize_options()
1936 options->challenge_response_authentication = -1; in initialize_options()
1937 options->gss_authentication = -1; in initialize_options()
1938 options->gss_deleg_creds = -1; in initialize_options()
1939 options->password_authentication = -1; in initialize_options()
1940 options->kbd_interactive_authentication = -1; in initialize_options()
1941 options->kbd_interactive_devices = NULL; in initialize_options()
1942 options->hostbased_authentication = -1; in initialize_options()
1943 options->batch_mode = -1; in initialize_options()
1944 options->check_host_ip = -1; in initialize_options()
1945 options->strict_host_key_checking = -1; in initialize_options()
1946 options->compression = -1; in initialize_options()
1947 options->tcp_keep_alive = -1; in initialize_options()
1948 options->port = -1; in initialize_options()
1949 options->address_family = -1; in initialize_options()
1950 options->connection_attempts = -1; in initialize_options()
1951 options->connection_timeout = -1; in initialize_options()
1952 options->number_of_password_prompts = -1; in initialize_options()
1953 options->ciphers = NULL; in initialize_options()
1954 options->macs = NULL; in initialize_options()
1955 options->kex_algorithms = NULL; in initialize_options()
1956 options->hostkeyalgorithms = NULL; in initialize_options()
1957 options->ca_sign_algorithms = NULL; in initialize_options()
1958 options->num_identity_files = 0; in initialize_options()
1959 options->num_certificate_files = 0; in initialize_options()
1960 options->hostname = NULL; in initialize_options()
1961 options->host_key_alias = NULL; in initialize_options()
1962 options->proxy_command = NULL; in initialize_options()
1963 options->jump_user = NULL; in initialize_options()
1964 options->jump_host = NULL; in initialize_options()
1965 options->jump_port = -1; in initialize_options()
1966 options->jump_extra = NULL; in initialize_options()
1967 options->user = NULL; in initialize_options()
1968 options->escape_char = -1; in initialize_options()
1969 options->num_system_hostfiles = 0; in initialize_options()
1970 options->num_user_hostfiles = 0; in initialize_options()
1971 options->local_forwards = NULL; in initialize_options()
1972 options->num_local_forwards = 0; in initialize_options()
1973 options->remote_forwards = NULL; in initialize_options()
1974 options->num_remote_forwards = 0; in initialize_options()
1975 options->log_facility = SYSLOG_FACILITY_NOT_SET; in initialize_options()
1976 options->log_level = SYSLOG_LEVEL_NOT_SET; in initialize_options()
1977 options->preferred_authentications = NULL; in initialize_options()
1978 options->bind_address = NULL; in initialize_options()
1979 options->bind_interface = NULL; in initialize_options()
1980 options->pkcs11_provider = NULL; in initialize_options()
1981 options->sk_provider = NULL; in initialize_options()
1982 options->enable_ssh_keysign = - 1; in initialize_options()
1983 options->no_host_authentication_for_localhost = - 1; in initialize_options()
1984 options->identities_only = - 1; in initialize_options()
1985 options->rekey_limit = - 1; in initialize_options()
1986 options->rekey_interval = -1; in initialize_options()
1987 options->verify_host_key_dns = -1; in initialize_options()
1988 options->server_alive_interval = -1; in initialize_options()
1989 options->server_alive_count_max = -1; in initialize_options()
1990 options->send_env = NULL; in initialize_options()
1991 options->num_send_env = 0; in initialize_options()
1992 options->setenv = NULL; in initialize_options()
1993 options->num_setenv = 0; in initialize_options()
1994 options->control_path = NULL; in initialize_options()
1995 options->control_master = -1; in initialize_options()
1996 options->control_persist = -1; in initialize_options()
1997 options->control_persist_timeout = 0; in initialize_options()
1998 options->hash_known_hosts = -1; in initialize_options()
1999 options->tun_open = -1; in initialize_options()
2000 options->tun_local = -1; in initialize_options()
2001 options->tun_remote = -1; in initialize_options()
2002 options->local_command = NULL; in initialize_options()
2003 options->permit_local_command = -1; in initialize_options()
2004 options->remote_command = NULL; in initialize_options()
2005 options->add_keys_to_agent = -1; in initialize_options()
2006 options->identity_agent = NULL; in initialize_options()
2007 options->visual_host_key = -1; in initialize_options()
2008 options->ip_qos_interactive = -1; in initialize_options()
2009 options->ip_qos_bulk = -1; in initialize_options()
2010 options->request_tty = -1; in initialize_options()
2011 options->proxy_use_fdpass = -1; in initialize_options()
2012 options->ignored_unknown = NULL; in initialize_options()
2013 options->num_canonical_domains = 0; in initialize_options()
2014 options->num_permitted_cnames = 0; in initialize_options()
2015 options->canonicalize_max_dots = -1; in initialize_options()
2016 options->canonicalize_fallback_local = -1; in initialize_options()
2017 options->canonicalize_hostname = -1; in initialize_options()
2018 options->revoked_host_keys = NULL; in initialize_options()
2019 options->fingerprint_hash = -1; in initialize_options()
2020 options->update_hostkeys = -1; in initialize_options()
2021 options->hostbased_key_types = NULL; in initialize_options()
2022 options->pubkey_key_types = NULL; in initialize_options()
2026 * A petite version of fill_default_options() that just fills the options
2030 fill_default_options_for_canonicalization(Options *options) in fill_default_options_for_canonicalization() argument
2032 if (options->canonicalize_max_dots == -1) in fill_default_options_for_canonicalization()
2033 options->canonicalize_max_dots = 1; in fill_default_options_for_canonicalization()
2034 if (options->canonicalize_fallback_local == -1) in fill_default_options_for_canonicalization()
2035 options->canonicalize_fallback_local = 1; in fill_default_options_for_canonicalization()
2036 if (options->canonicalize_hostname == -1) in fill_default_options_for_canonicalization()
2037 options->canonicalize_hostname = SSH_CANONICALISE_NO; in fill_default_options_for_canonicalization()
2042 * options for which no value has been specified with their default values.
2045 fill_default_options(Options * options) in fill_default_options() argument
2051 if (options->forward_agent == -1) in fill_default_options()
2052 options->forward_agent = 0; in fill_default_options()
2053 if (options->forward_x11 == -1) in fill_default_options()
2054 options->forward_x11 = 0; in fill_default_options()
2055 if (options->forward_x11_trusted == -1) in fill_default_options()
2056 options->forward_x11_trusted = 0; in fill_default_options()
2057 if (options->forward_x11_timeout == -1) in fill_default_options()
2058 options->forward_x11_timeout = 1200; in fill_default_options()
2063 if (options->exit_on_forward_failure == -1) in fill_default_options()
2064 options->exit_on_forward_failure = in fill_default_options()
2065 options->stdio_forward_host != NULL ? 1 : 0; in fill_default_options()
2066 if (options->clear_forwardings == -1) in fill_default_options()
2067 options->clear_forwardings = in fill_default_options()
2068 options->stdio_forward_host != NULL ? 1 : 0; in fill_default_options()
2069 if (options->clear_forwardings == 1) in fill_default_options()
2070 clear_forwardings(options); in fill_default_options()
2072 if (options->xauth_location == NULL) in fill_default_options()
2073 options->xauth_location = _PATH_XAUTH; in fill_default_options()
2074 if (options->fwd_opts.gateway_ports == -1) in fill_default_options()
2075 options->fwd_opts.gateway_ports = 0; in fill_default_options()
2076 if (options->fwd_opts.streamlocal_bind_mask == (mode_t)-1) in fill_default_options()
2077 options->fwd_opts.streamlocal_bind_mask = 0177; in fill_default_options()
2078 if (options->fwd_opts.streamlocal_bind_unlink == -1) in fill_default_options()
2079 options->fwd_opts.streamlocal_bind_unlink = 0; in fill_default_options()
2080 if (options->pubkey_authentication == -1) in fill_default_options()
2081 options->pubkey_authentication = 1; in fill_default_options()
2082 if (options->challenge_response_authentication == -1) in fill_default_options()
2083 options->challenge_response_authentication = 1; in fill_default_options()
2084 if (options->gss_authentication == -1) in fill_default_options()
2085 options->gss_authentication = 0; in fill_default_options()
2086 if (options->gss_deleg_creds == -1) in fill_default_options()
2087 options->gss_deleg_creds = 0; in fill_default_options()
2088 if (options->password_authentication == -1) in fill_default_options()
2089 options->password_authentication = 1; in fill_default_options()
2090 if (options->kbd_interactive_authentication == -1) in fill_default_options()
2091 options->kbd_interactive_authentication = 1; in fill_default_options()
2092 if (options->hostbased_authentication == -1) in fill_default_options()
2093 options->hostbased_authentication = 0; in fill_default_options()
2094 if (options->batch_mode == -1) in fill_default_options()
2095 options->batch_mode = 0; in fill_default_options()
2096 if (options->check_host_ip == -1) in fill_default_options()
2097 options->check_host_ip = 1; in fill_default_options()
2098 if (options->strict_host_key_checking == -1) in fill_default_options()
2099 options->strict_host_key_checking = SSH_STRICT_HOSTKEY_ASK; in fill_default_options()
2100 if (options->compression == -1) in fill_default_options()
2101 options->compression = 0; in fill_default_options()
2102 if (options->tcp_keep_alive == -1) in fill_default_options()
2103 options->tcp_keep_alive = 1; in fill_default_options()
2104 if (options->port == -1) in fill_default_options()
2105 options->port = 0; /* Filled in ssh_connect. */ in fill_default_options()
2106 if (options->address_family == -1) in fill_default_options()
2107 options->address_family = AF_UNSPEC; in fill_default_options()
2108 if (options->connection_attempts == -1) in fill_default_options()
2109 options->connection_attempts = 1; in fill_default_options()
2110 if (options->number_of_password_prompts == -1) in fill_default_options()
2111 options->number_of_password_prompts = 3; in fill_default_options()
2112 /* options->hostkeyalgorithms, default set in myproposals.h */ in fill_default_options()
2113 if (options->add_keys_to_agent == -1) in fill_default_options()
2114 options->add_keys_to_agent = 0; in fill_default_options()
2115 if (options->num_identity_files == 0) { in fill_default_options()
2116 add_identity_file(options, "~/", _PATH_SSH_CLIENT_ID_RSA, 0); in fill_default_options()
2117 add_identity_file(options, "~/", _PATH_SSH_CLIENT_ID_DSA, 0); in fill_default_options()
2119 add_identity_file(options, "~/", _PATH_SSH_CLIENT_ID_ECDSA, 0); in fill_default_options()
2120 add_identity_file(options, "~/", in fill_default_options()
2123 add_identity_file(options, "~/", in fill_default_options()
2125 add_identity_file(options, "~/", in fill_default_options()
2127 add_identity_file(options, "~/", _PATH_SSH_CLIENT_ID_XMSS, 0); in fill_default_options()
2129 if (options->escape_char == -1) in fill_default_options()
2130 options->escape_char = '~'; in fill_default_options()
2131 if (options->num_system_hostfiles == 0) { in fill_default_options()
2132 options->system_hostfiles[options->num_system_hostfiles++] = in fill_default_options()
2134 options->system_hostfiles[options->num_system_hostfiles++] = in fill_default_options()
2137 if (options->update_hostkeys == -1) in fill_default_options()
2138 options->update_hostkeys = SSH_UPDATE_HOSTKEYS_NO; in fill_default_options()
2139 if (options->num_user_hostfiles == 0) { in fill_default_options()
2140 options->user_hostfiles[options->num_user_hostfiles++] = in fill_default_options()
2142 options->user_hostfiles[options->num_user_hostfiles++] = in fill_default_options()
2145 if (options->log_level == SYSLOG_LEVEL_NOT_SET) in fill_default_options()
2146 options->log_level = SYSLOG_LEVEL_INFO; in fill_default_options()
2147 if (options->log_facility == SYSLOG_FACILITY_NOT_SET) in fill_default_options()
2148 options->log_facility = SYSLOG_FACILITY_USER; in fill_default_options()
2149 if (options->no_host_authentication_for_localhost == - 1) in fill_default_options()
2150 options->no_host_authentication_for_localhost = 0; in fill_default_options()
2151 if (options->identities_only == -1) in fill_default_options()
2152 options->identities_only = 0; in fill_default_options()
2153 if (options->enable_ssh_keysign == -1) in fill_default_options()
2154 options->enable_ssh_keysign = 0; in fill_default_options()
2155 if (options->rekey_limit == -1) in fill_default_options()
2156 options->rekey_limit = 0; in fill_default_options()
2157 if (options->rekey_interval == -1) in fill_default_options()
2158 options->rekey_interval = 0; in fill_default_options()
2159 if (options->verify_host_key_dns == -1) in fill_default_options()
2160 options->verify_host_key_dns = 0; in fill_default_options()
2161 if (options->server_alive_interval == -1) in fill_default_options()
2162 options->server_alive_interval = 0; in fill_default_options()
2163 if (options->server_alive_count_max == -1) in fill_default_options()
2164 options->server_alive_count_max = 3; in fill_default_options()
2165 if (options->control_master == -1) in fill_default_options()
2166 options->control_master = 0; in fill_default_options()
2167 if (options->control_persist == -1) { in fill_default_options()
2168 options->control_persist = 0; in fill_default_options()
2169 options->control_persist_timeout = 0; in fill_default_options()
2171 if (options->hash_known_hosts == -1) in fill_default_options()
2172 options->hash_known_hosts = 0; in fill_default_options()
2173 if (options->tun_open == -1) in fill_default_options()
2174 options->tun_open = SSH_TUNMODE_NO; in fill_default_options()
2175 if (options->tun_local == -1) in fill_default_options()
2176 options->tun_local = SSH_TUNID_ANY; in fill_default_options()
2177 if (options->tun_remote == -1) in fill_default_options()
2178 options->tun_remote = SSH_TUNID_ANY; in fill_default_options()
2179 if (options->permit_local_command == -1) in fill_default_options()
2180 options->permit_local_command = 0; in fill_default_options()
2181 if (options->visual_host_key == -1) in fill_default_options()
2182 options->visual_host_key = 0; in fill_default_options()
2183 if (options->ip_qos_interactive == -1) in fill_default_options()
2184 options->ip_qos_interactive = IPTOS_DSCP_AF21; in fill_default_options()
2185 if (options->ip_qos_bulk == -1) in fill_default_options()
2186 options->ip_qos_bulk = IPTOS_DSCP_CS1; in fill_default_options()
2187 if (options->request_tty == -1) in fill_default_options()
2188 options->request_tty = REQUEST_TTY_AUTO; in fill_default_options()
2189 if (options->proxy_use_fdpass == -1) in fill_default_options()
2190 options->proxy_use_fdpass = 0; in fill_default_options()
2191 if (options->canonicalize_max_dots == -1) in fill_default_options()
2192 options->canonicalize_max_dots = 1; in fill_default_options()
2193 if (options->canonicalize_fallback_local == -1) in fill_default_options()
2194 options->canonicalize_fallback_local = 1; in fill_default_options()
2195 if (options->canonicalize_hostname == -1) in fill_default_options()
2196 options->canonicalize_hostname = SSH_CANONICALISE_NO; in fill_default_options()
2197 if (options->fingerprint_hash == -1) in fill_default_options()
2198 options->fingerprint_hash = SSH_FP_HASH_DEFAULT; in fill_default_options()
2200 if (options->sk_provider == NULL) in fill_default_options()
2201 options->sk_provider = xstrdup("internal"); in fill_default_options()
2203 if (options->sk_provider == NULL) in fill_default_options()
2204 options->sk_provider = xstrdup("$SSH_SK_PROVIDER"); in fill_default_options()
2221 if ((r = kex_assemble_names(&options->what, \ in fill_default_options()
2250 CLEAR_ON_NONE(options->local_command); in fill_default_options()
2251 CLEAR_ON_NONE(options->remote_command); in fill_default_options()
2252 CLEAR_ON_NONE(options->proxy_command); in fill_default_options()
2253 CLEAR_ON_NONE(options->control_path); in fill_default_options()
2254 CLEAR_ON_NONE(options->revoked_host_keys); in fill_default_options()
2255 CLEAR_ON_NONE(options->pkcs11_provider); in fill_default_options()
2256 CLEAR_ON_NONE(options->sk_provider); in fill_default_options()
2257 if (options->jump_host != NULL && in fill_default_options()
2258 strcmp(options->jump_host, "none") == 0 && in fill_default_options()
2259 options->jump_port == 0 && options->jump_user == NULL) { in fill_default_options()
2260 free(options->jump_host); in fill_default_options()
2261 options->jump_host = NULL; in fill_default_options()
2263 /* options->identity_agent distinguishes NULL from 'none' */ in fill_default_options()
2264 /* options->user will be set in the main program if appropriate */ in fill_default_options()
2265 /* options->hostname will be set in the main program if appropriate */ in fill_default_options()
2266 /* options->host_key_alias should not be set by default */ in fill_default_options()
2267 /* options->preferred_authentications will be set in ssh */ in fill_default_options()
2480 parse_jump(const char *s, Options *o, int active) in parse_jump()
2688 dump_client_config(Options *o, const char *host) in dump_client_config()
2705 /* Most interesting options first: user, host, port */ in dump_client_config()
2710 /* Flag options */ in dump_client_config()
2749 /* Integer options */ in dump_client_config()
2757 /* String options */ in dump_client_config()
2788 /* String array options */ in dump_client_config()