View | Details | Raw Unified | Return to bug 2182
Collapse All | Expand All

(-)ssh.c (-6 / +7 lines)
Lines 458-464 main(int ac, char **av) Link Here
458
			use_syslog = 1;
458
			use_syslog = 1;
459
			break;
459
			break;
460
		case 'E':
460
		case 'E':
461
			logfile = xstrdup(optarg);
461
			logfile = optarg;
462
			break;
462
			break;
463
		case 'Y':
463
		case 'Y':
464
			options.forward_x11 = 1;
464
			options.forward_x11 = 1;
Lines 535-540 main(int ac, char **av) Link Here
535
			break;
535
			break;
536
		case 'I':
536
		case 'I':
537
#ifdef ENABLE_PKCS11
537
#ifdef ENABLE_PKCS11
538
			free(options.pkcs11_provider);
538
			options.pkcs11_provider = xstrdup(optarg);
539
			options.pkcs11_provider = xstrdup(optarg);
539
#else
540
#else
540
			fprintf(stderr, "no support for PKCS#11.\n");
541
			fprintf(stderr, "no support for PKCS#11.\n");
Lines 612-617 main(int ac, char **av) Link Here
612
		case 'c':
613
		case 'c':
613
			if (ciphers_valid(optarg)) {
614
			if (ciphers_valid(optarg)) {
614
				/* SSH2 only */
615
				/* SSH2 only */
616
				free(options.ciphers);
615
				options.ciphers = xstrdup(optarg);
617
				options.ciphers = xstrdup(optarg);
616
				options.cipher = SSH_CIPHER_INVALID;
618
				options.cipher = SSH_CIPHER_INVALID;
617
			} else {
619
			} else {
Lines 632-640 main(int ac, char **av) Link Here
632
			}
634
			}
633
			break;
635
			break;
634
		case 'm':
636
		case 'm':
635
			if (mac_valid(optarg))
637
			if (mac_valid(optarg)) {
638
				free(options.macs);
636
				options.macs = xstrdup(optarg);
639
				options.macs = xstrdup(optarg);
637
			else {
640
			} else {
638
				fprintf(stderr, "Unknown mac type '%s'\n",
641
				fprintf(stderr, "Unknown mac type '%s'\n",
639
				    optarg);
642
				    optarg);
640
				exit(255);
643
				exit(255);
Lines 794-803 main(int ac, char **av) Link Here
794
	 */
797
	 */
795
	if (use_syslog && logfile != NULL)
798
	if (use_syslog && logfile != NULL)
796
		fatal("Can't specify both -y and -E");
799
		fatal("Can't specify both -y and -E");
797
	if (logfile != NULL) {
800
	if (logfile != NULL)
798
		log_redirect_stderr_to(logfile);
801
		log_redirect_stderr_to(logfile);
799
		free(logfile);
800
	}
801
	log_init(argv0,
802
	log_init(argv0,
802
	    options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level,
803
	    options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level,
803
	    SYSLOG_FACILITY_USER, !use_syslog);
804
	    SYSLOG_FACILITY_USER, !use_syslog);
(-)sshd.c (-4 / +2 lines)
Lines 1384-1390 main(int ac, char **av) Link Here
1384
			no_daemon_flag = 1;
1384
			no_daemon_flag = 1;
1385
			break;
1385
			break;
1386
		case 'E':
1386
		case 'E':
1387
			logfile = xstrdup(optarg);
1387
			logfile = optarg;
1388
			/* FALLTHROUGH */
1388
			/* FALLTHROUGH */
1389
		case 'e':
1389
		case 'e':
1390
			log_stderr = 1;
1390
			log_stderr = 1;
Lines 1484-1493 main(int ac, char **av) Link Here
1484
	OpenSSL_add_all_algorithms();
1484
	OpenSSL_add_all_algorithms();
1485
1485
1486
	/* If requested, redirect the logs to the specified logfile. */
1486
	/* If requested, redirect the logs to the specified logfile. */
1487
	if (logfile != NULL) {
1487
	if (logfile != NULL)
1488
		log_redirect_stderr_to(logfile);
1488
		log_redirect_stderr_to(logfile);
1489
		free(logfile);
1490
	}
1491
	/*
1489
	/*
1492
	 * Force logging to stderr until we have loaded the private host
1490
	 * Force logging to stderr until we have loaded the private host
1493
	 * key (unless started from inetd)
1491
	 * key (unless started from inetd)

Return to bug 2182