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
2d41fcd8
Commit
2d41fcd8
authored
Nov 21, 2005
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Nov 21, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Kernel32 should create named objects with OBJ_OPENIF flag set.
Handle STATUS_OBJECT_NAME_EXISTS explicitly as it's not mapped with RtlNtStatusToDosError.
parent
4238d2cc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
5 deletions
+20
-5
sync.c
dlls/kernel/sync.c
+16
-4
virtual.c
dlls/kernel/virtual.c
+4
-1
No files found.
dlls/kernel/sync.c
View file @
2d41fcd8
...
@@ -445,7 +445,7 @@ HANDLE WINAPI CreateEventW( SECURITY_ATTRIBUTES *sa, BOOL manual_reset,
...
@@ -445,7 +445,7 @@ HANDLE WINAPI CreateEventW( SECURITY_ATTRIBUTES *sa, BOOL manual_reset,
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
...
@@ -456,6 +456,9 @@ HANDLE WINAPI CreateEventW( SECURITY_ATTRIBUTES *sa, BOOL manual_reset,
...
@@ -456,6 +456,9 @@ HANDLE WINAPI CreateEventW( SECURITY_ATTRIBUTES *sa, BOOL manual_reset,
}
}
status
=
NtCreateEvent
(
&
ret
,
EVENT_ALL_ACCESS
,
&
attr
,
manual_reset
,
initial_state
);
status
=
NtCreateEvent
(
&
ret
,
EVENT_ALL_ACCESS
,
&
attr
,
manual_reset
,
initial_state
);
if
(
status
==
STATUS_OBJECT_NAME_EXISTS
)
SetLastError
(
ERROR_ALREADY_EXISTS
);
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
ret
;
return
ret
;
}
}
...
@@ -640,7 +643,7 @@ HANDLE WINAPI CreateMutexW( SECURITY_ATTRIBUTES *sa, BOOL owner, LPCWSTR name )
...
@@ -640,7 +643,7 @@ HANDLE WINAPI CreateMutexW( SECURITY_ATTRIBUTES *sa, BOOL owner, LPCWSTR name )
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
...
@@ -651,6 +654,9 @@ HANDLE WINAPI CreateMutexW( SECURITY_ATTRIBUTES *sa, BOOL owner, LPCWSTR name )
...
@@ -651,6 +654,9 @@ HANDLE WINAPI CreateMutexW( SECURITY_ATTRIBUTES *sa, BOOL owner, LPCWSTR name )
}
}
status
=
NtCreateMutant
(
&
ret
,
MUTEX_ALL_ACCESS
,
&
attr
,
owner
);
status
=
NtCreateMutant
(
&
ret
,
MUTEX_ALL_ACCESS
,
&
attr
,
owner
);
if
(
status
==
STATUS_OBJECT_NAME_EXISTS
)
SetLastError
(
ERROR_ALREADY_EXISTS
);
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
ret
;
return
ret
;
}
}
...
@@ -762,7 +768,7 @@ HANDLE WINAPI CreateSemaphoreW( SECURITY_ATTRIBUTES *sa, LONG initial,
...
@@ -762,7 +768,7 @@ HANDLE WINAPI CreateSemaphoreW( SECURITY_ATTRIBUTES *sa, LONG initial,
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
...
@@ -773,6 +779,9 @@ HANDLE WINAPI CreateSemaphoreW( SECURITY_ATTRIBUTES *sa, LONG initial,
...
@@ -773,6 +779,9 @@ HANDLE WINAPI CreateSemaphoreW( SECURITY_ATTRIBUTES *sa, LONG initial,
}
}
status
=
NtCreateSemaphore
(
&
ret
,
SEMAPHORE_ALL_ACCESS
,
&
attr
,
initial
,
max
);
status
=
NtCreateSemaphore
(
&
ret
,
SEMAPHORE_ALL_ACCESS
,
&
attr
,
initial
,
max
);
if
(
status
==
STATUS_OBJECT_NAME_EXISTS
)
SetLastError
(
ERROR_ALREADY_EXISTS
);
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
ret
;
return
ret
;
}
}
...
@@ -877,7 +886,7 @@ HANDLE WINAPI CreateWaitableTimerW( SECURITY_ATTRIBUTES *sa, BOOL manual, LPCWST
...
@@ -877,7 +886,7 @@ HANDLE WINAPI CreateWaitableTimerW( SECURITY_ATTRIBUTES *sa, BOOL manual, LPCWST
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
...
@@ -889,6 +898,9 @@ HANDLE WINAPI CreateWaitableTimerW( SECURITY_ATTRIBUTES *sa, BOOL manual, LPCWST
...
@@ -889,6 +898,9 @@ HANDLE WINAPI CreateWaitableTimerW( SECURITY_ATTRIBUTES *sa, BOOL manual, LPCWST
status
=
NtCreateTimer
(
&
handle
,
TIMER_ALL_ACCESS
,
&
attr
,
status
=
NtCreateTimer
(
&
handle
,
TIMER_ALL_ACCESS
,
&
attr
,
manual
?
NotificationTimer
:
SynchronizationTimer
);
manual
?
NotificationTimer
:
SynchronizationTimer
);
if
(
status
==
STATUS_OBJECT_NAME_EXISTS
)
SetLastError
(
ERROR_ALREADY_EXISTS
);
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
handle
;
return
handle
;
}
}
...
...
dlls/kernel/virtual.c
View file @
2d41fcd8
...
@@ -308,7 +308,7 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
...
@@ -308,7 +308,7 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
0
;
attr
.
ObjectName
=
NULL
;
attr
.
ObjectName
=
NULL
;
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
attr
.
Attributes
=
OBJ_CASE_INSENSITIVE
|
OBJ_OPENIF
|
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
((
sa
&&
sa
->
bInheritHandle
)
?
OBJ_INHERIT
:
0
);
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityDescriptor
=
sa
?
sa
->
lpSecurityDescriptor
:
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
attr
.
SecurityQualityOfService
=
NULL
;
...
@@ -354,6 +354,9 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
...
@@ -354,6 +354,9 @@ HANDLE WINAPI CreateFileMappingW( HANDLE hFile, LPSECURITY_ATTRIBUTES sa,
size
.
u
.
HighPart
=
size_high
;
size
.
u
.
HighPart
=
size_high
;
status
=
NtCreateSection
(
&
ret
,
access
,
&
attr
,
&
size
,
protect
,
sec_type
,
hFile
);
status
=
NtCreateSection
(
&
ret
,
access
,
&
attr
,
&
size
,
protect
,
sec_type
,
hFile
);
if
(
status
==
STATUS_OBJECT_NAME_EXISTS
)
SetLastError
(
ERROR_ALREADY_EXISTS
);
else
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
SetLastError
(
RtlNtStatusToDosError
(
status
)
);
return
ret
;
return
ret
;
}
}
...
...
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