Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
8f4ae68c
Commit
8f4ae68c
authored
Sep 18, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The [ & ] are now removed from a literal IPv6 hostname passed to the
remote shell.
parent
ff1b9344
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
options.c
options.c
+6
-3
No files found.
options.c
View file @
8f4ae68c
...
...
@@ -1780,10 +1780,10 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
{
char
*
p
;
int
not_host
;
int
hostlen
;
if
(
port_ptr
&&
strncasecmp
(
URL_PREFIX
,
s
,
strlen
(
URL_PREFIX
))
==
0
)
{
char
*
path
;
int
hostlen
;
s
+=
strlen
(
URL_PREFIX
);
if
((
p
=
strchr
(
s
,
'/'
))
!=
NULL
)
{
hostlen
=
p
-
s
;
...
...
@@ -1811,6 +1811,8 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
}
if
(
*
s
==
'['
&&
(
p
=
strchr
(
s
,
']'
))
!=
NULL
&&
p
[
1
]
==
':'
)
{
s
++
;
hostlen
=
p
-
s
;
*
p
=
'\0'
;
not_host
=
strchr
(
s
,
'/'
)
||
!
strchr
(
s
,
':'
);
*
p
=
']'
;
...
...
@@ -1820,6 +1822,7 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
}
else
{
if
(
!
(
p
=
strchr
(
s
,
':'
)))
return
NULL
;
hostlen
=
p
-
s
;
*
p
=
'\0'
;
not_host
=
strchr
(
s
,
'/'
)
!=
NULL
;
*
p
=
':'
;
...
...
@@ -1827,8 +1830,8 @@ char *check_for_hostspec(char *s, char **host_ptr, int *port_ptr)
return
NULL
;
}
*
host_ptr
=
new_array
(
char
,
p
-
s
+
1
);
strlcpy
(
*
host_ptr
,
s
,
p
-
s
+
1
);
*
host_ptr
=
new_array
(
char
,
hostlen
+
1
);
strlcpy
(
*
host_ptr
,
s
,
hostlen
+
1
);
if
(
p
[
1
]
==
':'
)
{
if
(
port_ptr
&&
!*
port_ptr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment