Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147631755
D3103.id6980.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
873 B
Referenced Files
None
Subscribers
None
D3103.id6980.diff
View Options
Index: crypto/openssh/ssh.c
===================================================================
--- crypto/openssh/ssh.c
+++ crypto/openssh/ssh.c
@@ -1001,6 +1001,23 @@
shorthost[strcspn(thishost, ".")] = '\0';
snprintf(portstr, sizeof(portstr), "%d", options.port);
+ /* Find canonic host name. */
+ if (strchr(host, '.') == 0) {
+ struct addrinfo hints;
+ struct addrinfo *ai = NULL;
+ int errgai;
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = options.address_family;
+ hints.ai_flags = AI_CANONNAME;
+ hints.ai_socktype = SOCK_STREAM;
+ errgai = getaddrinfo(host, NULL, &hints, &ai);
+ if (errgai == 0) {
+ if (ai->ai_canonname != NULL)
+ host = xstrdup(ai->ai_canonname);
+ freeaddrinfo(ai);
+ }
+ }
+
if (options.local_command != NULL) {
debug3("expanding LocalCommand: %s", options.local_command);
cp = options.local_command;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 13, 11:39 AM (8 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29621347
Default Alt Text
D3103.id6980.diff (873 B)
Attached To
Mode
D3103: ssh: canonicize the host name before looking it up in the host file
Attached
Detach File
Event Timeline
Log In to Comment