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

(-)openssh-3.8.1p1.orig/canohost.c (-1 / +2 lines)
Lines 74-80 Link Here
74
	 */
74
	 */
75
	memset(&hints, 0, sizeof(hints));
75
	memset(&hints, 0, sizeof(hints));
76
	hints.ai_socktype = SOCK_DGRAM;	/*dummy*/
76
	hints.ai_socktype = SOCK_DGRAM;	/*dummy*/
77
	hints.ai_flags = AI_NUMERICHOST;
77
	hints.ai_flags = AI_NUMERICHOST | AI_IDN | AI_CANONIDN;
78
	if (getaddrinfo(name, "0", &hints, &ai) == 0) {
78
	if (getaddrinfo(name, "0", &hints, &ai) == 0) {
79
		logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
79
		logit("Nasty PTR record \"%s\" is set up for %s, ignoring",
80
		    name, ntop);
80
		    name, ntop);
Lines 101-106 Link Here
101
	memset(&hints, 0, sizeof(hints));
101
	memset(&hints, 0, sizeof(hints));
102
	hints.ai_family = from.ss_family;
102
	hints.ai_family = from.ss_family;
103
	hints.ai_socktype = SOCK_STREAM;
103
	hints.ai_socktype = SOCK_STREAM;
104
	hints.ai_flags = AI_IDN | AI_CANONIDN;
104
	if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
105
	if (getaddrinfo(name, NULL, &hints, &aitop) != 0) {
105
		logit("reverse mapping checking getaddrinfo for %.700s "
106
		logit("reverse mapping checking getaddrinfo for %.700s "
106
		    "failed - POSSIBLE BREAKIN ATTEMPT!", name);
107
		    "failed - POSSIBLE BREAKIN ATTEMPT!", name);
(-)openssh-3.8.1p1.orig/channels.c (-2 / +4 lines)
Lines 2164-2170 Link Here
2164
	 */
2164
	 */
2165
	memset(&hints, 0, sizeof(hints));
2165
	memset(&hints, 0, sizeof(hints));
2166
	hints.ai_family = IPv4or6;
2166
	hints.ai_family = IPv4or6;
2167
	hints.ai_flags = gateway_ports ? AI_PASSIVE : 0;
2167
	hints.ai_flags = (gateway_ports ? AI_PASSIVE : 0) | AI_IDN | AI_CANONIDN;
2168
	hints.ai_socktype = SOCK_STREAM;
2168
	hints.ai_socktype = SOCK_STREAM;
2169
	snprintf(strport, sizeof strport, "%d", listen_port);
2169
	snprintf(strport, sizeof strport, "%d", listen_port);
2170
	if (getaddrinfo(NULL, strport, &hints, &aitop) != 0)
2170
	if (getaddrinfo(NULL, strport, &hints, &aitop) != 0)
Lines 2391-2396 Link Here
2391
	memset(&hints, 0, sizeof(hints));
2391
	memset(&hints, 0, sizeof(hints));
2392
	hints.ai_family = IPv4or6;
2392
	hints.ai_family = IPv4or6;
2393
	hints.ai_socktype = SOCK_STREAM;
2393
	hints.ai_socktype = SOCK_STREAM;
2394
	hints.ai_flags = AI_IDN | AI_CANONIDN;
2394
	snprintf(strport, sizeof strport, "%d", port);
2395
	snprintf(strport, sizeof strport, "%d", port);
2395
	if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) {
2396
	if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) {
2396
		error("connect_to %.100s: unknown host (%s)", host,
2397
		error("connect_to %.100s: unknown host (%s)", host,
Lines 2496-2502 Link Here
2496
		port = 6000 + display_number;
2497
		port = 6000 + display_number;
2497
		memset(&hints, 0, sizeof(hints));
2498
		memset(&hints, 0, sizeof(hints));
2498
		hints.ai_family = IPv4or6;
2499
		hints.ai_family = IPv4or6;
2499
		hints.ai_flags = x11_use_localhost ? 0: AI_PASSIVE;
2500
		hints.ai_flags = (x11_use_localhost ? 0: AI_PASSIVE) | AI_IDN | AI_CANONIDN;
2500
		hints.ai_socktype = SOCK_STREAM;
2501
		hints.ai_socktype = SOCK_STREAM;
2501
		snprintf(strport, sizeof strport, "%d", port);
2502
		snprintf(strport, sizeof strport, "%d", port);
2502
		if ((gaierr = getaddrinfo(NULL, strport, &hints, &aitop)) != 0) {
2503
		if ((gaierr = getaddrinfo(NULL, strport, &hints, &aitop)) != 0) {
Lines 2666-2671 Link Here
2666
	memset(&hints, 0, sizeof(hints));
2667
	memset(&hints, 0, sizeof(hints));
2667
	hints.ai_family = IPv4or6;
2668
	hints.ai_family = IPv4or6;
2668
	hints.ai_socktype = SOCK_STREAM;
2669
	hints.ai_socktype = SOCK_STREAM;
2670
	hints.ai_flags = AI_IDN | AI_CANONIDN;
2669
	snprintf(strport, sizeof strport, "%d", 6000 + display_number);
2671
	snprintf(strport, sizeof strport, "%d", 6000 + display_number);
2670
	if ((gaierr = getaddrinfo(buf, strport, &hints, &aitop)) != 0) {
2672
	if ((gaierr = getaddrinfo(buf, strport, &hints, &aitop)) != 0) {
2671
		error("%.100s: unknown host. (%s)", buf, gai_strerror(gaierr));
2673
		error("%.100s: unknown host. (%s)", buf, gai_strerror(gaierr));
(-)openssh-3.8.1p1.orig/includes.h (+1 lines)
Lines 33-38 Link Here
33
#include <grp.h>
33
#include <grp.h>
34
#include <time.h>
34
#include <time.h>
35
#include <dirent.h>
35
#include <dirent.h>
36
#include <locale.h>
36
37
37
#ifdef HAVE_LIMITS_H
38
#ifdef HAVE_LIMITS_H
38
# include <limits.h> /* For PATH_MAX */
39
# include <limits.h> /* For PATH_MAX */
(-)openssh-3.8.1p1.orig/scp.c (+2 lines)
Lines 222-227 Link Here
222
	extern char *optarg;
222
	extern char *optarg;
223
	extern int optind;
223
	extern int optind;
224
224
225
	setlocale(LC_CTYPE, "");
226
225
	__progname = ssh_get_progname(argv[0]);
227
	__progname = ssh_get_progname(argv[0]);
226
228
227
	args.list = NULL;
229
	args.list = NULL;
(-)openssh-3.8.1p1.orig/servconf.c (-1 / +1 lines)
Lines 412-418 Link Here
412
	memset(&hints, 0, sizeof(hints));
412
	memset(&hints, 0, sizeof(hints));
413
	hints.ai_family = IPv4or6;
413
	hints.ai_family = IPv4or6;
414
	hints.ai_socktype = SOCK_STREAM;
414
	hints.ai_socktype = SOCK_STREAM;
415
	hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0;
415
	hints.ai_flags = ((addr == NULL) ? AI_PASSIVE : 0) | AI_IDN | AI_CANONIDN;
416
	snprintf(strport, sizeof strport, "%u", port);
416
	snprintf(strport, sizeof strport, "%u", port);
417
	if ((gaierr = getaddrinfo(addr, strport, &hints, &aitop)) != 0)
417
	if ((gaierr = getaddrinfo(addr, strport, &hints, &aitop)) != 0)
418
		fatal("bad addr or host: %s (%s)",
418
		fatal("bad addr or host: %s (%s)",
(-)openssh-3.8.1p1.orig/sftp.c (+2 lines)
Lines 1289-1294 Link Here
1289
	extern int optind;
1289
	extern int optind;
1290
	extern char *optarg;
1290
	extern char *optarg;
1291
1291
1292
	setlocale(LC_CTYPE, "");
1293
1292
	__progname = ssh_get_progname(argv[0]);
1294
	__progname = ssh_get_progname(argv[0]);
1293
	args.list = NULL;
1295
	args.list = NULL;
1294
	addargs(&args, "ssh");		/* overwritten with ssh_program */
1296
	addargs(&args, "ssh");		/* overwritten with ssh_program */
(-)openssh-3.8.1p1.orig/sftp-server.c (+2 lines)
Lines 1022-1027 Link Here
1022
1022
1023
	/* XXX should use getopt */
1023
	/* XXX should use getopt */
1024
1024
1025
	setlocale(LC_CTYPE, "");
1026
1025
	__progname = ssh_get_progname(av[0]);
1027
	__progname = ssh_get_progname(av[0]);
1026
	handle_init();
1028
	handle_init();
1027
1029
(-)openssh-3.8.1p1.orig/ssh-add.c (+2 lines)
Lines 319-324 Link Here
319
	char *sc_reader_id = NULL;
319
	char *sc_reader_id = NULL;
320
	int i, ch, deleting = 0, ret = 0;
320
	int i, ch, deleting = 0, ret = 0;
321
321
322
	setlocale(LC_CTYPE, "");
323
322
	__progname = ssh_get_progname(argv[0]);
324
	__progname = ssh_get_progname(argv[0]);
323
	init_rng();
325
	init_rng();
324
	seed_rng();
326
	seed_rng();
(-)openssh-3.8.1p1.orig/ssh-agent.c (+2 lines)
Lines 1023-1028 Link Here
1023
	pid_t pid;
1023
	pid_t pid;
1024
	char pidstrbuf[1 + 3 * sizeof pid];
1024
	char pidstrbuf[1 + 3 * sizeof pid];
1025
1025
1026
	setlocale(LC_CTYPE, "");
1027
1026
	/* drop */
1028
	/* drop */
1027
	setegid(getgid());
1029
	setegid(getgid());
1028
	setgid(getgid());
1030
	setgid(getgid());
(-)openssh-3.8.1p1.orig/ssh.c (+2 lines)
Lines 175-180 Link Here
175
	extern int optind, optreset;
175
	extern int optind, optreset;
176
	extern char *optarg;
176
	extern char *optarg;
177
177
178
	setlocale(LC_CTYPE, "");
179
178
	__progname = ssh_get_progname(av[0]);
180
	__progname = ssh_get_progname(av[0]);
179
	init_rng();
181
	init_rng();
180
182
(-)openssh-3.8.1p1.orig/sshconnect.c (-1 / +2 lines)
Lines 201-207 Link Here
201
	hints.ai_family = ai->ai_family;
201
	hints.ai_family = ai->ai_family;
202
	hints.ai_socktype = ai->ai_socktype;
202
	hints.ai_socktype = ai->ai_socktype;
203
	hints.ai_protocol = ai->ai_protocol;
203
	hints.ai_protocol = ai->ai_protocol;
204
	hints.ai_flags = AI_PASSIVE;
204
	hints.ai_flags = AI_PASSIVE | AI_IDN | AI_CANONIDN;
205
	gaierr = getaddrinfo(options.bind_address, "0", &hints, &res);
205
	gaierr = getaddrinfo(options.bind_address, "0", &hints, &res);
206
	if (gaierr) {
206
	if (gaierr) {
207
		error("getaddrinfo: %s: %s", options.bind_address,
207
		error("getaddrinfo: %s: %s", options.bind_address,
Lines 342-347 Link Here
342
	memset(&hints, 0, sizeof(hints));
342
	memset(&hints, 0, sizeof(hints));
343
	hints.ai_family = family;
343
	hints.ai_family = family;
344
	hints.ai_socktype = SOCK_STREAM;
344
	hints.ai_socktype = SOCK_STREAM;
345
	hints.ai_flags = AI_IDN | AI_CANONIDN;
345
	snprintf(strport, sizeof strport, "%u", port);
346
	snprintf(strport, sizeof strport, "%u", port);
346
	if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
347
	if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
347
		fatal("%s: %.100s: %s", __progname, host,
348
		fatal("%s: %.100s: %s", __progname, host,
(-)openssh-3.8.1p1.orig/sshd.c (+2 lines)
Lines 798-803 Link Here
798
	Authctxt *authctxt;
798
	Authctxt *authctxt;
799
	int ret, key_used = 0;
799
	int ret, key_used = 0;
800
800
801
	setlocale(LC_CTYPE, "");
802
801
#ifdef HAVE_SECUREWARE
803
#ifdef HAVE_SECUREWARE
802
	(void)set_auth_parameters(ac, av);
804
	(void)set_auth_parameters(ac, av);
803
#endif
805
#endif
(-)openssh-3.8.1p1.orig/ssh-keygen.c (+2 lines)
Lines 804-809 Link Here
804
	extern int optind;
804
	extern int optind;
805
	extern char *optarg;
805
	extern char *optarg;
806
806
807
	setlocale(LC_CTYPE, "");
808
807
	__progname = ssh_get_progname(av[0]);
809
	__progname = ssh_get_progname(av[0]);
808
810
809
	SSLeay_add_all_algorithms();
811
	SSLeay_add_all_algorithms();
(-)openssh-3.8.1p1.orig/ssh-keyscan.c (+3 lines)
Lines 388-393 Link Here
388
	memset(&hints, 0, sizeof(hints));
388
	memset(&hints, 0, sizeof(hints));
389
	hints.ai_family = IPv4or6;
389
	hints.ai_family = IPv4or6;
390
	hints.ai_socktype = SOCK_STREAM;
390
	hints.ai_socktype = SOCK_STREAM;
391
	hints.ai_flags = AI_IDN | AI_CANONIDN;
391
	if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
392
	if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0)
392
		fatal("getaddrinfo %s: %s", host, gai_strerror(gaierr));
393
		fatal("getaddrinfo %s: %s", host, gai_strerror(gaierr));
393
	for (ai = aitop; ai; ai = ai->ai_next) {
394
	for (ai = aitop; ai; ai = ai->ai_next) {
Lines 695-700 Link Here
695
	extern int optind;
696
	extern int optind;
696
	extern char *optarg;
697
	extern char *optarg;
697
698
699
	setlocale(LC_CTYPE, "");
700
698
	__progname = ssh_get_progname(argv[0]);
701
	__progname = ssh_get_progname(argv[0]);
699
	init_rng();
702
	init_rng();
700
	seed_rng();
703
	seed_rng();
(-)openssh-3.8.1p1.orig/ssh-keysign.c (+2 lines)
Lines 151-156 Link Here
151
	u_int slen, dlen;
151
	u_int slen, dlen;
152
	u_int32_t rnd[256];
152
	u_int32_t rnd[256];
153
153
154
	setlocale(LC_CTYPE, "");
155
154
	key_fd[0] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
156
	key_fd[0] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
155
	key_fd[1] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
157
	key_fd[1] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
156
158
(-)openssh-3.8.1p1.orig/ssh-rand-helper.c (+2 lines)
Lines 769-774 Link Here
769
	extern char *optarg;
769
	extern char *optarg;
770
	LogLevel ll;
770
	LogLevel ll;
771
771
772
	setlocale(LC_CTYPE, "");
773
772
	__progname = ssh_get_progname(argv[0]);
774
	__progname = ssh_get_progname(argv[0]);
773
	log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
775
	log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
774
776

Return to bug 871