|
Lines 638-643
main(int ac, char **av)
Link Here
|
| 638 |
/* Initialize the command to execute on remote host. */ |
638 |
/* Initialize the command to execute on remote host. */ |
| 639 |
buffer_init(&command); |
639 |
buffer_init(&command); |
| 640 |
|
640 |
|
|
|
641 |
/* |
| 642 |
* Initialize "log" output. Since we are the client all output |
| 643 |
* actually goes to stderr. |
| 644 |
*/ |
| 645 |
log_init(argv0, |
| 646 |
options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level, |
| 647 |
SYSLOG_FACILITY_USER, !use_syslog); |
| 648 |
|
| 649 |
/* |
| 650 |
* Read per-user configuration file. Ignore the system wide config |
| 651 |
* file if the user specifies a config file on the command line. |
| 652 |
*/ |
| 653 |
if (config != NULL) { |
| 654 |
if (!read_config_file(config, host, &options, 0)) |
| 655 |
fatal("Can't open user config file %.100s: " |
| 656 |
"%.100s", config, strerror(errno)); |
| 657 |
} else { |
| 658 |
r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir, |
| 659 |
_PATH_SSH_USER_CONFFILE); |
| 660 |
if (r > 0 && (size_t)r < sizeof(buf)) |
| 661 |
(void)read_config_file(buf, host, &options, 1); |
| 662 |
|
| 663 |
/* Read systemwide configuration file after user config. */ |
| 664 |
(void)read_config_file(_PATH_HOST_CONFIG_FILE, host, |
| 665 |
&options, 0); |
| 666 |
} |
| 667 |
|
| 668 |
/* Fill configuration defaults. */ |
| 669 |
fill_default_options(&options); |
| 670 |
|
| 671 |
/* reinit */ |
| 672 |
log_init(argv0, options.log_level, SYSLOG_FACILITY_USER, !use_syslog); |
| 673 |
|
| 641 |
if (options.request_tty == REQUEST_TTY_YES || |
674 |
if (options.request_tty == REQUEST_TTY_YES || |
| 642 |
options.request_tty == REQUEST_TTY_FORCE) |
675 |
options.request_tty == REQUEST_TTY_FORCE) |
| 643 |
tty_flag = 1; |
676 |
tty_flag = 1; |
|
Lines 686-726
main(int ac, char **av)
Link Here
|
| 686 |
tty_flag = 0; |
719 |
tty_flag = 0; |
| 687 |
} |
720 |
} |
| 688 |
|
721 |
|
| 689 |
/* |
|
|
| 690 |
* Initialize "log" output. Since we are the client all output |
| 691 |
* actually goes to stderr. |
| 692 |
*/ |
| 693 |
log_init(argv0, |
| 694 |
options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level, |
| 695 |
SYSLOG_FACILITY_USER, !use_syslog); |
| 696 |
|
| 697 |
/* |
| 698 |
* Read per-user configuration file. Ignore the system wide config |
| 699 |
* file if the user specifies a config file on the command line. |
| 700 |
*/ |
| 701 |
if (config != NULL) { |
| 702 |
if (!read_config_file(config, host, &options, 0)) |
| 703 |
fatal("Can't open user config file %.100s: " |
| 704 |
"%.100s", config, strerror(errno)); |
| 705 |
} else { |
| 706 |
r = snprintf(buf, sizeof buf, "%s/%s", pw->pw_dir, |
| 707 |
_PATH_SSH_USER_CONFFILE); |
| 708 |
if (r > 0 && (size_t)r < sizeof(buf)) |
| 709 |
(void)read_config_file(buf, host, &options, 1); |
| 710 |
|
| 711 |
/* Read systemwide configuration file after user config. */ |
| 712 |
(void)read_config_file(_PATH_HOST_CONFIG_FILE, host, |
| 713 |
&options, 0); |
| 714 |
} |
| 715 |
|
| 716 |
/* Fill configuration defaults. */ |
| 717 |
fill_default_options(&options); |
| 718 |
|
| 719 |
channel_set_af(options.address_family); |
722 |
channel_set_af(options.address_family); |
| 720 |
|
723 |
|
| 721 |
/* reinit */ |
|
|
| 722 |
log_init(argv0, options.log_level, SYSLOG_FACILITY_USER, !use_syslog); |
| 723 |
|
| 724 |
seed_rng(); |
724 |
seed_rng(); |
| 725 |
|
725 |
|
| 726 |
if (options.user == NULL) |
726 |
if (options.user == NULL) |
| 727 |
- |
|
|