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
715d78e0
Commit
715d78e0
authored
Nov 02, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Refuse to close handles in other processes if they have an associated fd.
parent
8700c434
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
18 additions
and
11 deletions
+18
-11
change.c
server/change.c
+1
-1
fd.c
server/fd.c
+6
-0
file.c
server/file.c
+1
-1
file.h
server/file.h
+1
-0
mailslot.c
server/mailslot.c
+3
-3
mapping.c
server/mapping.c
+1
-1
named_pipe.c
server/named_pipe.c
+3
-3
serial.c
server/serial.c
+1
-1
sock.c
server/sock.c
+1
-1
No files found.
server/change.c
View file @
715d78e0
...
...
@@ -177,7 +177,7 @@ static const struct object_ops dir_ops =
dir_get_fd
,
/* get_fd */
dir_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
dir_destroy
/* destroy */
};
...
...
server/fd.c
View file @
715d78e0
...
...
@@ -1658,6 +1658,12 @@ int is_same_file_fd( struct fd *fd1, struct fd *fd2 )
return
fd1
->
inode
==
fd2
->
inode
;
}
/* handler for close_handle that refuses to close fd-associated handles in other processes */
int
fd_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
)
{
return
(
!
current
||
current
->
process
==
process
);
}
/* callback for event happening in the main poll() loop */
void
fd_poll_event
(
struct
fd
*
fd
,
int
event
)
{
...
...
server/file.c
View file @
715d78e0
...
...
@@ -84,7 +84,7 @@ static const struct object_ops file_ops =
file_get_fd
,
/* get_fd */
file_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
file_destroy
/* destroy */
};
...
...
server/file.h
View file @
715d78e0
...
...
@@ -55,6 +55,7 @@ extern void *get_fd_user( struct fd *fd );
extern
void
set_fd_user
(
struct
fd
*
fd
,
const
struct
fd_ops
*
ops
,
struct
object
*
user
);
extern
int
get_unix_fd
(
struct
fd
*
fd
);
extern
int
is_same_file_fd
(
struct
fd
*
fd1
,
struct
fd
*
fd2
);
extern
int
fd_close_handle
(
struct
object
*
obj
,
struct
process
*
process
,
obj_handle_t
handle
);
extern
void
fd_poll_event
(
struct
fd
*
fd
,
int
event
);
extern
int
check_fd_events
(
struct
fd
*
fd
,
int
events
);
extern
void
set_fd_events
(
struct
fd
*
fd
,
int
events
);
...
...
server/mailslot.c
View file @
715d78e0
...
...
@@ -80,7 +80,7 @@ static const struct object_ops mailslot_ops =
mailslot_get_fd
,
/* get_fd */
mailslot_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
mailslot_destroy
/* destroy */
};
...
...
@@ -124,7 +124,7 @@ static const struct object_ops mail_writer_ops =
mail_writer_get_fd
,
/* get_fd */
mail_writer_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
mail_writer_destroy
/* destroy */
};
...
...
@@ -167,7 +167,7 @@ static const struct object_ops mailslot_device_ops =
mailslot_device_get_fd
,
/* get_fd */
no_map_access
,
/* map_access */
mailslot_device_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
mailslot_device_destroy
/* destroy */
};
...
...
server/mapping.c
View file @
715d78e0
...
...
@@ -68,7 +68,7 @@ static const struct object_ops mapping_ops =
mapping_get_fd
,
/* get_fd */
mapping_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
mapping_destroy
/* destroy */
};
...
...
server/named_pipe.c
View file @
715d78e0
...
...
@@ -148,7 +148,7 @@ static const struct object_ops pipe_server_ops =
pipe_server_get_fd
,
/* get_fd */
pipe_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
pipe_server_destroy
/* destroy */
};
...
...
@@ -181,7 +181,7 @@ static const struct object_ops pipe_client_ops =
pipe_client_get_fd
,
/* get_fd */
pipe_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
pipe_client_destroy
/* destroy */
};
...
...
@@ -214,7 +214,7 @@ static const struct object_ops named_pipe_device_ops =
named_pipe_device_get_fd
,
/* get_fd */
pipe_map_access
,
/* map_access */
named_pipe_device_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
named_pipe_device_destroy
/* destroy */
};
...
...
server/serial.c
View file @
715d78e0
...
...
@@ -104,7 +104,7 @@ static const struct object_ops serial_ops =
serial_get_fd
,
/* get_fd */
serial_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
serial_destroy
/* destroy */
};
...
...
server/sock.c
View file @
715d78e0
...
...
@@ -114,7 +114,7 @@ static const struct object_ops sock_ops =
sock_get_fd
,
/* get_fd */
sock_map_access
,
/* map_access */
no_lookup_name
,
/* lookup_name */
no
_close_handle
,
/* close_handle */
fd
_close_handle
,
/* close_handle */
sock_destroy
/* destroy */
};
...
...
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