Projects
openEuler:24.03:SP1:Everything:64G
openssh
_service:tar_scm:bugfix-sftp-when-parse_user_ho...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:bugfix-sftp-when-parse_user_host_path-empty-path-should-be-allowed.patch of Package openssh
From 68fae005d551a1172085a2f91e5c4d53c9e07746 Mon Sep 17 00:00:00 2001 From: xuchunmei <xuchunmei@huawei.com> Date: Sat, 9 Feb 2019 04:51:29 -0500 Subject: [PATCH] sftp: when parse_user_host_path, empty path should be allowed when using "sftp root@[2001::16%eth0]", the error output: ssh: Could not resolve hostname [2001::16%eth0]: Name or service not known Connection closed. Connection closed fix sftp ipv6 login failed accidental like this: File "/root/!" not found. --- misc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/misc.c b/misc.c index 7c4f395..1ec2aa8 100644 --- a/misc.c +++ b/misc.c @@ -554,6 +554,8 @@ colon(char *cp) flag = 1; if (*cp == ']' && *(cp+1) == ':' && flag) return (cp+1); + if (*cp == ']' && *(cp+1) == '\0' && flag) + return (cp+1); if (*cp == ':' && !flag) return (cp); if (*cp == '/') @@ -599,7 +601,8 @@ parse_user_host_path(const char *s, char **userp, char **hostp, char **pathp) goto out; /* Extract optional path */ - *tmp++ = '\0'; + if (*tmp != '\0') + *tmp++ = '\0'; if (*tmp == '\0') tmp = "."; path = xstrdup(tmp); -- 1.8.3.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2