Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6992f2cb
Commit
6992f2cb
authored
Oct 31, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Nov 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Set error in check_addr_usage().
parent
9163d342
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
sock.c
server/sock.c
+10
-5
No files found.
server/sock.c
View file @
6992f2cb
...
...
@@ -335,7 +335,11 @@ static int check_addr_usage( struct sock *sock, const union unix_sockaddr *addr,
if
((
entry
=
rb_get
(
&
bound_addresses_tree
,
&
search_addr
)))
{
bound_addr
=
WINE_RB_ENTRY_VALUE
(
entry
,
struct
bound_addr
,
entry
);
if
(
bound_addr
->
reuse_count
==
-
1
||
!
sock
->
reuseaddr
)
return
1
;
if
(
bound_addr
->
reuse_count
==
-
1
||
!
sock
->
reuseaddr
)
{
set_error
(
sock
->
reuseaddr
?
STATUS_ACCESS_DENIED
:
STATUS_SHARING_VIOLATION
);
return
1
;
}
}
if
(
sock
->
family
!=
WS_AF_INET6
||
v6only
)
return
0
;
...
...
@@ -344,7 +348,11 @@ static int check_addr_usage( struct sock *sock, const union unix_sockaddr *addr,
if
((
entry
=
rb_get
(
&
bound_addresses_tree
,
&
search_addr
)))
{
bound_addr
=
WINE_RB_ENTRY_VALUE
(
entry
,
struct
bound_addr
,
entry
);
if
(
bound_addr
->
reuse_count
==
-
1
||
!
sock
->
reuseaddr
)
return
1
;
if
(
bound_addr
->
reuse_count
==
-
1
||
!
sock
->
reuseaddr
)
{
set_error
(
sock
->
reuseaddr
?
STATUS_ACCESS_DENIED
:
STATUS_SHARING_VIOLATION
);
return
1
;
}
}
return
0
;
}
...
...
@@ -2895,10 +2903,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
#endif
if
(
check_addr_usage
(
sock
,
&
bind_addr
,
v6only
))
{
set_error
(
sock
->
reuseaddr
?
STATUS_ACCESS_DENIED
:
STATUS_SHARING_VIOLATION
);
return
;
}
if
(
bind
(
unix_fd
,
&
bind_addr
.
addr
,
unix_len
)
<
0
)
{
...
...
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