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
3bbeb72d
Commit
3bbeb72d
authored
Oct 14, 2001
by
Eric Pouech
Committed by
Alexandre Julliard
Oct 14, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass security attributes for DOSFS creation.
parent
27e17979
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
dos_fs.c
files/dos_fs.c
+9
-7
file.c
files/file.c
+1
-1
file.h
include/file.h
+1
-1
No files found.
files/dos_fs.c
View file @
3bbeb72d
...
...
@@ -705,7 +705,7 @@ const DOS_DEVICE *DOSFS_GetDeviceByHandle( HFILE hFile )
/**************************************************************************
* DOSFS_CreateCommPort
*/
static
HANDLE
DOSFS_CreateCommPort
(
LPCSTR
name
,
DWORD
access
,
DWORD
attributes
)
static
HANDLE
DOSFS_CreateCommPort
(
LPCSTR
name
,
DWORD
access
,
DWORD
attributes
,
LPSECURITY_ATTRIBUTES
sa
)
{
HANDLE
ret
;
char
devname
[
40
];
...
...
@@ -723,7 +723,7 @@ static HANDLE DOSFS_CreateCommPort(LPCSTR name, DWORD access, DWORD attributes)
SERVER_START_VAR_REQ
(
create_serial
,
len
)
{
req
->
access
=
access
;
req
->
inherit
=
0
;
/*FIXME*/
req
->
inherit
=
(
sa
&&
(
sa
->
nLength
>=
sizeof
(
*
sa
))
&&
sa
->
bInheritHandle
);
req
->
attributes
=
attributes
;
req
->
sharing
=
FILE_SHARE_READ
|
FILE_SHARE_WRITE
;
memcpy
(
server_data_ptr
(
req
),
devname
,
len
);
...
...
@@ -746,7 +746,7 @@ static HANDLE DOSFS_CreateCommPort(LPCSTR name, DWORD access, DWORD attributes)
* Open a DOS device. This might not map 1:1 into the UNIX device concept.
* Returns 0 on failure.
*/
HANDLE
DOSFS_OpenDevice
(
const
char
*
name
,
DWORD
access
,
DWORD
attributes
)
HANDLE
DOSFS_OpenDevice
(
const
char
*
name
,
DWORD
access
,
DWORD
attributes
,
LPSECURITY_ATTRIBUTES
sa
)
{
int
i
;
const
char
*
p
;
...
...
@@ -765,7 +765,7 @@ HANDLE DOSFS_OpenDevice( const char *name, DWORD access, DWORD attributes )
/* got it */
if
(
!
strcmp
(
DOSFS_Devices
[
i
].
name
,
"NUL"
))
return
FILE_CreateFile
(
"/dev/null"
,
access
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
sa
,
OPEN_EXISTING
,
0
,
0
,
TRUE
);
if
(
!
strcmp
(
DOSFS_Devices
[
i
].
name
,
"CON"
))
{
HANDLE
to_dup
;
...
...
@@ -781,17 +781,19 @@ HANDLE DOSFS_OpenDevice( const char *name, DWORD access, DWORD attributes )
return
0
;
}
if
(
!
DuplicateHandle
(
GetCurrentProcess
(),
to_dup
,
GetCurrentProcess
(),
&
handle
,
0
,
FALSE
,
DUPLICATE_SAME_ACCESS
))
&
handle
,
0
,
sa
&&
(
sa
->
nLength
>=
sizeof
(
*
sa
))
&&
sa
->
bInheritHandle
,
DUPLICATE_SAME_ACCESS
))
handle
=
0
;
return
handle
;
}
if
(
!
strcmp
(
DOSFS_Devices
[
i
].
name
,
"SCSIMGR$"
)
||
!
strcmp
(
DOSFS_Devices
[
i
].
name
,
"HPSCAN"
))
{
return
FILE_CreateDevice
(
i
,
access
,
NULL
);
return
FILE_CreateDevice
(
i
,
access
,
sa
);
}
if
(
(
handle
=
DOSFS_CreateCommPort
(
DOSFS_Devices
[
i
].
name
,
access
,
attributes
))
)
if
(
(
handle
=
DOSFS_CreateCommPort
(
DOSFS_Devices
[
i
].
name
,
access
,
attributes
,
sa
))
)
return
handle
;
FIXME
(
"device open %s not supported (yet)
\n
"
,
DOSFS_Devices
[
i
].
name
);
return
0
;
...
...
files/file.c
View file @
3bbeb72d
...
...
@@ -488,7 +488,7 @@ HANDLE WINAPI CreateFileA( LPCSTR filename, DWORD access, DWORD sharing,
{
TRACE
(
"opening device '%s'
\n
"
,
filename
);
if
(
!
(
ret
=
DOSFS_OpenDevice
(
filename
,
access
,
attributes
)))
if
(
!
(
ret
=
DOSFS_OpenDevice
(
filename
,
access
,
attributes
,
sa
)))
{
/* Do not silence this please. It is a critical error. -MM */
ERR
(
"Couldn't open device '%s'!
\n
"
,
filename
);
...
...
include/file.h
View file @
3bbeb72d
...
...
@@ -98,7 +98,7 @@ extern time_t DOSFS_FileTimeToUnixTime( const FILETIME *ft, DWORD *remainder );
extern
BOOL
DOSFS_ToDosFCBFormat
(
LPCSTR
name
,
LPSTR
buffer
);
extern
const
DOS_DEVICE
*
DOSFS_GetDevice
(
const
char
*
name
);
extern
const
DOS_DEVICE
*
DOSFS_GetDeviceByHandle
(
HFILE
hFile
);
extern
HANDLE
DOSFS_OpenDevice
(
const
char
*
name
,
DWORD
access
,
DWORD
attributes
);
extern
HANDLE
DOSFS_OpenDevice
(
const
char
*
name
,
DWORD
access
,
DWORD
attributes
,
LPSECURITY_ATTRIBUTES
sa
);
extern
BOOL
DOSFS_FindUnixName
(
LPCSTR
path
,
LPCSTR
name
,
LPSTR
long_buf
,
INT
long_len
,
LPSTR
short_buf
,
BOOL
ignore_case
);
...
...
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