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
a44e0b0f
Commit
a44e0b0f
authored
May 09, 2002
by
Juergen Schmied
Committed by
Alexandre Julliard
May 09, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make use of access mask MAXIMUM_ALLOWED possible.
parent
7c682525
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
registry.c
dlls/advapi32/registry.c
+9
-2
No files found.
dlls/advapi32/registry.c
View file @
a44e0b0f
...
@@ -53,6 +53,9 @@ inline static int is_version_nt(void)
...
@@ -53,6 +53,9 @@ inline static int is_version_nt(void)
return
!
(
GetVersion
()
&
0x80000000
);
return
!
(
GetVersion
()
&
0x80000000
);
}
}
/* allowed bits for access mask */
#define KEY_ACCESS_MASK (KEY_ALL_ACCESS | MAXIMUM_ALLOWED)
/******************************************************************************
/******************************************************************************
* RegCreateKeyExW [ADVAPI32.@]
* RegCreateKeyExW [ADVAPI32.@]
*
*
...
@@ -69,6 +72,8 @@ inline static int is_version_nt(void)
...
@@ -69,6 +72,8 @@ inline static int is_version_nt(void)
*
*
* NOTES
* NOTES
* in case of failing retkey remains untouched
* in case of failing retkey remains untouched
*
* FIXME MAXIMUM_ALLOWED in access mask not supported by server
*/
*/
DWORD
WINAPI
RegCreateKeyExW
(
HKEY
hkey
,
LPCWSTR
name
,
DWORD
reserved
,
LPWSTR
class
,
DWORD
WINAPI
RegCreateKeyExW
(
HKEY
hkey
,
LPCWSTR
name
,
DWORD
reserved
,
LPWSTR
class
,
DWORD
options
,
REGSAM
access
,
SECURITY_ATTRIBUTES
*
sa
,
DWORD
options
,
REGSAM
access
,
SECURITY_ATTRIBUTES
*
sa
,
...
@@ -78,7 +83,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR cl
...
@@ -78,7 +83,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR cl
UNICODE_STRING
nameW
,
classW
;
UNICODE_STRING
nameW
,
classW
;
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
(
access
&
KEY_A
LL_ACCESS
)
||
(
access
&
~
KEY_ALL_ACCESS
))
return
ERROR_ACCESS_DENIED
;
if
(
!
(
access
&
KEY_A
CCESS_MASK
)
||
(
access
&
~
KEY_ACCESS_MASK
))
return
ERROR_ACCESS_DENIED
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
hkey
;
attr
.
RootDirectory
=
hkey
;
...
@@ -96,6 +101,8 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR cl
...
@@ -96,6 +101,8 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR cl
/******************************************************************************
/******************************************************************************
* RegCreateKeyExA [ADVAPI32.@]
* RegCreateKeyExA [ADVAPI32.@]
*
* FIXME MAXIMUM_ALLOWED in access mask not supported by server
*/
*/
DWORD
WINAPI
RegCreateKeyExA
(
HKEY
hkey
,
LPCSTR
name
,
DWORD
reserved
,
LPSTR
class
,
DWORD
WINAPI
RegCreateKeyExA
(
HKEY
hkey
,
LPCSTR
name
,
DWORD
reserved
,
LPSTR
class
,
DWORD
options
,
REGSAM
access
,
SECURITY_ATTRIBUTES
*
sa
,
DWORD
options
,
REGSAM
access
,
SECURITY_ATTRIBUTES
*
sa
,
...
@@ -108,7 +115,7 @@ DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR clas
...
@@ -108,7 +115,7 @@ DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR clas
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
else
if
(
!
(
access
&
KEY_A
LL_ACCESS
)
||
(
access
&
~
KEY_ALL_ACCESS
))
return
ERROR_ACCESS_DENIED
;
else
if
(
!
(
access
&
KEY_A
CCESS_MASK
)
||
(
access
&
~
KEY_ACCESS_MASK
))
return
ERROR_ACCESS_DENIED
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
hkey
;
attr
.
RootDirectory
=
hkey
;
...
...
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