• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/OpenSSH-189/openssh/

Lines Matching refs:options

51    #  1. command line options
96 # Defaults for various options
271 * Adds a local TCP/IP port forward to options. Never returns if there is an
276 add_local_forward(Options *options, const Forward *newfwd)
284 options->local_forwards = xrealloc(options->local_forwards,
285 options->num_local_forwards + 1,
286 sizeof(*options->local_forwards));
287 fwd = &options->local_forwards[options->num_local_forwards++];
296 * Adds a remote TCP/IP port forward to options. Never returns if there is
301 add_remote_forward(Options *options, const Forward *newfwd)
305 options->remote_forwards = xrealloc(options->remote_forwards,
306 options->num_remote_forwards + 1,
307 sizeof(*options->remote_forwards));
308 fwd = &options->remote_forwards[options->num_remote_forwards++];
319 clear_forwardings(Options *options)
323 for (i = 0; i < options->num_local_forwards; i++) {
324 if (options->local_forwards[i].listen_host != NULL)
325 xfree(options->local_forwards[i].listen_host);
326 xfree(options->local_forwards[i].connect_host);
328 if (options->num_local_forwards > 0) {
329 xfree(options->local_forwards);
330 options->local_forwards = NULL;
332 options->num_local_forwards = 0;
333 for (i = 0; i < options->num_remote_forwards; i++) {
334 if (options->remote_forwards[i].listen_host != NULL)
335 xfree(options->remote_forwards[i].listen_host);
336 xfree(options->remote_forwards[i].connect_host);
338 if (options->num_remote_forwards > 0) {
339 xfree(options->remote_forwards);
340 options->remote_forwards = NULL;
342 options->num_remote_forwards = 0;
343 options->tun_open = SSH_TUNMODE_NO;
347 add_identity_file(Options *options, const char *dir, const char *filename,
352 if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES)
361 options->identity_file_userprovided[options->num_identity_files] =
363 options->identity_files[options->num_identity_files++] = path;
391 process_config_line(Options *options, const char *host,
425 /* don't panic, but count bad options */
429 intptr = &options->connection_timeout;
443 intptr = &options->forward_agent;
460 intptr = &options->forward_x11;
464 intptr = &options->forward_x11_trusted;
468 intptr = &options->forward_x11_timeout;
472 intptr = &options->gateway_ports;
476 intptr = &options->exit_on_forward_failure;
480 intptr = &options->use_privileged_port;
484 intptr = &options->password_authentication;
488 intptr = &options->zero_knowledge_password_authentication;
492 intptr = &options->kbd_interactive_authentication;
496 charptr = &options->kbd_interactive_devices;
500 intptr = &options->pubkey_authentication;
504 intptr = &options->rsa_authentication;
508 intptr = &options->rhosts_rsa_authentication;
512 intptr = &options->hostbased_authentication;
516 intptr = &options->challenge_response_authentication;
520 intptr = &options->gss_authentication;
524 intptr = &options->gss_keyex;
528 intptr = &options->gss_deleg_creds;
532 intptr = &options->gss_trust_dns;
536 charptr = &options->gss_client_identity;
540 charptr = &options->gss_server_identity;
544 intptr = &options->gss_renewal_rekey;
548 intptr = &options->batch_mode;
552 intptr = &options->check_host_ip;
556 intptr = &options->verify_host_key_dns;
560 intptr = &options->strict_host_key_checking;
580 intptr = &options->compression;
584 intptr = &options->tcp_keep_alive;
588 intptr = &options->no_host_authentication_for_localhost;
592 intptr = &options->number_of_password_prompts;
596 intptr = &options->compression_level;
633 if (*activep && options->rekey_limit == -1)
634 options->rekey_limit = (u_int32_t)val64;
642 intptr = &options->num_identity_files;
646 add_identity_file(options, NULL, arg, userconfig);
651 charptr=&options->xauth_location;
655 charptr = &options->user;
666 cpptr = (char **)&options->system_hostfiles;
667 uintptr = &options->num_system_hostfiles;
682 cpptr = (char **)&options->user_hostfiles;
683 uintptr = &options->num_user_hostfiles;
688 charptr = &options->hostname;
692 charptr = &options->host_key_alias;
696 charptr = &options->preferred_authentications;
700 charptr = &options->bind_address;
704 charptr = &options->pkcs11_provider;
708 charptr = &options->proxy_command;
718 intptr = &options->port;
735 intptr = &options->connection_attempts;
739 intptr = &options->cipher;
758 if (*activep && options->ciphers == NULL)
759 options->ciphers = xstrdup(arg);
769 if (*activep && options->macs == NULL)
770 options->macs = xstrdup(arg);
781 if (*activep && options->kex_algorithms == NULL)
782 options->kex_algorithms = xstrdup(arg);
792 if (*activep && options->hostkeyalgorithms == NULL)
793 options->hostkeyalgorithms = xstrdup(arg);
797 intptr = &options->protocol;
810 log_level_ptr = &options->log_level;
850 add_local_forward(options, &fwd);
852 add_remote_forward(options, &fwd);
857 intptr = &options->clear_forwardings;
882 debug("%.200s line %d: Applying options for %.100s",
888 intptr = &options->escape_char;
914 intptr = &options->address_family;
928 intptr = &options->enable_ssh_keysign;
932 intptr = &options->identities_only;
936 intptr = &options->server_alive_interval;
940 intptr = &options->server_alive_count_max;
950 if (options->num_send_env >= MAX_SEND_ENV)
953 options->send_env[options->num_send_env++] =
959 charptr = &options->control_path;
963 intptr = &options->control_master;
988 intptr = &options->control_persist;
1006 options->control_persist_timeout = value2;
1011 intptr = &options->hash_known_hosts;
1015 intptr = &options->tun_open;
1044 options->tun_local = value;
1045 options->tun_remote = value2;
1050 charptr = &options->local_command;
1054 intptr = &options->permit_local_command;
1058 intptr = &options->visual_host_key;
1063 intptr = &options->ask_pass_gui;
1079 options->ip_qos_interactive = value;
1080 options->ip_qos_bulk = value2;
1085 intptr = &options->use_roaming;
1093 intptr = &options->request_tty;
1132 * Reads the config file and modifies the options accordingly. Options
1138 read_config_file(const char *filename, const char *host, Options *options,
1162 * Mark that we are now processing the options. This flag is turned
1170 if (process_config_line(options, host, line, filename, linenum,
1176 fatal("%s: terminating, %d bad configuration options",
1182 * Initializes options to special values that indicate that they have not yet
1183 * been set. Read_config_file will only set options with this value. Options
1189 initialize_options(Options * options)
1191 memset(options, 'X', sizeof(*options));
1192 options->forward_agent = -1;
1193 options->forward_x11 = -1;
1194 options->forward_x11_trusted = -1;
1195 options->forward_x11_timeout = -1;
1196 options->exit_on_forward_failure = -1;
1197 options->xauth_location = NULL;
1198 options->gateway_ports = -1;
1199 options->use_privileged_port = -1;
1200 options->rsa_authentication = -1;
1201 options->pubkey_authentication = -1;
1202 options->challenge_response_authentication = -1;
1203 options->gss_authentication = -1;
1204 options->gss_keyex = -1;
1205 options->gss_deleg_creds = -1;
1206 options->gss_trust_dns = -1;
1207 options->gss_renewal_rekey = -1;
1208 options->gss_client_identity = NULL;
1209 options->gss_server_identity = NULL;
1210 options->password_authentication = -1;
1211 options->kbd_interactive_authentication = -1;
1212 options->kbd_interactive_devices = NULL;
1213 options->rhosts_rsa_authentication = -1;
1214 options->hostbased_authentication = -1;
1215 options->batch_mode = -1;
1216 options->check_host_ip = -1;
1217 options->strict_host_key_checking = -1;
1218 options->compression = -1;
1219 options->tcp_keep_alive = -1;
1220 options->compression_level = -1;
1221 options->port = -1;
1222 options->address_family = -1;
1223 options->connection_attempts = -1;
1224 options->connection_timeout = -1;
1225 options->number_of_password_prompts = -1;
1226 options->cipher = -1;
1227 options->ciphers = NULL;
1228 options->macs = NULL;
1229 options->kex_algorithms = NULL;
1230 options->hostkeyalgorithms = NULL;
1231 options->protocol = SSH_PROTO_UNKNOWN;
1232 options->num_identity_files = 0;
1233 options->hostname = NULL;
1234 options->host_key_alias = NULL;
1235 options->proxy_command = NULL;
1236 options->user = NULL;
1237 options->escape_char = -1;
1238 options->num_system_hostfiles = 0;
1239 options->num_user_hostfiles = 0;
1240 options->local_forwards = NULL;
1241 options->num_local_forwards = 0;
1242 options->remote_forwards = NULL;
1243 options->num_remote_forwards = 0;
1244 options->clear_forwardings = -1;
1245 options->log_level = SYSLOG_LEVEL_NOT_SET;
1246 options->preferred_authentications = NULL;
1247 options->bind_address = NULL;
1248 options->pkcs11_provider = NULL;
1249 options->enable_ssh_keysign = - 1;
1250 options->no_host_authentication_for_localhost = - 1;
1251 options->identities_only = - 1;
1252 options->rekey_limit = - 1;
1253 options->verify_host_key_dns = -1;
1254 options->server_alive_interval = -1;
1255 options->server_alive_count_max = -1;
1256 options->num_send_env = 0;
1257 options->control_path = NULL;
1258 options->control_master = -1;
1259 options->control_persist = -1;
1260 options->control_persist_timeout = 0;
1261 options->hash_known_hosts = -1;
1262 options->tun_open = -1;
1263 options->tun_local = -1;
1264 options->tun_remote = -1;
1265 options->local_command = NULL;
1266 options->permit_local_command = -1;
1267 options->use_roaming = -1;
1268 options->visual_host_key = -1;
1269 options->zero_knowledge_password_authentication = -1;
1271 options->ask_pass_gui = -1;
1273 options->ip_qos_interactive = -1;
1274 options->ip_qos_bulk = -1;
1275 options->request_tty = -1;
1280 * options for which no value has been specified with their default values.
1284 fill_default_options(Options * options)
1288 if (options->forward_agent == -1)
1289 options->forward_agent = 0;
1290 if (options->forward_x11 == -1)
1291 options->forward_x11 = 0;
1292 if (options->forward_x11_trusted == -1)
1293 options->forward_x11_trusted = 0;
1294 if (options->forward_x11_timeout == -1)
1295 options->forward_x11_timeout = 1200;
1296 if (options->exit_on_forward_failure == -1)
1297 options->exit_on_forward_failure = 0;
1298 if (options->xauth_location == NULL)
1299 options->xauth_location = _PATH_XAUTH;
1300 if (options->gateway_ports == -1)
1301 options->gateway_ports = 0;
1302 if (options->use_privileged_port == -1)
1303 options->use_privileged_port = 0;
1304 if (options->rsa_authentication == -1)
1305 options->rsa_authentication = 1;
1306 if (options->pubkey_authentication == -1)
1307 options->pubkey_authentication = 1;
1308 if (options->challenge_response_authentication == -1)
1309 options->challenge_response_authentication = 1;
1310 if (options->gss_authentication == -1)
1311 options->gss_authentication = 0;
1312 if (options->gss_keyex == -1)
1313 options->gss_keyex = 0;
1314 if (options->gss_deleg_creds == -1)
1315 options->gss_deleg_creds = 0;
1316 if (options->gss_trust_dns == -1)
1317 options->gss_trust_dns = 0;
1318 if (options->gss_renewal_rekey == -1)
1319 options->gss_renewal_rekey = 0;
1320 if (options->password_authentication == -1)
1321 options->password_authentication = 1;
1322 if (options->kbd_interactive_authentication == -1)
1323 options->kbd_interactive_authentication = 1;
1324 if (options->rhosts_rsa_authentication == -1)
1325 options->rhosts_rsa_authentication = 0;
1326 if (options->hostbased_authentication == -1)
1327 options->hostbased_authentication = 0;
1328 if (options->batch_mode == -1)
1329 options->batch_mode = 0;
1330 if (options->check_host_ip == -1)
1331 options->check_host_ip = 1;
1332 if (options->strict_host_key_checking == -1)
1333 options->strict_host_key_checking = 2; /* 2 is default */
1334 if (options->compression == -1)
1335 options->compression = 0;
1336 if (options->tcp_keep_alive == -1)
1337 options->tcp_keep_alive = 1;
1338 if (options->compression_level == -1)
1339 options->compression_level = 6;
1340 if (options->port == -1)
1341 options->port = 0; /* Filled in ssh_connect. */
1342 if (options->address_family == -1)
1343 options->address_family = AF_UNSPEC;
1344 if (options->connection_attempts == -1)
1345 options->connection_attempts = 1;
1346 if (options->number_of_password_prompts == -1)
1347 options->number_of_password_prompts = 3;
1349 if (options->cipher == -1)
1350 options->cipher = SSH_CIPHER_NOT_SET;
1351 /* options->ciphers, default set in myproposals.h */
1352 /* options->macs, default set in myproposals.h */
1353 /* options->kex_algorithms, default set in myproposals.h */
1354 /* options->hostkeyalgorithms, default set in myproposals.h */
1355 if (options->protocol == SSH_PROTO_UNKNOWN)
1356 options->protocol = SSH_PROTO_2;
1357 if (options->num_identity_files == 0) {
1358 if (options->protocol & SSH_PROTO_1) {
1359 add_identity_file(options, "~/",
1362 if (options->protocol & SSH_PROTO_2) {
1363 add_identity_file(options, "~/",
1365 add_identity_file(options, "~/",
1368 add_identity_file(options, "~/",
1373 if (options->escape_char == -1)
1374 options->escape_char = '~';
1375 if (options->num_system_hostfiles == 0) {
1376 options->system_hostfiles[options->num_system_hostfiles++] =
1378 options->system_hostfiles[options->num_system_hostfiles++] =
1381 if (options->num_user_hostfiles == 0) {
1382 options->user_hostfiles[options->num_user_hostfiles++] =
1384 options->user_hostfiles[options->num_user_hostfiles++] =
1387 if (options->log_level == SYSLOG_LEVEL_NOT_SET)
1388 options->log_level = SYSLOG_LEVEL_INFO;
1389 if (options->clear_forwardings == 1)
1390 clear_forwardings(options);
1391 if (options->no_host_authentication_for_localhost == - 1)
1392 options->no_host_authentication_for_localhost = 0;
1393 if (options->identities_only == -1)
1394 options->identities_only = 0;
1395 if (options->enable_ssh_keysign == -1)
1396 options->enable_ssh_keysign = 0;
1397 if (options->rekey_limit == -1)
1398 options->rekey_limit = 0;
1399 if (options->verify_host_key_dns == -1)
1400 options->verify_host_key_dns = 0;
1401 if (options->server_alive_interval == -1)
1402 options->server_alive_interval = 0;
1403 if (options->server_alive_count_max == -1)
1404 options->server_alive_count_max = 3;
1405 if (options->control_master == -1)
1406 options->control_master = 0;
1407 if (options->control_persist == -1) {
1408 options->control_persist = 0;
1409 options->control_persist_timeout = 0;
1411 if (options->hash_known_hosts == -1)
1412 options->hash_known_hosts = 0;
1413 if (options->tun_open == -1)
1414 options->tun_open = SSH_TUNMODE_NO;
1415 if (options->tun_local == -1)
1416 options->tun_local = SSH_TUNID_ANY;
1417 if (options->tun_remote == -1)
1418 options->tun_remote = SSH_TUNID_ANY;
1419 if (options->permit_local_command == -1)
1420 options->permit_local_command = 0;
1421 if (options->use_roaming == -1)
1422 options->use_roaming = 1;
1423 if (options->visual_host_key == -1)
1424 options->visual_host_key = 0;
1425 if (options->zero_knowledge_password_authentication == -1)
1426 options->zero_knowledge_password_authentication = 0;
1428 if (options->ask_pass_gui == -1)
1429 options->ask_pass_gui = 1;
1431 if (options->ip_qos_interactive == -1)
1432 options->ip_qos_interactive = IPTOS_LOWDELAY;
1433 if (options->ip_qos_bulk == -1)
1434 options->ip_qos_bulk = IPTOS_THROUGHPUT;
1435 if (options->request_tty == -1)
1436 options->request_tty = REQUEST_TTY_AUTO;
1437 /* options->local_command should not be set by default */
1438 /* options->proxy_command should not be set by default */
1439 /* options->user will be set in the main program if appropriate */
1440 /* options->hostname will be set in the main program if appropriate */
1441 /* options->host_key_alias should not be set by default */
1442 /* options->preferred_authentications will be set in ssh */