Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ake Rehnman
wine
Commits
a44e0b0f
Commit
a44e0b0f
authored
22 years ago
by
Juergen Schmied
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make use of access mask MAXIMUM_ALLOWED possible.
parent
7c682525
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/advapi32/registry.c
+9
-2
9 additions, 2 deletions
dlls/advapi32/registry.c
with
9 additions
and
2 deletions
dlls/advapi32/registry.c
+
9
−
2
View file @
a44e0b0f
...
...
@@ -53,6 +53,9 @@ inline static int is_version_nt(void)
return
!
(
GetVersion
()
&
0x80000000
);
}
/* allowed bits for access mask */
#define KEY_ACCESS_MASK (KEY_ALL_ACCESS | MAXIMUM_ALLOWED)
/******************************************************************************
* RegCreateKeyExW [ADVAPI32.@]
*
...
...
@@ -69,6 +72,8 @@ inline static int is_version_nt(void)
*
* NOTES
* 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
options
,
REGSAM
access
,
SECURITY_ATTRIBUTES
*
sa
,
...
...
@@ -78,7 +83,7 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR cl
UNICODE_STRING
nameW
,
classW
;
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
(
access
&
KEY_
ALL_
ACCESS
)
||
(
access
&
~
KEY_
ALL_
ACCESS
))
return
ERROR_ACCESS_DENIED
;
if
(
!
(
access
&
KEY_ACCESS
_MASK
)
||
(
access
&
~
KEY_ACCESS
_MASK
))
return
ERROR_ACCESS_DENIED
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
hkey
;
...
...
@@ -96,6 +101,8 @@ DWORD WINAPI RegCreateKeyExW( HKEY hkey, LPCWSTR name, DWORD reserved, LPWSTR cl
/******************************************************************************
* RegCreateKeyExA [ADVAPI32.@]
*
* FIXME MAXIMUM_ALLOWED in access mask not supported by server
*/
DWORD
WINAPI
RegCreateKeyExA
(
HKEY
hkey
,
LPCSTR
name
,
DWORD
reserved
,
LPSTR
class
,
DWORD
options
,
REGSAM
access
,
SECURITY_ATTRIBUTES
*
sa
,
...
...
@@ -108,7 +115,7 @@ DWORD WINAPI RegCreateKeyExA( HKEY hkey, LPCSTR name, DWORD reserved, LPSTR clas
if
(
reserved
)
return
ERROR_INVALID_PARAMETER
;
if
(
!
is_version_nt
())
access
=
KEY_ALL_ACCESS
;
/* Win95 ignores the access mask */
else
if
(
!
(
access
&
KEY_
ALL_
ACCESS
)
||
(
access
&
~
KEY_
ALL_
ACCESS
))
return
ERROR_ACCESS_DENIED
;
else
if
(
!
(
access
&
KEY_ACCESS
_MASK
)
||
(
access
&
~
KEY_ACCESS
_MASK
))
return
ERROR_ACCESS_DENIED
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
hkey
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment