Bugzilla – Attachment 640 Details for
Bug 871
request for idn (intl domain names) support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
my really quick-and-dirty patch
idn.patch (text/plain), 8.78 KB, created by
Egmont Koblinger
on 2004-05-23 06:28:58 AEST
(
hide
)
Description:
my really quick-and-dirty patch
Filename:
MIME Type:
Creator:
Egmont Koblinger
Created:
2004-05-23 06:28:58 AEST
Size:
8.78 KB
patch
obsolete
>diff -Naur openssh-3.8.1p1.orig/canohost.c openssh-3.8.1p1/canohost.c >--- openssh-3.8.1p1.orig/canohost.c 2004-03-31 07:17:54.000000000 +0200 >+++ openssh-3.8.1p1/canohost.c 2004-05-22 21:56:29.000000000 +0200 >@@ -74,7 +74,7 @@ > */ > memset(&hints, 0, sizeof(hints)); > hints.ai_socktype = SOCK_DGRAM; /*dummy*/ >- hints.ai_flags = AI_NUMERICHOST; >+ hints.ai_flags = AI_NUMERICHOST | AI_IDN | AI_CANONIDN; > if (getaddrinfo(name, "0", &hints, &ai) == 0) { > logit("Nasty PTR record \"%s\" is set up for %s, ignoring", > name, ntop); >@@ -101,6 +101,7 @@ > memset(&hints, 0, sizeof(hints)); > hints.ai_family = from.ss_family; > hints.ai_socktype = SOCK_STREAM; >+ hints.ai_flags = AI_IDN | AI_CANONIDN; > if (getaddrinfo(name, NULL, &hints, &aitop) != 0) { > logit("reverse mapping checking getaddrinfo for %.700s " > "failed - POSSIBLE BREAKIN ATTEMPT!", name); >diff -Naur openssh-3.8.1p1.orig/channels.c openssh-3.8.1p1/channels.c >--- openssh-3.8.1p1.orig/channels.c 2004-01-21 01:02:09.000000000 +0100 >+++ openssh-3.8.1p1/channels.c 2004-05-22 21:56:29.000000000 +0200 >@@ -2164,7 +2164,7 @@ > */ > memset(&hints, 0, sizeof(hints)); > hints.ai_family = IPv4or6; >- hints.ai_flags = gateway_ports ? AI_PASSIVE : 0; >+ hints.ai_flags = (gateway_ports ? AI_PASSIVE : 0) | AI_IDN | AI_CANONIDN; > hints.ai_socktype = SOCK_STREAM; > snprintf(strport, sizeof strport, "%d", listen_port); > if (getaddrinfo(NULL, strport, &hints, &aitop) != 0) >@@ -2391,6 +2391,7 @@ > memset(&hints, 0, sizeof(hints)); > hints.ai_family = IPv4or6; > hints.ai_socktype = SOCK_STREAM; >+ hints.ai_flags = AI_IDN | AI_CANONIDN; > snprintf(strport, sizeof strport, "%d", port); > if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) { > error("connect_to %.100s: unknown host (%s)", host, >@@ -2496,7 +2497,7 @@ > port = 6000 + display_number; > memset(&hints, 0, sizeof(hints)); > hints.ai_family = IPv4or6; >- hints.ai_flags = x11_use_localhost ? 0: AI_PASSIVE; >+ hints.ai_flags = (x11_use_localhost ? 0: AI_PASSIVE) | AI_IDN | AI_CANONIDN; > hints.ai_socktype = SOCK_STREAM; > snprintf(strport, sizeof strport, "%d", port); > if ((gaierr = getaddrinfo(NULL, strport, &hints, &aitop)) != 0) { >@@ -2666,6 +2667,7 @@ > memset(&hints, 0, sizeof(hints)); > hints.ai_family = IPv4or6; > hints.ai_socktype = SOCK_STREAM; >+ hints.ai_flags = AI_IDN | AI_CANONIDN; > snprintf(strport, sizeof strport, "%d", 6000 + display_number); > if ((gaierr = getaddrinfo(buf, strport, &hints, &aitop)) != 0) { > error("%.100s: unknown host. (%s)", buf, gai_strerror(gaierr)); >diff -Naur openssh-3.8.1p1.orig/includes.h openssh-3.8.1p1/includes.h >--- openssh-3.8.1p1.orig/includes.h 2004-02-06 11:29:42.000000000 +0100 >+++ openssh-3.8.1p1/includes.h 2004-05-22 21:56:29.000000000 +0200 >@@ -33,6 +33,7 @@ > #include <grp.h> > #include <time.h> > #include <dirent.h> >+#include <locale.h> > > #ifdef HAVE_LIMITS_H > # include <limits.h> /* For PATH_MAX */ >diff -Naur openssh-3.8.1p1.orig/scp.c openssh-3.8.1p1/scp.c >--- openssh-3.8.1p1.orig/scp.c 2003-11-24 03:09:28.000000000 +0100 >+++ openssh-3.8.1p1/scp.c 2004-05-22 22:08:24.000000000 +0200 >@@ -222,6 +222,8 @@ > extern char *optarg; > extern int optind; > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(argv[0]); > > args.list = NULL; >diff -Naur openssh-3.8.1p1.orig/servconf.c openssh-3.8.1p1/servconf.c >--- openssh-3.8.1p1.orig/servconf.c 2004-01-23 12:03:10.000000000 +0100 >+++ openssh-3.8.1p1/servconf.c 2004-05-22 21:56:29.000000000 +0200 >@@ -412,7 +412,7 @@ > memset(&hints, 0, sizeof(hints)); > hints.ai_family = IPv4or6; > hints.ai_socktype = SOCK_STREAM; >- hints.ai_flags = (addr == NULL) ? AI_PASSIVE : 0; >+ hints.ai_flags = ((addr == NULL) ? AI_PASSIVE : 0) | AI_IDN | AI_CANONIDN; > snprintf(strport, sizeof strport, "%u", port); > if ((gaierr = getaddrinfo(addr, strport, &hints, &aitop)) != 0) > fatal("bad addr or host: %s (%s)", >diff -Naur openssh-3.8.1p1.orig/sftp.c openssh-3.8.1p1/sftp.c >--- openssh-3.8.1p1.orig/sftp.c 2004-03-08 13:12:19.000000000 +0100 >+++ openssh-3.8.1p1/sftp.c 2004-05-22 22:08:15.000000000 +0200 >@@ -1289,6 +1289,8 @@ > extern int optind; > extern char *optarg; > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(argv[0]); > args.list = NULL; > addargs(&args, "ssh"); /* overwritten with ssh_program */ >diff -Naur openssh-3.8.1p1.orig/sftp-server.c openssh-3.8.1p1/sftp-server.c >--- openssh-3.8.1p1.orig/sftp-server.c 2004-02-23 23:19:15.000000000 +0100 >+++ openssh-3.8.1p1/sftp-server.c 2004-05-22 22:08:08.000000000 +0200 >@@ -1022,6 +1022,8 @@ > > /* XXX should use getopt */ > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(av[0]); > handle_init(); > >diff -Naur openssh-3.8.1p1.orig/ssh-add.c openssh-3.8.1p1/ssh-add.c >--- openssh-3.8.1p1.orig/ssh-add.c 2003-11-21 13:48:56.000000000 +0100 >+++ openssh-3.8.1p1/ssh-add.c 2004-05-22 22:08:23.000000000 +0200 >@@ -319,6 +319,8 @@ > char *sc_reader_id = NULL; > int i, ch, deleting = 0, ret = 0; > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(argv[0]); > init_rng(); > seed_rng(); >diff -Naur openssh-3.8.1p1.orig/ssh-agent.c openssh-3.8.1p1/ssh-agent.c >--- openssh-3.8.1p1.orig/ssh-agent.c 2004-03-03 01:08:59.000000000 +0100 >+++ openssh-3.8.1p1/ssh-agent.c 2004-05-22 22:08:26.000000000 +0200 >@@ -1023,6 +1023,8 @@ > pid_t pid; > char pidstrbuf[1 + 3 * sizeof pid]; > >+ setlocale(LC_CTYPE, ""); >+ > /* drop */ > setegid(getgid()); > setgid(getgid()); >diff -Naur openssh-3.8.1p1.orig/ssh.c openssh-3.8.1p1/ssh.c >--- openssh-3.8.1p1.orig/ssh.c 2004-03-21 23:36:01.000000000 +0100 >+++ openssh-3.8.1p1/ssh.c 2004-05-22 22:08:07.000000000 +0200 >@@ -175,6 +175,8 @@ > extern int optind, optreset; > extern char *optarg; > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(av[0]); > init_rng(); > >diff -Naur openssh-3.8.1p1.orig/sshconnect.c openssh-3.8.1p1/sshconnect.c >--- openssh-3.8.1p1.orig/sshconnect.c 2004-01-27 11:21:27.000000000 +0100 >+++ openssh-3.8.1p1/sshconnect.c 2004-05-22 21:56:29.000000000 +0200 >@@ -201,7 +201,7 @@ > hints.ai_family = ai->ai_family; > hints.ai_socktype = ai->ai_socktype; > hints.ai_protocol = ai->ai_protocol; >- hints.ai_flags = AI_PASSIVE; >+ hints.ai_flags = AI_PASSIVE | AI_IDN | AI_CANONIDN; > gaierr = getaddrinfo(options.bind_address, "0", &hints, &res); > if (gaierr) { > error("getaddrinfo: %s: %s", options.bind_address, >@@ -342,6 +342,7 @@ > memset(&hints, 0, sizeof(hints)); > hints.ai_family = family; > hints.ai_socktype = SOCK_STREAM; >+ hints.ai_flags = AI_IDN | AI_CANONIDN; > snprintf(strport, sizeof strport, "%u", port); > if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) > fatal("%s: %.100s: %s", __progname, host, >diff -Naur openssh-3.8.1p1.orig/sshd.c openssh-3.8.1p1/sshd.c >--- openssh-3.8.1p1.orig/sshd.c 2004-03-21 23:36:01.000000000 +0100 >+++ openssh-3.8.1p1/sshd.c 2004-05-22 22:08:12.000000000 +0200 >@@ -798,6 +798,8 @@ > Authctxt *authctxt; > int ret, key_used = 0; > >+ setlocale(LC_CTYPE, ""); >+ > #ifdef HAVE_SECUREWARE > (void)set_auth_parameters(ac, av); > #endif >diff -Naur openssh-3.8.1p1.orig/ssh-keygen.c openssh-3.8.1p1/ssh-keygen.c >--- openssh-3.8.1p1.orig/ssh-keygen.c 2003-12-31 01:34:52.000000000 +0100 >+++ openssh-3.8.1p1/ssh-keygen.c 2004-05-22 22:08:14.000000000 +0200 >@@ -804,6 +804,8 @@ > extern int optind; > extern char *optarg; > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(av[0]); > > SSLeay_add_all_algorithms(); >diff -Naur openssh-3.8.1p1.orig/ssh-keyscan.c openssh-3.8.1p1/ssh-keyscan.c >--- openssh-3.8.1p1.orig/ssh-keyscan.c 2004-03-08 13:13:00.000000000 +0100 >+++ openssh-3.8.1p1/ssh-keyscan.c 2004-05-22 22:08:27.000000000 +0200 >@@ -388,6 +388,7 @@ > memset(&hints, 0, sizeof(hints)); > hints.ai_family = IPv4or6; > hints.ai_socktype = SOCK_STREAM; >+ hints.ai_flags = AI_IDN | AI_CANONIDN; > if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) > fatal("getaddrinfo %s: %s", host, gai_strerror(gaierr)); > for (ai = aitop; ai; ai = ai->ai_next) { >@@ -695,6 +696,8 @@ > extern int optind; > extern char *optarg; > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(argv[0]); > init_rng(); > seed_rng(); >diff -Naur openssh-3.8.1p1.orig/ssh-keysign.c openssh-3.8.1p1/ssh-keysign.c >--- openssh-3.8.1p1.orig/ssh-keysign.c 2004-01-21 01:02:50.000000000 +0100 >+++ openssh-3.8.1p1/ssh-keysign.c 2004-05-22 22:08:06.000000000 +0200 >@@ -151,6 +151,8 @@ > u_int slen, dlen; > u_int32_t rnd[256]; > >+ setlocale(LC_CTYPE, ""); >+ > key_fd[0] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY); > key_fd[1] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY); > >diff -Naur openssh-3.8.1p1.orig/ssh-rand-helper.c openssh-3.8.1p1/ssh-rand-helper.c >--- openssh-3.8.1p1.orig/ssh-rand-helper.c 2003-11-21 13:56:47.000000000 +0100 >+++ openssh-3.8.1p1/ssh-rand-helper.c 2004-05-22 22:08:16.000000000 +0200 >@@ -769,6 +769,8 @@ > extern char *optarg; > LogLevel ll; > >+ setlocale(LC_CTYPE, ""); >+ > __progname = ssh_get_progname(argv[0]); > log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 871
: 640