Lines Matching refs:options
134 const char *host, const char *original_host, Options *options,
136 static int process_config_line_depth(Options *options, struct passwd *pw,
321 add_local_forward(Options *options, const struct Forward *newfwd) in add_local_forward() argument
331 for (i = 0; i < options->num_local_forwards; i++) { in add_local_forward()
332 if (forward_equals(newfwd, options->local_forwards + i)) in add_local_forward()
335 options->local_forwards = xreallocarray(options->local_forwards, in add_local_forward()
336 options->num_local_forwards + 1, in add_local_forward()
337 sizeof(*options->local_forwards)); in add_local_forward()
338 fwd = &options->local_forwards[options->num_local_forwards++]; in add_local_forward()
354 add_remote_forward(Options *options, const struct Forward *newfwd) in add_remote_forward() argument
360 for (i = 0; i < options->num_remote_forwards; i++) { in add_remote_forward()
361 if (forward_equals(newfwd, options->remote_forwards + i)) in add_remote_forward()
364 options->remote_forwards = xreallocarray(options->remote_forwards, in add_remote_forward()
365 options->num_remote_forwards + 1, in add_remote_forward()
366 sizeof(*options->remote_forwards)); in add_remote_forward()
367 fwd = &options->remote_forwards[options->num_remote_forwards++]; in add_remote_forward()
380 clear_forwardings(Options *options) in clear_forwardings() argument
384 for (i = 0; i < options->num_local_forwards; i++) { in clear_forwardings()
385 free(options->local_forwards[i].listen_host); in clear_forwardings()
386 free(options->local_forwards[i].listen_path); in clear_forwardings()
387 free(options->local_forwards[i].connect_host); in clear_forwardings()
388 free(options->local_forwards[i].connect_path); in clear_forwardings()
390 if (options->num_local_forwards > 0) { in clear_forwardings()
391 free(options->local_forwards); in clear_forwardings()
392 options->local_forwards = NULL; in clear_forwardings()
394 options->num_local_forwards = 0; in clear_forwardings()
395 for (i = 0; i < options->num_remote_forwards; i++) { in clear_forwardings()
396 free(options->remote_forwards[i].listen_host); in clear_forwardings()
397 free(options->remote_forwards[i].listen_path); in clear_forwardings()
398 free(options->remote_forwards[i].connect_host); in clear_forwardings()
399 free(options->remote_forwards[i].connect_path); in clear_forwardings()
401 if (options->num_remote_forwards > 0) { in clear_forwardings()
402 free(options->remote_forwards); in clear_forwardings()
403 options->remote_forwards = NULL; in clear_forwardings()
405 options->num_remote_forwards = 0; in clear_forwardings()
406 options->tun_open = SSH_TUNMODE_NO; in clear_forwardings()
410 add_certificate_file(Options *options, const char *path, int userprovided) in add_certificate_file() argument
414 if (options->num_certificate_files >= SSH_MAX_CERTIFICATE_FILES) in add_certificate_file()
419 for (i = 0; i < options->num_certificate_files; i++) { in add_certificate_file()
420 if (options->certificate_file_userprovided[i] == userprovided && in add_certificate_file()
421 strcmp(options->certificate_files[i], path) == 0) { in add_certificate_file()
427 options->certificate_file_userprovided[options->num_certificate_files] = in add_certificate_file()
429 options->certificate_files[options->num_certificate_files++] = in add_certificate_file()
434 add_identity_file(Options *options, const char *dir, const char *filename, in add_identity_file() argument
440 if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES) in add_identity_file()
450 for (i = 0; i < options->num_identity_files; i++) { in add_identity_file()
451 if (options->identity_file_userprovided[i] == userprovided && in add_identity_file()
452 strcmp(options->identity_files[i], path) == 0) { in add_identity_file()
459 options->identity_file_userprovided[options->num_identity_files] = in add_identity_file()
461 options->identity_files[options->num_identity_files++] = path; in add_identity_file()
548 match_cfg_line(Options *options, char **condition, struct passwd *pw, in match_cfg_line() argument
561 port = options->port <= 0 ? default_ssh_port() : options->port; in match_cfg_line()
562 ruser = options->user == NULL ? pw->pw_name : options->user; in match_cfg_line()
564 host = xstrdup(options->hostname); in match_cfg_line()
565 } else if (options->hostname != NULL) { in match_cfg_line()
567 host = percent_expand(options->hostname, in match_cfg_line()
814 process_config_line(Options *options, struct passwd *pw, const char *host, in process_config_line() argument
818 return process_config_line_depth(options, pw, host, original_host, in process_config_line()
824 process_config_line_depth(Options *options, struct passwd *pw, const char *host, in process_config_line_depth() argument
867 options->ignored_unknown); in process_config_line_depth()
878 intptr = &options->connection_timeout; in process_config_line_depth()
894 intptr = &options->forward_agent; in process_config_line_depth()
917 intptr = &options->forward_x11; in process_config_line_depth()
921 intptr = &options->forward_x11_trusted; in process_config_line_depth()
925 intptr = &options->forward_x11_timeout; in process_config_line_depth()
929 intptr = &options->fwd_opts.gateway_ports; in process_config_line_depth()
933 intptr = &options->exit_on_forward_failure; in process_config_line_depth()
937 intptr = &options->use_privileged_port; in process_config_line_depth()
941 intptr = &options->password_authentication; in process_config_line_depth()
945 intptr = &options->kbd_interactive_authentication; in process_config_line_depth()
949 charptr = &options->kbd_interactive_devices; in process_config_line_depth()
953 intptr = &options->pubkey_authentication; in process_config_line_depth()
957 intptr = &options->rsa_authentication; in process_config_line_depth()
961 intptr = &options->rhosts_rsa_authentication; in process_config_line_depth()
965 intptr = &options->hostbased_authentication; in process_config_line_depth()
969 intptr = &options->challenge_response_authentication; in process_config_line_depth()
973 intptr = &options->gss_authentication; in process_config_line_depth()
977 intptr = &options->gss_deleg_creds; in process_config_line_depth()
981 intptr = &options->batch_mode; in process_config_line_depth()
985 intptr = &options->check_host_ip; in process_config_line_depth()
989 intptr = &options->verify_host_key_dns; in process_config_line_depth()
994 intptr = &options->strict_host_key_checking; in process_config_line_depth()
999 intptr = &options->compression; in process_config_line_depth()
1003 intptr = &options->tcp_keep_alive; in process_config_line_depth()
1007 intptr = &options->no_host_authentication_for_localhost; in process_config_line_depth()
1011 intptr = &options->number_of_password_prompts; in process_config_line_depth()
1015 intptr = &options->compression_level; in process_config_line_depth()
1033 if (*activep && options->rekey_limit == -1) in process_config_line_depth()
1034 options->rekey_limit = val64; in process_config_line_depth()
1040 intptr = &options->rekey_interval; in process_config_line_depth()
1050 intptr = &options->num_identity_files; in process_config_line_depth()
1054 add_identity_file(options, NULL, in process_config_line_depth()
1065 intptr = &options->num_certificate_files; in process_config_line_depth()
1072 add_certificate_file(options, arg, in process_config_line_depth()
1078 charptr=&options->xauth_location; in process_config_line_depth()
1082 charptr = &options->user; in process_config_line_depth()
1093 cpptr = (char **)&options->system_hostfiles; in process_config_line_depth()
1094 uintptr = &options->num_system_hostfiles; in process_config_line_depth()
1109 cpptr = (char **)&options->user_hostfiles; in process_config_line_depth()
1110 uintptr = &options->num_user_hostfiles; in process_config_line_depth()
1115 charptr = &options->hostname; in process_config_line_depth()
1119 charptr = &options->host_key_alias; in process_config_line_depth()
1123 charptr = &options->preferred_authentications; in process_config_line_depth()
1127 charptr = &options->bind_address; in process_config_line_depth()
1131 charptr = &options->pkcs11_provider; in process_config_line_depth()
1135 charptr = &options->proxy_command; in process_config_line_depth()
1137 if (options->jump_host != NULL) in process_config_line_depth()
1138 charptr = &options->jump_host; /* Skip below */ in process_config_line_depth()
1153 if (parse_jump(s + len, options, *activep) == -1) { in process_config_line_depth()
1160 intptr = &options->port; in process_config_line_depth()
1177 intptr = &options->connection_attempts; in process_config_line_depth()
1181 intptr = &options->cipher; in process_config_line_depth()
1200 if (*activep && options->ciphers == NULL) in process_config_line_depth()
1201 options->ciphers = xstrdup(arg); in process_config_line_depth()
1211 if (*activep && options->macs == NULL) in process_config_line_depth()
1212 options->macs = xstrdup(arg); in process_config_line_depth()
1224 if (*activep && options->kex_algorithms == NULL) in process_config_line_depth()
1225 options->kex_algorithms = xstrdup(arg); in process_config_line_depth()
1229 charptr = &options->hostkeyalgorithms; in process_config_line_depth()
1244 intptr = &options->protocol; in process_config_line_depth()
1257 log_level_ptr = &options->log_level; in process_config_line_depth()
1297 add_local_forward(options, &fwd); in process_config_line_depth()
1299 add_remote_forward(options, &fwd); in process_config_line_depth()
1304 intptr = &options->clear_forwardings; in process_config_line_depth()
1343 value = match_cfg_line(options, &s, pw, host, original_host, in process_config_line_depth()
1352 intptr = &options->escape_char; in process_config_line_depth()
1374 intptr = &options->address_family; in process_config_line_depth()
1379 intptr = &options->enable_ssh_keysign; in process_config_line_depth()
1383 intptr = &options->identities_only; in process_config_line_depth()
1387 intptr = &options->server_alive_interval; in process_config_line_depth()
1391 intptr = &options->server_alive_count_max; in process_config_line_depth()
1401 if (options->num_send_env >= MAX_SEND_ENV) in process_config_line_depth()
1404 options->send_env[options->num_send_env++] = in process_config_line_depth()
1410 charptr = &options->control_path; in process_config_line_depth()
1414 intptr = &options->control_master; in process_config_line_depth()
1420 intptr = &options->control_persist; in process_config_line_depth()
1438 options->control_persist_timeout = value2; in process_config_line_depth()
1443 intptr = &options->hash_known_hosts; in process_config_line_depth()
1447 intptr = &options->tun_open; in process_config_line_depth()
1459 options->tun_local = value; in process_config_line_depth()
1460 options->tun_remote = value2; in process_config_line_depth()
1465 charptr = &options->local_command; in process_config_line_depth()
1469 intptr = &options->permit_local_command; in process_config_line_depth()
1473 intptr = &options->visual_host_key; in process_config_line_depth()
1516 pw, host, original_host, options, in process_config_line_depth()
1551 options->ip_qos_interactive = value; in process_config_line_depth()
1552 options->ip_qos_bulk = value2; in process_config_line_depth()
1557 intptr = &options->request_tty; in process_config_line_depth()
1562 charptr = &options->ignored_unknown; in process_config_line_depth()
1566 intptr = &options->proxy_use_fdpass; in process_config_line_depth()
1570 value = options->num_canonical_domains != 0; in process_config_line_depth()
1575 if (options->num_canonical_domains >= MAX_CANON_DOMAINS) in process_config_line_depth()
1578 options->canonical_domains[ in process_config_line_depth()
1579 options->num_canonical_domains++] = xstrdup(arg); in process_config_line_depth()
1584 value = options->num_permitted_cnames != 0; in process_config_line_depth()
1602 if (options->num_permitted_cnames >= MAX_CANON_DOMAINS) in process_config_line_depth()
1605 cname = options->permitted_cnames + in process_config_line_depth()
1606 options->num_permitted_cnames++; in process_config_line_depth()
1613 intptr = &options->canonicalize_hostname; in process_config_line_depth()
1618 intptr = &options->canonicalize_max_dots; in process_config_line_depth()
1622 intptr = &options->canonicalize_fallback_local; in process_config_line_depth()
1633 options->fwd_opts.streamlocal_bind_mask = (mode_t)value; in process_config_line_depth()
1637 intptr = &options->fwd_opts.streamlocal_bind_unlink; in process_config_line_depth()
1641 charptr = &options->revoked_host_keys; in process_config_line_depth()
1645 intptr = &options->fingerprint_hash; in process_config_line_depth()
1658 intptr = &options->update_hostkeys; in process_config_line_depth()
1663 charptr = &options->hostbased_key_types; in process_config_line_depth()
1667 charptr = &options->pubkey_key_types; in process_config_line_depth()
1671 intptr = &options->add_keys_to_agent; in process_config_line_depth()
1676 charptr = &options->identity_agent; in process_config_line_depth()
1708 const char *original_host, Options *options, int flags) in read_config_file() argument
1713 options, flags, &active, 0); in read_config_file()
1719 const char *host, const char *original_host, Options *options, in read_config_file_depth() argument
1755 if (process_config_line_depth(options, pw, host, original_host, in read_config_file_depth()
1781 initialize_options(Options * options) in initialize_options() argument
1783 memset(options, 'X', sizeof(*options)); in initialize_options()
1784 options->forward_agent = -1; in initialize_options()
1785 options->forward_x11 = -1; in initialize_options()
1786 options->forward_x11_trusted = -1; in initialize_options()
1787 options->forward_x11_timeout = -1; in initialize_options()
1788 options->stdio_forward_host = NULL; in initialize_options()
1789 options->stdio_forward_port = 0; in initialize_options()
1790 options->clear_forwardings = -1; in initialize_options()
1791 options->exit_on_forward_failure = -1; in initialize_options()
1792 options->xauth_location = NULL; in initialize_options()
1793 options->fwd_opts.gateway_ports = -1; in initialize_options()
1794 options->fwd_opts.streamlocal_bind_mask = (mode_t)-1; in initialize_options()
1795 options->fwd_opts.streamlocal_bind_unlink = -1; in initialize_options()
1796 options->use_privileged_port = -1; in initialize_options()
1797 options->rsa_authentication = -1; in initialize_options()
1798 options->pubkey_authentication = -1; in initialize_options()
1799 options->challenge_response_authentication = -1; in initialize_options()
1800 options->gss_authentication = -1; in initialize_options()
1801 options->gss_deleg_creds = -1; in initialize_options()
1802 options->password_authentication = -1; in initialize_options()
1803 options->kbd_interactive_authentication = -1; in initialize_options()
1804 options->kbd_interactive_devices = NULL; in initialize_options()
1805 options->rhosts_rsa_authentication = -1; in initialize_options()
1806 options->hostbased_authentication = -1; in initialize_options()
1807 options->batch_mode = -1; in initialize_options()
1808 options->check_host_ip = -1; in initialize_options()
1809 options->strict_host_key_checking = -1; in initialize_options()
1810 options->compression = -1; in initialize_options()
1811 options->tcp_keep_alive = -1; in initialize_options()
1812 options->compression_level = -1; in initialize_options()
1813 options->port = -1; in initialize_options()
1814 options->address_family = -1; in initialize_options()
1815 options->connection_attempts = -1; in initialize_options()
1816 options->connection_timeout = -1; in initialize_options()
1817 options->number_of_password_prompts = -1; in initialize_options()
1818 options->cipher = -1; in initialize_options()
1819 options->ciphers = NULL; in initialize_options()
1820 options->macs = NULL; in initialize_options()
1821 options->kex_algorithms = NULL; in initialize_options()
1822 options->hostkeyalgorithms = NULL; in initialize_options()
1823 options->protocol = SSH_PROTO_UNKNOWN; in initialize_options()
1824 options->num_identity_files = 0; in initialize_options()
1825 options->num_certificate_files = 0; in initialize_options()
1826 options->hostname = NULL; in initialize_options()
1827 options->host_key_alias = NULL; in initialize_options()
1828 options->proxy_command = NULL; in initialize_options()
1829 options->jump_user = NULL; in initialize_options()
1830 options->jump_host = NULL; in initialize_options()
1831 options->jump_port = -1; in initialize_options()
1832 options->jump_extra = NULL; in initialize_options()
1833 options->user = NULL; in initialize_options()
1834 options->escape_char = -1; in initialize_options()
1835 options->num_system_hostfiles = 0; in initialize_options()
1836 options->num_user_hostfiles = 0; in initialize_options()
1837 options->local_forwards = NULL; in initialize_options()
1838 options->num_local_forwards = 0; in initialize_options()
1839 options->remote_forwards = NULL; in initialize_options()
1840 options->num_remote_forwards = 0; in initialize_options()
1841 options->log_level = SYSLOG_LEVEL_NOT_SET; in initialize_options()
1842 options->preferred_authentications = NULL; in initialize_options()
1843 options->bind_address = NULL; in initialize_options()
1844 options->pkcs11_provider = NULL; in initialize_options()
1845 options->enable_ssh_keysign = - 1; in initialize_options()
1846 options->no_host_authentication_for_localhost = - 1; in initialize_options()
1847 options->identities_only = - 1; in initialize_options()
1848 options->rekey_limit = - 1; in initialize_options()
1849 options->rekey_interval = -1; in initialize_options()
1850 options->verify_host_key_dns = -1; in initialize_options()
1851 options->server_alive_interval = -1; in initialize_options()
1852 options->server_alive_count_max = -1; in initialize_options()
1853 options->num_send_env = 0; in initialize_options()
1854 options->control_path = NULL; in initialize_options()
1855 options->control_master = -1; in initialize_options()
1856 options->control_persist = -1; in initialize_options()
1857 options->control_persist_timeout = 0; in initialize_options()
1858 options->hash_known_hosts = -1; in initialize_options()
1859 options->tun_open = -1; in initialize_options()
1860 options->tun_local = -1; in initialize_options()
1861 options->tun_remote = -1; in initialize_options()
1862 options->local_command = NULL; in initialize_options()
1863 options->permit_local_command = -1; in initialize_options()
1864 options->add_keys_to_agent = -1; in initialize_options()
1865 options->identity_agent = NULL; in initialize_options()
1866 options->visual_host_key = -1; in initialize_options()
1867 options->ip_qos_interactive = -1; in initialize_options()
1868 options->ip_qos_bulk = -1; in initialize_options()
1869 options->request_tty = -1; in initialize_options()
1870 options->proxy_use_fdpass = -1; in initialize_options()
1871 options->ignored_unknown = NULL; in initialize_options()
1872 options->num_canonical_domains = 0; in initialize_options()
1873 options->num_permitted_cnames = 0; in initialize_options()
1874 options->canonicalize_max_dots = -1; in initialize_options()
1875 options->canonicalize_fallback_local = -1; in initialize_options()
1876 options->canonicalize_hostname = -1; in initialize_options()
1877 options->revoked_host_keys = NULL; in initialize_options()
1878 options->fingerprint_hash = -1; in initialize_options()
1879 options->update_hostkeys = -1; in initialize_options()
1880 options->hostbased_key_types = NULL; in initialize_options()
1881 options->pubkey_key_types = NULL; in initialize_options()
1889 fill_default_options_for_canonicalization(Options *options) in fill_default_options_for_canonicalization() argument
1891 if (options->canonicalize_max_dots == -1) in fill_default_options_for_canonicalization()
1892 options->canonicalize_max_dots = 1; in fill_default_options_for_canonicalization()
1893 if (options->canonicalize_fallback_local == -1) in fill_default_options_for_canonicalization()
1894 options->canonicalize_fallback_local = 1; in fill_default_options_for_canonicalization()
1895 if (options->canonicalize_hostname == -1) in fill_default_options_for_canonicalization()
1896 options->canonicalize_hostname = SSH_CANONICALISE_NO; in fill_default_options_for_canonicalization()
1904 fill_default_options(Options * options) in fill_default_options() argument
1906 if (options->forward_agent == -1) in fill_default_options()
1907 options->forward_agent = 0; in fill_default_options()
1908 if (options->forward_x11 == -1) in fill_default_options()
1909 options->forward_x11 = 0; in fill_default_options()
1910 if (options->forward_x11_trusted == -1) in fill_default_options()
1911 options->forward_x11_trusted = 0; in fill_default_options()
1912 if (options->forward_x11_timeout == -1) in fill_default_options()
1913 options->forward_x11_timeout = 1200; in fill_default_options()
1918 if (options->exit_on_forward_failure == -1) in fill_default_options()
1919 options->exit_on_forward_failure = in fill_default_options()
1920 options->stdio_forward_host != NULL ? 1 : 0; in fill_default_options()
1921 if (options->clear_forwardings == -1) in fill_default_options()
1922 options->clear_forwardings = in fill_default_options()
1923 options->stdio_forward_host != NULL ? 1 : 0; in fill_default_options()
1924 if (options->clear_forwardings == 1) in fill_default_options()
1925 clear_forwardings(options); in fill_default_options()
1927 if (options->xauth_location == NULL) in fill_default_options()
1928 options->xauth_location = _PATH_XAUTH; in fill_default_options()
1929 if (options->fwd_opts.gateway_ports == -1) in fill_default_options()
1930 options->fwd_opts.gateway_ports = 0; in fill_default_options()
1931 if (options->fwd_opts.streamlocal_bind_mask == (mode_t)-1) in fill_default_options()
1932 options->fwd_opts.streamlocal_bind_mask = 0177; in fill_default_options()
1933 if (options->fwd_opts.streamlocal_bind_unlink == -1) in fill_default_options()
1934 options->fwd_opts.streamlocal_bind_unlink = 0; in fill_default_options()
1935 if (options->use_privileged_port == -1) in fill_default_options()
1936 options->use_privileged_port = 0; in fill_default_options()
1937 if (options->rsa_authentication == -1) in fill_default_options()
1938 options->rsa_authentication = 1; in fill_default_options()
1939 if (options->pubkey_authentication == -1) in fill_default_options()
1940 options->pubkey_authentication = 1; in fill_default_options()
1941 if (options->challenge_response_authentication == -1) in fill_default_options()
1942 options->challenge_response_authentication = 1; in fill_default_options()
1943 if (options->gss_authentication == -1) in fill_default_options()
1944 options->gss_authentication = 0; in fill_default_options()
1945 if (options->gss_deleg_creds == -1) in fill_default_options()
1946 options->gss_deleg_creds = 0; in fill_default_options()
1947 if (options->password_authentication == -1) in fill_default_options()
1948 options->password_authentication = 1; in fill_default_options()
1949 if (options->kbd_interactive_authentication == -1) in fill_default_options()
1950 options->kbd_interactive_authentication = 1; in fill_default_options()
1951 if (options->rhosts_rsa_authentication == -1) in fill_default_options()
1952 options->rhosts_rsa_authentication = 0; in fill_default_options()
1953 if (options->hostbased_authentication == -1) in fill_default_options()
1954 options->hostbased_authentication = 0; in fill_default_options()
1955 if (options->batch_mode == -1) in fill_default_options()
1956 options->batch_mode = 0; in fill_default_options()
1957 if (options->check_host_ip == -1) in fill_default_options()
1958 options->check_host_ip = 1; in fill_default_options()
1959 if (options->strict_host_key_checking == -1) in fill_default_options()
1960 options->strict_host_key_checking = 2; /* 2 is default */ in fill_default_options()
1961 if (options->compression == -1) in fill_default_options()
1962 options->compression = 0; in fill_default_options()
1963 if (options->tcp_keep_alive == -1) in fill_default_options()
1964 options->tcp_keep_alive = 1; in fill_default_options()
1965 if (options->compression_level == -1) in fill_default_options()
1966 options->compression_level = 6; in fill_default_options()
1967 if (options->port == -1) in fill_default_options()
1968 options->port = 0; /* Filled in ssh_connect. */ in fill_default_options()
1969 if (options->address_family == -1) in fill_default_options()
1970 options->address_family = AF_UNSPEC; in fill_default_options()
1971 if (options->connection_attempts == -1) in fill_default_options()
1972 options->connection_attempts = 1; in fill_default_options()
1973 if (options->number_of_password_prompts == -1) in fill_default_options()
1974 options->number_of_password_prompts = 3; in fill_default_options()
1976 if (options->cipher == -1) in fill_default_options()
1977 options->cipher = SSH_CIPHER_NOT_SET; in fill_default_options()
1979 if (options->protocol == SSH_PROTO_UNKNOWN) in fill_default_options()
1980 options->protocol = SSH_PROTO_2; in fill_default_options()
1981 if (options->add_keys_to_agent == -1) in fill_default_options()
1982 options->add_keys_to_agent = 0; in fill_default_options()
1983 if (options->num_identity_files == 0) { in fill_default_options()
1984 if (options->protocol & SSH_PROTO_1) { in fill_default_options()
1985 add_identity_file(options, "~/", in fill_default_options()
1988 if (options->protocol & SSH_PROTO_2) { in fill_default_options()
1989 add_identity_file(options, "~/", in fill_default_options()
1991 add_identity_file(options, "~/", in fill_default_options()
1994 add_identity_file(options, "~/", in fill_default_options()
1997 add_identity_file(options, "~/", in fill_default_options()
2001 if (options->escape_char == -1) in fill_default_options()
2002 options->escape_char = '~'; in fill_default_options()
2003 if (options->num_system_hostfiles == 0) { in fill_default_options()
2004 options->system_hostfiles[options->num_system_hostfiles++] = in fill_default_options()
2006 options->system_hostfiles[options->num_system_hostfiles++] = in fill_default_options()
2009 if (options->num_user_hostfiles == 0) { in fill_default_options()
2010 options->user_hostfiles[options->num_user_hostfiles++] = in fill_default_options()
2012 options->user_hostfiles[options->num_user_hostfiles++] = in fill_default_options()
2015 if (options->log_level == SYSLOG_LEVEL_NOT_SET) in fill_default_options()
2016 options->log_level = SYSLOG_LEVEL_INFO; in fill_default_options()
2017 if (options->no_host_authentication_for_localhost == - 1) in fill_default_options()
2018 options->no_host_authentication_for_localhost = 0; in fill_default_options()
2019 if (options->identities_only == -1) in fill_default_options()
2020 options->identities_only = 0; in fill_default_options()
2021 if (options->enable_ssh_keysign == -1) in fill_default_options()
2022 options->enable_ssh_keysign = 0; in fill_default_options()
2023 if (options->rekey_limit == -1) in fill_default_options()
2024 options->rekey_limit = 0; in fill_default_options()
2025 if (options->rekey_interval == -1) in fill_default_options()
2026 options->rekey_interval = 0; in fill_default_options()
2027 if (options->verify_host_key_dns == -1) in fill_default_options()
2028 options->verify_host_key_dns = 0; in fill_default_options()
2029 if (options->server_alive_interval == -1) in fill_default_options()
2030 options->server_alive_interval = 0; in fill_default_options()
2031 if (options->server_alive_count_max == -1) in fill_default_options()
2032 options->server_alive_count_max = 3; in fill_default_options()
2033 if (options->control_master == -1) in fill_default_options()
2034 options->control_master = 0; in fill_default_options()
2035 if (options->control_persist == -1) { in fill_default_options()
2036 options->control_persist = 0; in fill_default_options()
2037 options->control_persist_timeout = 0; in fill_default_options()
2039 if (options->hash_known_hosts == -1) in fill_default_options()
2040 options->hash_known_hosts = 0; in fill_default_options()
2041 if (options->tun_open == -1) in fill_default_options()
2042 options->tun_open = SSH_TUNMODE_NO; in fill_default_options()
2043 if (options->tun_local == -1) in fill_default_options()
2044 options->tun_local = SSH_TUNID_ANY; in fill_default_options()
2045 if (options->tun_remote == -1) in fill_default_options()
2046 options->tun_remote = SSH_TUNID_ANY; in fill_default_options()
2047 if (options->permit_local_command == -1) in fill_default_options()
2048 options->permit_local_command = 0; in fill_default_options()
2049 if (options->visual_host_key == -1) in fill_default_options()
2050 options->visual_host_key = 0; in fill_default_options()
2051 if (options->ip_qos_interactive == -1) in fill_default_options()
2052 options->ip_qos_interactive = IPTOS_LOWDELAY; in fill_default_options()
2053 if (options->ip_qos_bulk == -1) in fill_default_options()
2054 options->ip_qos_bulk = IPTOS_THROUGHPUT; in fill_default_options()
2055 if (options->request_tty == -1) in fill_default_options()
2056 options->request_tty = REQUEST_TTY_AUTO; in fill_default_options()
2057 if (options->proxy_use_fdpass == -1) in fill_default_options()
2058 options->proxy_use_fdpass = 0; in fill_default_options()
2059 if (options->canonicalize_max_dots == -1) in fill_default_options()
2060 options->canonicalize_max_dots = 1; in fill_default_options()
2061 if (options->canonicalize_fallback_local == -1) in fill_default_options()
2062 options->canonicalize_fallback_local = 1; in fill_default_options()
2063 if (options->canonicalize_hostname == -1) in fill_default_options()
2064 options->canonicalize_hostname = SSH_CANONICALISE_NO; in fill_default_options()
2065 if (options->fingerprint_hash == -1) in fill_default_options()
2066 options->fingerprint_hash = SSH_FP_HASH_DEFAULT; in fill_default_options()
2067 if (options->update_hostkeys == -1) in fill_default_options()
2068 options->update_hostkeys = 0; in fill_default_options()
2069 if (kex_assemble_names(KEX_CLIENT_ENCRYPT, &options->ciphers) != 0 || in fill_default_options()
2070 kex_assemble_names(KEX_CLIENT_MAC, &options->macs) != 0 || in fill_default_options()
2071 kex_assemble_names(KEX_CLIENT_KEX, &options->kex_algorithms) != 0 || in fill_default_options()
2073 &options->hostbased_key_types) != 0 || in fill_default_options()
2075 &options->pubkey_key_types) != 0) in fill_default_options()
2085 CLEAR_ON_NONE(options->local_command); in fill_default_options()
2086 CLEAR_ON_NONE(options->proxy_command); in fill_default_options()
2087 CLEAR_ON_NONE(options->control_path); in fill_default_options()
2088 CLEAR_ON_NONE(options->revoked_host_keys); in fill_default_options()