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
6531f79d
Commit
6531f79d
authored
Feb 22, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return proper object type for mailslot and device files.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c55c4ab8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
15 deletions
+10
-15
om.c
dlls/ntdll/tests/om.c
+3
-0
device.c
server/device.c
+1
-1
file.c
server/file.c
+1
-2
file.h
server/file.h
+1
-0
mailslot.c
server/mailslot.c
+2
-2
named_pipe.c
server/named_pipe.c
+2
-10
No files found.
dlls/ntdll/tests/om.c
View file @
6531f79d
...
...
@@ -1500,6 +1500,7 @@ static void test_query_object(void)
"name too short %s
\n
"
,
wine_dbgstr_w
(
str
->
Buffer
)
);
trace
(
"got %s len %u
\n
"
,
wine_dbgstr_w
(
str
->
Buffer
),
len
);
test_object_type
(
handle
,
"File"
);
test_file_info
(
handle
);
pNtClose
(
handle
);
...
...
@@ -1858,6 +1859,8 @@ static void test_null_device(void)
ok
(
status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %08x
\n
"
,
status
);
test_object_type
(
null
,
"File"
);
SetLastError
(
0xdeadbeef
);
ret
=
WriteFile
(
null
,
buf
,
sizeof
(
buf
),
&
num_bytes
,
NULL
);
ok
(
!
ret
,
"WriteFile unexpectedly succeeded
\n
"
);
...
...
server/device.c
View file @
6531f79d
...
...
@@ -183,7 +183,7 @@ static const struct object_ops device_file_ops =
{
sizeof
(
struct
device_file
),
/* size */
device_file_dump
,
/* dump */
no_get_type
,
/* get_type */
file_get_type
,
/* get_type */
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
default_fd_signaled
,
/* signaled */
...
...
server/file.c
View file @
6531f79d
...
...
@@ -64,7 +64,6 @@ struct file
static
unsigned
int
generic_file_map_access
(
unsigned
int
access
);
static
void
file_dump
(
struct
object
*
obj
,
int
verbose
);
static
struct
object_type
*
file_get_type
(
struct
object
*
obj
);
static
struct
fd
*
file_get_fd
(
struct
object
*
obj
);
static
struct
security_descriptor
*
file_get_sd
(
struct
object
*
obj
);
static
int
file_set_sd
(
struct
object
*
obj
,
const
struct
security_descriptor
*
sd
,
unsigned
int
set_info
);
...
...
@@ -269,7 +268,7 @@ static void file_dump( struct object *obj, int verbose )
fprintf
(
stderr
,
"File fd=%p
\n
"
,
file
->
fd
);
}
st
atic
st
ruct
object_type
*
file_get_type
(
struct
object
*
obj
)
struct
object_type
*
file_get_type
(
struct
object
*
obj
)
{
static
const
WCHAR
name
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
};
static
const
struct
unicode_str
str
=
{
name
,
sizeof
(
name
)
};
...
...
server/file.h
View file @
6531f79d
...
...
@@ -146,6 +146,7 @@ extern int get_file_unix_fd( struct file *file );
extern
struct
file
*
create_file_for_fd
(
int
fd
,
unsigned
int
access
,
unsigned
int
sharing
);
extern
struct
file
*
create_file_for_fd_obj
(
struct
fd
*
fd
,
unsigned
int
access
,
unsigned
int
sharing
);
extern
void
file_set_error
(
void
);
extern
struct
object_type
*
file_get_type
(
struct
object
*
obj
);
extern
struct
security_descriptor
*
mode_to_sd
(
mode_t
mode
,
const
SID
*
user
,
const
SID
*
group
);
extern
mode_t
sd_to_mode
(
const
struct
security_descriptor
*
sd
,
const
SID
*
owner
);
...
...
server/mailslot.c
View file @
6531f79d
...
...
@@ -75,7 +75,7 @@ static const struct object_ops mailslot_ops =
{
sizeof
(
struct
mailslot
),
/* size */
mailslot_dump
,
/* dump */
no_get_type
,
/* get_type */
file_get_type
,
/* get_type */
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
default_fd_signaled
,
/* signaled */
...
...
@@ -131,7 +131,7 @@ static const struct object_ops mail_writer_ops =
{
sizeof
(
struct
mail_writer
),
/* size */
mail_writer_dump
,
/* dump */
no_get_type
,
/* get_type */
file_get_type
,
/* get_type */
no_add_queue
,
/* add_queue */
NULL
,
/* remove_queue */
NULL
,
/* signaled */
...
...
server/named_pipe.c
View file @
6531f79d
...
...
@@ -134,7 +134,6 @@ static const struct object_ops named_pipe_ops =
/* common server and client pipe end functions */
static
void
pipe_end_destroy
(
struct
object
*
obj
);
static
struct
object_type
*
pipe_end_get_type
(
struct
object
*
obj
);
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
security_descriptor
*
pipe_end_get_sd
(
struct
object
*
obj
);
...
...
@@ -156,7 +155,7 @@ static const struct object_ops pipe_server_ops =
{
sizeof
(
struct
pipe_server
),
/* size */
pipe_server_dump
,
/* dump */
pipe_end_get_type
,
/* get_type */
file_get_type
,
/* get_type */
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
default_fd_signaled
,
/* signaled */
...
...
@@ -197,7 +196,7 @@ static const struct object_ops pipe_client_ops =
{
sizeof
(
struct
pipe_end
),
/* size */
pipe_client_dump
,
/* dump */
pipe_end_get_type
,
/* get_type */
file_get_type
,
/* get_type */
add_queue
,
/* add_queue */
remove_queue
,
/* remove_queue */
default_fd_signaled
,
/* signaled */
...
...
@@ -341,13 +340,6 @@ static void named_pipe_destroy( struct object *obj)
free_async_queue
(
&
pipe
->
waiters
);
}
static
struct
object_type
*
pipe_end_get_type
(
struct
object
*
obj
)
{
static
const
WCHAR
name
[]
=
{
'F'
,
'i'
,
'l'
,
'e'
};
static
const
struct
unicode_str
str
=
{
name
,
sizeof
(
name
)
};
return
get_object_type
(
&
str
);
}
static
struct
fd
*
pipe_end_get_fd
(
struct
object
*
obj
)
{
struct
pipe_end
*
pipe_end
=
(
struct
pipe_end
*
)
obj
;
...
...
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