Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c0905e08
Commit
c0905e08
authored
Aug 16, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use common implementation for pipe client and server get_sd and set_sd.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ba40a0db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
31 deletions
+15
-31
pipe.c
dlls/ntdll/tests/pipe.c
+1
-1
named_pipe.c
server/named_pipe.c
+14
-30
No files found.
dlls/ntdll/tests/pipe.c
View file @
c0905e08
...
@@ -1831,7 +1831,7 @@ static void test_security_info(void)
...
@@ -1831,7 +1831,7 @@ static void test_security_info(void)
CloseHandle
(
server
);
CloseHandle
(
server
);
/* SD is preserved after closing server object */
/* SD is preserved after closing server object */
test_group
(
client
,
local_sid
,
TRU
E
);
test_group
(
client
,
local_sid
,
FALS
E
);
CloseHandle
(
client
);
CloseHandle
(
client
);
server
=
server2
;
server
=
server2
;
...
...
server/named_pipe.c
View file @
c0905e08
...
@@ -147,6 +147,9 @@ static const struct object_ops named_pipe_ops =
...
@@ -147,6 +147,9 @@ static const struct object_ops named_pipe_ops =
/* common server and client pipe end functions */
/* common server and client pipe end functions */
static
enum
server_fd_type
pipe_end_get_fd_type
(
struct
fd
*
fd
);
static
enum
server_fd_type
pipe_end_get_fd_type
(
struct
fd
*
fd
);
static
struct
fd
*
pipe_end_get_fd
(
struct
object
*
obj
);
static
struct
fd
*
pipe_end_get_fd
(
struct
object
*
obj
);
static
struct
security_descriptor
*
pipe_end_get_sd
(
struct
object
*
obj
);
static
int
pipe_end_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
unsigned
int
set_info
);
static
int
pipe_end_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
pipe_end_read
(
struct
fd
*
fd
,
struct
async
*
async
,
file_pos_t
pos
);
static
int
pipe_end_write
(
struct
fd
*
fd
,
struct
async
*
async_data
,
file_pos_t
pos
);
static
int
pipe_end_write
(
struct
fd
*
fd
,
struct
async
*
async_data
,
file_pos_t
pos
);
static
int
pipe_end_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
static
int
pipe_end_flush
(
struct
fd
*
fd
,
struct
async
*
async
);
...
@@ -155,9 +158,6 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue );
...
@@ -155,9 +158,6 @@ static void pipe_end_reselect_async( struct fd *fd, struct async_queue *queue );
/* server end functions */
/* server end functions */
static
void
pipe_server_dump
(
struct
object
*
obj
,
int
verbose
);
static
void
pipe_server_dump
(
struct
object
*
obj
,
int
verbose
);
static
struct
security_descriptor
*
pipe_server_get_sd
(
struct
object
*
obj
);
static
int
pipe_server_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
unsigned
int
set_info
);
static
void
pipe_server_destroy
(
struct
object
*
obj
);
static
void
pipe_server_destroy
(
struct
object
*
obj
);
static
int
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
int
pipe_server_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
void
pipe_server_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
static
void
pipe_server_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
...
@@ -174,8 +174,8 @@ static const struct object_ops pipe_server_ops =
...
@@ -174,8 +174,8 @@ static const struct object_ops pipe_server_ops =
no_signal
,
/* signal */
no_signal
,
/* signal */
pipe_end_get_fd
,
/* get_fd */
pipe_end_get_fd
,
/* get_fd */
default_fd_map_access
,
/* map_access */
default_fd_map_access
,
/* map_access */
pipe_
server_get_sd
,
/* get_sd */
pipe_
end_get_sd
,
/* get_sd */
pipe_
server_set_sd
,
/* set_sd */
pipe_
end_set_sd
,
/* set_sd */
no_lookup_name
,
/* lookup_name */
no_lookup_name
,
/* lookup_name */
no_link_name
,
/* link_name */
no_link_name
,
/* link_name */
NULL
,
/* unlink_name */
NULL
,
/* unlink_name */
...
@@ -201,9 +201,6 @@ static const struct fd_ops pipe_server_fd_ops =
...
@@ -201,9 +201,6 @@ static const struct fd_ops pipe_server_fd_ops =
/* client end functions */
/* client end functions */
static
void
pipe_client_dump
(
struct
object
*
obj
,
int
verbose
);
static
void
pipe_client_dump
(
struct
object
*
obj
,
int
verbose
);
static
struct
security_descriptor
*
pipe_client_get_sd
(
struct
object
*
obj
);
static
int
pipe_client_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
unsigned
int
set_info
);
static
void
pipe_client_destroy
(
struct
object
*
obj
);
static
void
pipe_client_destroy
(
struct
object
*
obj
);
static
int
pipe_client_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
int
pipe_client_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
struct
async
*
async
);
static
void
pipe_client_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
static
void
pipe_client_get_file_info
(
struct
fd
*
fd
,
unsigned
int
info_class
);
...
@@ -220,8 +217,8 @@ static const struct object_ops pipe_client_ops =
...
@@ -220,8 +217,8 @@ static const struct object_ops pipe_client_ops =
no_signal
,
/* signal */
no_signal
,
/* signal */
pipe_end_get_fd
,
/* get_fd */
pipe_end_get_fd
,
/* get_fd */
default_fd_map_access
,
/* map_access */
default_fd_map_access
,
/* map_access */
pipe_
client_get_sd
,
/* get_sd */
pipe_
end_get_sd
,
/* get_sd */
pipe_
client_set_sd
,
/* set_sd */
pipe_
end_set_sd
,
/* set_sd */
no_lookup_name
,
/* lookup_name */
no_lookup_name
,
/* lookup_name */
no_link_name
,
/* link_name */
no_link_name
,
/* link_name */
NULL
,
/* unlink_name */
NULL
,
/* unlink_name */
...
@@ -601,32 +598,19 @@ static void pipe_end_get_file_info( struct fd *fd, struct named_pipe *pipe, unsi
...
@@ -601,32 +598,19 @@ static void pipe_end_get_file_info( struct fd *fd, struct named_pipe *pipe, unsi
}
}
}
}
static
struct
security_descriptor
*
pipe_
server
_get_sd
(
struct
object
*
obj
)
static
struct
security_descriptor
*
pipe_
end
_get_sd
(
struct
object
*
obj
)
{
{
struct
pipe_server
*
server
=
(
struct
pipe_server
*
)
obj
;
struct
pipe_end
*
pipe_end
=
(
struct
pipe_end
*
)
obj
;
return
default_get_sd
(
&
server
->
pipe
->
obj
);
if
(
pipe_end
->
pipe
)
return
default_get_sd
(
&
pipe_end
->
pipe
->
obj
);
}
static
struct
security_descriptor
*
pipe_client_get_sd
(
struct
object
*
obj
)
{
struct
pipe_client
*
client
=
(
struct
pipe_client
*
)
obj
;
if
(
client
->
server
)
return
default_get_sd
(
&
client
->
server
->
pipe
->
obj
);
set_error
(
STATUS_PIPE_DISCONNECTED
);
set_error
(
STATUS_PIPE_DISCONNECTED
);
return
NULL
;
return
NULL
;
}
}
static
int
pipe_
server
_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
static
int
pipe_
end
_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
unsigned
int
set_info
)
unsigned
int
set_info
)
{
{
struct
pipe_server
*
server
=
(
struct
pipe_server
*
)
obj
;
struct
pipe_end
*
pipe_end
=
(
struct
pipe_end
*
)
obj
;
return
default_set_sd
(
&
server
->
pipe
->
obj
,
sd
,
set_info
);
if
(
pipe_end
->
pipe
)
return
default_set_sd
(
&
pipe_end
->
pipe
->
obj
,
sd
,
set_info
);
}
static
int
pipe_client_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
unsigned
int
set_info
)
{
struct
pipe_client
*
client
=
(
struct
pipe_client
*
)
obj
;
if
(
client
->
server
)
return
default_set_sd
(
&
client
->
server
->
pipe
->
obj
,
sd
,
set_info
);
set_error
(
STATUS_PIPE_DISCONNECTED
);
set_error
(
STATUS_PIPE_DISCONNECTED
);
return
0
;
return
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