Lines Matching refs:options

86 /* Server configuration options. */
87 ServerOptions options;
201 children = xcalloc(options.max_startups, sizeof(*children));
202 for (i = 0; i < options.max_startups; i++) {
219 for (i = 0; i < options.max_startups; i++) {
227 " slots full", options.max_startups);
248 if (++children_active > options.max_startups)
297 for (i = 0; i < options.max_startups; i++) {
413 for (i = 0; i < options.max_startups; i++) {
427 for (i = 0; i < options.max_startups; i++) {
443 for (i = 0; i < options.max_startups; i++) {
473 if (options.pid_file != NULL)
474 unlink(options.pid_file);
516 if (startups < options.max_startups_begin)
518 if (startups >= options.max_startups)
520 if (options.max_startups_rate == 100)
523 p = 100 - options.max_startups_rate;
524 p *= startups - options.max_startups_begin;
525 p /= options.max_startups - options.max_startups_begin;
526 p += options.max_startups_rate;
617 for (i = 0; i < options.num_host_key_files; i++) {
691 (r = sshbuf_put_u64(m, options.timing_secret)) != 0 ||
751 /* Socket options */
788 srclimit_init(options.max_startups,
789 options.per_source_max_startups,
790 options.per_source_masklen_ipv4,
791 options.per_source_masklen_ipv6,
792 &options.per_source_penalty,
793 options.per_source_penalty_exempt);
795 for (i = 0; i < options.num_listen_addrs; i++) {
796 listen_on_addrs(&options.listen_addrs[i]);
797 freeaddrinfo(options.listen_addrs[i].addrs);
798 free(options.listen_addrs[i].rdomain);
799 memset(&options.listen_addrs[i], 0,
800 sizeof(options.listen_addrs[i]));
802 free(options.listen_addrs);
803 options.listen_addrs = NULL;
804 options.num_listen_addrs = 0;
831 startup_pollfd = xcalloc(options.max_startups, sizeof(int));
847 pfd = xcalloc(num_listen_socks + options.max_startups,
860 if (options.pid_file != NULL)
861 unlink(options.pid_file);
875 options.max_startups_begin, options.max_startups);
895 for (i = 0; i < options.max_startups; i++) {
915 for (i = 0; i < options.max_startups; i++) {
1047 options.log_level,
1048 options.log_facility,
1092 options.timing_secret = PEEK_U64(hash);
1123 parse_server_match_config(&options, &includes, connection_info);
1124 dump_config(&options);
1162 /* Initialize configuration options to their default values. */
1163 initialize_server_options(&options);
1170 options.address_family = AF_INET;
1173 options.address_family = AF_INET6;
1180 &options, optarg);
1185 options.log_level = SYSLOG_LEVEL_DEBUG1;
1186 } else if (options.log_level < SYSLOG_LEVEL_DEBUG3)
1187 options.log_level++;
1214 options.log_level = SYSLOG_LEVEL_QUIET;
1220 options.ports_from_cmdline = 1;
1221 if (options.num_ports >= MAX_PORTS) {
1225 options.ports[options.num_ports++] = a2port(optarg);
1226 if (options.ports[options.num_ports-1] <= 0) {
1232 if ((options.login_grace_time = convtime(optarg)) == -1) {
1242 &options, optarg, 1);
1265 if (process_server_config_line(&options, line,
1314 options.log_level == SYSLOG_LEVEL_NOT_SET ?
1315 SYSLOG_LEVEL_INFO : options.log_level,
1316 options.log_facility == SYSLOG_FACILITY_NOT_SET ?
1317 SYSLOG_FACILITY_AUTH : options.log_facility,
1336 parse_server_config(&options, config_file_name, cfg,
1339 /* Fill in default values for those options not explicitly set. */
1340 fill_default_server_options(&options);
1342 /* Check that options are sensible */
1343 if (options.authorized_keys_command_user == NULL &&
1344 (options.authorized_keys_command != NULL &&
1345 strcasecmp(options.authorized_keys_command, "none") != 0))
1348 if (options.authorized_principals_command_user == NULL &&
1349 (options.authorized_principals_command != NULL &&
1350 strcasecmp(options.authorized_principals_command, "none") != 0))
1360 if (options.num_auth_methods != 0) {
1361 for (i = 0; i < options.num_auth_methods; i++) {
1362 if (auth2_methods_valid(options.auth_methods[i],
1366 if (i >= options.num_auth_methods)
1383 sensitive_data.host_keys = xcalloc(options.num_host_key_files,
1385 sensitive_data.host_pubkeys = xcalloc(options.num_host_key_files,
1388 if (options.host_key_agent) {
1389 if (strcmp(options.host_key_agent, SSH_AUTHSOCKET_ENV_NAME))
1391 options.host_key_agent, 1);
1396 options.host_key_agent);
1399 for (i = 0; i < options.num_host_key_files; i++) {
1400 int ll = options.host_key_file_userprovided[i] ?
1403 if (options.host_key_files[i] == NULL)
1405 if ((r = sshkey_load_private(options.host_key_files[i], "",
1408 options.host_key_files[i]);
1412 options.host_key_files[i]);
1418 options.host_key_files[i]);
1422 if ((r = sshkey_load_public(options.host_key_files[i],
1425 options.host_key_files[i]);
1429 "private key", options.host_key_files[i]);
1437 options.host_key_files[i]);
1440 options.required_rsa_size)) != 0) {
1441 error_fr(r, "Host key %s", options.host_key_files[i]);
1451 options.host_key_files[i]);
1458 options.host_key_files[i]);
1476 if ((fp = sshkey_fingerprint(pubkey, options.fingerprint_hash,
1493 sensitive_data.host_certificates = xcalloc(options.num_host_key_files,
1495 for (i = 0; i < options.num_host_key_files; i++)
1498 for (i = 0; i < options.num_host_cert_files; i++) {
1499 if (options.host_cert_files[i] == NULL)
1501 if ((r = sshkey_load_public(options.host_cert_files[i],
1504 options.host_cert_files[i]);
1509 options.host_cert_files[i]);
1514 for (j = 0; j < options.num_host_key_files; j++) {
1521 if (j >= options.num_host_key_files) {
1523 options.host_cert_files[i]);
1557 rexec_argv[0] = options.sshd_session_path;
1569 if (stat(options.sshd_auth_path, &sb) != 0 ||
1572 options.sshd_auth_path);
1584 log_init(__progname, options.log_level,
1585 options.log_facility, log_stderr);
1586 for (i = 0; i < options.num_log_verbose; i++)
1587 log_verbose_add(options.log_verbose[i]);
1603 log_init(__progname, options.log_level, options.log_facility, log_stderr);
1635 if (options.pid_file != NULL && !debug_flag) {
1636 FILE *f = fopen(options.pid_file, "w");
1640 options.pid_file, strerror(errno));