version 1.421, 2015/09/04 04:56:09 |
version 1.422, 2015/09/04 08:21:47 |
|
|
use_syslog = 1; |
use_syslog = 1; |
break; |
break; |
case 'E': |
case 'E': |
logfile = xstrdup(optarg); |
logfile = optarg; |
break; |
break; |
case 'G': |
case 'G': |
config_test = 1; |
config_test = 1; |
|
|
break; |
break; |
case 'I': |
case 'I': |
#ifdef ENABLE_PKCS11 |
#ifdef ENABLE_PKCS11 |
|
free(options.pkcs11_provider); |
options.pkcs11_provider = xstrdup(optarg); |
options.pkcs11_provider = xstrdup(optarg); |
#else |
#else |
fprintf(stderr, "no support for PKCS#11.\n"); |
fprintf(stderr, "no support for PKCS#11.\n"); |
|
|
if (ciphers_valid(*optarg == '+' ? |
if (ciphers_valid(*optarg == '+' ? |
optarg + 1 : optarg)) { |
optarg + 1 : optarg)) { |
/* SSH2 only */ |
/* SSH2 only */ |
|
free(options.ciphers); |
options.ciphers = xstrdup(optarg); |
options.ciphers = xstrdup(optarg); |
options.cipher = SSH_CIPHER_INVALID; |
options.cipher = SSH_CIPHER_INVALID; |
break; |
break; |
|
|
options.ciphers = xstrdup(KEX_CLIENT_ENCRYPT); |
options.ciphers = xstrdup(KEX_CLIENT_ENCRYPT); |
break; |
break; |
case 'm': |
case 'm': |
if (mac_valid(optarg)) |
if (mac_valid(optarg)) { |
|
free(options.macs); |
options.macs = xstrdup(optarg); |
options.macs = xstrdup(optarg); |
else { |
} else { |
fprintf(stderr, "Unknown mac type '%s'\n", |
fprintf(stderr, "Unknown mac type '%s'\n", |
optarg); |
optarg); |
exit(255); |
exit(255); |
|
|
*/ |
*/ |
if (use_syslog && logfile != NULL) |
if (use_syslog && logfile != NULL) |
fatal("Can't specify both -y and -E"); |
fatal("Can't specify both -y and -E"); |
if (logfile != NULL) { |
if (logfile != NULL) |
log_redirect_stderr_to(logfile); |
log_redirect_stderr_to(logfile); |
free(logfile); |
|
} |
|
log_init(argv0, |
log_init(argv0, |
options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level, |
options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level, |
SYSLOG_FACILITY_USER, !use_syslog); |
SYSLOG_FACILITY_USER, !use_syslog); |